interbtc-api

@interlay/interbtc-api / Exports / TransactionAPI

Interface: TransactionAPI

Implemented by

Table of contents

Properties

Methods

Properties

api

api: ApiPromise

Defined in

src/parachain/transaction.ts:15

Methods

buildBatchExtrinsic

buildBatchExtrinsic(extrinsics, atomic?): SubmittableExtrinsic<"promise", ISubmittableResult>

Builds a submittable extrinsic to send other extrinsic in batch.

Parameters

Name Type Description
extrinsics SubmittableExtrinsic<"promise", ISubmittableResult>[] An array of extrinsics to be submitted as batch.
atomic? boolean Whether the given extrinsics should be handled atomically or not. When true (default) all extrinsics will rollback if one fails (batchAll), otherwise allows partial successes (batch).

Returns

SubmittableExtrinsic<"promise", ISubmittableResult>

A batch/batchAll submittable extrinsic.

Defined in

src/parachain/transaction.ts:33


dryRun

dryRun(extrinsic): Promise<DryRunResult>

Tests extrinsic execution against runtime.

Parameters

Name Type Description
extrinsic SubmittableExtrinsic<"promise", ISubmittableResult> Extrinsic to dry run.

Returns

Promise<DryRunResult>

Object consisting of success boolean that is true if extrinsic was successfully executed, false otherwise. If execution fails, caught error is exposed.

Defined in

src/parachain/transaction.ts:54


getAccount

getAccount(): undefined | AddressOrPair

Returns

undefined | AddressOrPair

Defined in

src/parachain/transaction.ts:18


getFeeEstimate

getFeeEstimate(extrinsic): Promise<MonetaryAmount<Currency>>

Getter for fee estimate of the extrinsic.

Parameters

Name Type Description
extrinsic SubmittableExtrinsic<"promise", ISubmittableResult> Extrinsic to get fee estimation about.

Returns

Promise<MonetaryAmount<Currency>>

amount of native currency that will be paid as transaction fee.

Note

This fee estimation does not include tip.

Defined in

src/parachain/transaction.ts:45


removeAccount

removeAccount(): void

Returns

void

Defined in

src/parachain/transaction.ts:17


sendLogged

sendLogged<T>(transaction, successEventType?, extrinsicStatus?): Promise<ISubmittableResult>

Type parameters

Name Type
T extends AnyTuple

Parameters

Name Type
transaction SubmittableExtrinsic<"promise", ISubmittableResult>
successEventType? AugmentedEvent<ApiTypes, T>
extrinsicStatus? ExtrinsicStatus

Returns

Promise<ISubmittableResult>

Defined in

src/parachain/transaction.ts:19


setAccount

setAccount(account): void

Parameters

Name Type
account AddressOrPair

Returns

void

Defined in

src/parachain/transaction.ts:16