multi-transaction
v11.1.2
Published
Make construction of transaction easier on NEAR blockchain.
Downloads
165
Readme
Multi Transaction
Make the construction of the transaction easier on NEAR blockchain
Install
pnpm add multi-transaction
This package includes following sub packages, you can also install with your needs
pnpm add @multi-transaction/core
pnpm add @multi-transaction/account
pnpm add @multi-transaction/wallet-selector
MultiTransaction
import { MultiTransaction, Amount, Gas } from 'multi-transaction';
const mTransaction = MultiTransaction
.batch('wrap.near')
.functionCall({
methodName: 'ft_transfer',
args: {
receiver_id: 'bob.near',
amount: Amount.parse('8.88', 'NEAR'),
},
attachedDeposit: Amount.ONE_YOCTO,
gas: Gas.parse('10', 'T'),
});
More information about MultiTransaction
MultiSendAccount
import { MultiSendAccount } from 'multi-transaction';
const account = MultiSendAccount.new(connection, 'alice.near');
await account.send(mTransaction);
More information about MultiSendAccount
MultiSendWalletSelector
import { setupMultiSendWalletSelector } from 'multi-transaction';
const selector = await setupMultiSendWalletSelector({
network: 'mainnet',
modules: [
/* wallet modules */
],
});
await selector.send(mTransaction);
More information about MultiSendWalletSelector