Sending Transactions

Once an application is connected to the Elli Wallet via connect method, an app can submit the signed transaction using window.elli.signAndSubmitTransaction()and it will return a Promise that resolves when the request is successful and reject (throw when awaited) when the request fails.

Below is an example code describing the way to submit a transaction.

const txb = new TransactionBlock();
const [coin] = txb.splitCoins(txb.gas, [txb.pure(1)]);
txb.transferObjects([coin], txb.pure(''));

const transaction = await window.elli.signAndSubmitTransaction({
    address: '0xfe7de9d90ccede875feec078e09692f731537abefa757aecbd74decb1d55e7cf',
    transactionBlock: txb.serialize(),
    chain: 'sui:devnet'
});

console.log(transaction)
// balanceChanges: [{…}]
// confirmedLocalExecution: true
// digest: "79RhutgbK7NT5Je64MknJYNk96uL9JTmSREwp8FJgXzi"
// effects: {messageVersion: 'v1', status: {…}, executedEpoch: '9', gasUsed: {…}, modifiedAtVersions: Array(2), …}
// events: []
// objectChanges: (2) [{…}, {…}]
// transaction: {data: {…}, txSignatures: Array(1)}

Last updated