Example Usage
Remote Signing
const anchorEarn = new AnchorEarn({
chain: CHAINS.TERRA,
network: NETWORKS.BOMBAY_12,
mnemonic:
'...',
});
// customSigner signs the generated unsigned tx
const customSigner = async (tx: Msg[]) => {
const account = new MnemonicKey({
mnemonic:
'...',
});
const wallet = new Wallet(
new LCDClient({
URL: 'https://bombay-lcd.terra.dev',
chainID: 'bombay-12',
}),
account,
);
return await wallet.createAndSignTx({
msgs: tx,
gasAdjustment: 2,
gasPrices: { uusd: 0.15 },
});
};
await anchorEarn.deposit({
amount: '0.01',
currency: DENOMS.UST,
log: (data) => {
console.log(data);
},
customSigner: customSigner,
});Remote Signing & Broadcasting
Logging Transaction Progress
Last updated
Was this helpful?