Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@scallop-io/sui-kit-plugins
Advanced tools
This repo contains plugins for Sui Kit.
SuiKit
SuiKit
is required to use these plugins.
Please refer to the Sui Kit documentation on how to install.
npm install @scallop-io/sui-kit-plugins
This plugin will automatically sponsor your transaction with Shinami gas.
In order to use this plugin, you'll need to get a Gas access key
from Shinami.
How to get gas access key
import { SuiKit, SuiTxBlock } from '@scallop-io/sui-kit';
// import plugins, they will dynamically register themselves to SuiKit
import '@scallop-io/sui-kit-plugins';
import * as process from "process";
let suiKit = new SuiKit({secretKey: process.env.SECRET_KEY});
// init Shinami gas sponsor before using it
suiKit.initShinamiGasSponsor(process.env.GAS_ACCESS_KEY);
/**
* This is an example of using sponsored transaction plugin in nodejs.
*/
async function forNodejs() {
// Create a transaction
const tx = new SuiTxBlock();
tx.transferObjects(['<obj_id>'], '<sender_address>');
const gasBudget = 10 ** 9;
// Sponsor the transaction, and send it
const res = await suikit.signAndSendShinamiSponsoredTxn(tx, gasBudget);
return res;
}
/**
* This is an example of using sponsored transaction plugin in browser.
*/
async function forBrowser() {
// Create a transaction
const tx = new SuiTxBlock();
tx.transferObjects(['<obj_id>'], '<sender_address>');
const gasBudget = 10 ** 9;
// Sponsor the transaction
const sender = '<sender_address>';
const sponsoredTx = await suikit.requestShinamiSponsorship(tx, gasBudget, sender);
// Get the user's signature from wallet
const txBytes = sponsoredTx.txBytes;
// Implement your own function to get user's signature from wallet
const userSignature = await getUserSignatureFromWallet(txBytes);
// Send the signed sponsored transaction
const res = await suikit.sendShinamiSponsoredTxn(sponsoredTx, userSignature);
return res;
}
FAQs
Plugins for SUI Kit
We found that @scallop-io/sui-kit-plugins demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.