Interface SendTransactionOptions

Hierarchy

Properties

abis?: Record<string, Abi>

Collection of Abis so that the receiver can parse the operations in the transaction

beforeSend?: ((tx: TransactionJson, options?: SendTransactionOptions) => Promise<void>)

Type declaration

    • (tx: TransactionJson, options?: SendTransactionOptions): Promise<void>
    • Function to be called before sending a transaction to the blockchain. It is useful to apply multisignatures to the transaction.

      Example

      const signer2 = Signer.fromSeed("signer2");
      const signer3 = Signer.fromSeed("signer3");

      const addMoreSignatures = async (tx, opts) => {
      await signer2.signTransaction(tx);
      await signer3.signTransaction(tx);
      };

      const { transaction } = await koin.transfer(
      {
      from: "16MT1VQFgsVxEfJrSGinrA5buiqBsN5ViJ",
      to: "1Gvqdo9if6v6tFomEuTuMWP1D7H7U9yksb",
      value: "1000000",
      },
      {
      payer: signer2.getAddress(),
      beforeSend: addMoreSignatures,
      }
      );

      Parameters

      Returns Promise<void>

broadcast?: boolean

Broadcast

Boolean to define if the transaction should be broadcasted to the different nodes in the network. By default it is true.

Set it to false if you want to interact with a contract for testing purposes and check the possible events triggered.

sendAbis?: boolean

Send abis

Boolean to define if the abis should be shared with the signer so it will be able to decode the operations. By default it is true.

Generated using TypeDoc