The Gno Wallet
is an extension on the tm2-js-client
Wallet
, outlined here.
Initiates a native currency transfer transaction between accounts
to
string the bech32 address of the receiverfunds
Map<string, number> the denomination -> value map for fundsfee
TxFee the custom transaction fee, if any
Returns Promise<string>
let fundsMap = new Map<string, number>([
["ugnot", 10],
]);
await wallet.transferFunds('g1flk9z2qmkgqeyrl654r3639rzgz7xczdfwwqw7', fundsMap);
// returns the transaction hash
Invokes the specified method on a GNO contract
path
string the gno package / realm pathmethod
string the method nameargs
string[] the method arguments, if anyfunds
Map<string, number> the denomination -> value map for fundsfee
TxFee the custom transaction fee, if any
Returns Promise<string>
let fundsMap = new Map<string, number>([
["ugnot", 10],
]);
await wallet.callMethod('gno.land/r/demo/foo20', 'TotalBalance', []);
// returns the transaction hash
Deploys the specified package / realm
gnoPackage
MemPackage the package / realm to be deployedfunds
Map<string, number> the denomination -> value map for fundsfee
TxFee the custom transaction fee, if any
Returns Promise<string>
const memPackage: MemPackage = // ...
await wallet.deployPackage(memPackage);
// returns the transaction hash