dispatch() (transaction)
Othent JS SDK dispatch() function
Last updated
Othent JS SDK dispatch() function
Last updated
The dispatch()
function allows you to quickly sign and send a transaction to the network in a bundled format. It is best for smaller datas and contract interactions. If the bundled transaction cannot be submitted, it will fall back to a base layer transaction. The function returns the of the API call.
This function assumes (and requires) a user is authenticated. See .
transaction: Transaction
A valid Arweave instance, without a keyfile.
options?: DispatchOptions
options?.node?: UrlString
(string
)
Node used for bundling transactions. Defaults to ArDrive Turbo's node.
Custom Arweave instance. Defaults to an instance connected to https://arweave.net:443.
return Promise<ArDriveBundledTransactionData | UploadedTransactionData>
A Promise
containing the result of the upload request, including the ID of the submitted transaction, as as well as a type
property indicating if it was uploaded by a bundle or directly to the base layer, as well as some additional properties: