Cosmos
Native Token Payment
import core from '@poro-wallet/core';
const node = 'rpc://sentry-01.theta-testnet.polypore.xyz:26657';
const wallet = await core.factory.wallet.ripple.create();
// Remember to fund your wallet first before running following code
const { address, mnemonic } = wallet;
const builtTx = core.factory.transaction.cosmos.native(
node,
{
from: core.utils.conversion.toCosmosAddress(address),
to: core.utils.conversion.toCosmosAddress(randomTo),
amount: '0.001',
},
);
const signedTx = await core.factory.transaction.cosmos.sign(node, mnemonic, builtTx);
const sentResponse = await core.factory.transaction.cosmos.send(node, signedTx);
// => true
Last updated