@interlay/interbtc-api / Exports / TransactionAPI
• api: ApiPromise
src/parachain/transaction.ts:15
▸ buildBatchExtrinsic(extrinsics
, atomic?
): SubmittableExtrinsic
<"promise"
, ISubmittableResult
>
Builds a submittable extrinsic to send other extrinsic in batch.
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). |
SubmittableExtrinsic
<"promise"
, ISubmittableResult
>
A batch/batchAll submittable extrinsic.
src/parachain/transaction.ts:33
▸ dryRun(extrinsic
): Promise
<DryRunResult
>
Tests extrinsic execution against runtime.
Name | Type | Description |
---|---|---|
extrinsic |
SubmittableExtrinsic <"promise" , ISubmittableResult > |
Extrinsic to dry run. |
Promise
<DryRunResult
>
Object consisting of success
boolean that is true if extrinsic
was successfully executed, false otherwise. If execution fails, caught error is exposed.
src/parachain/transaction.ts:54
▸ getAccount(): undefined
| AddressOrPair
undefined
| AddressOrPair
src/parachain/transaction.ts:18
▸ getFeeEstimate(extrinsic
): Promise
<MonetaryAmount
<Currency
>>
Getter for fee estimate of the extrinsic.
Name | Type | Description |
---|---|---|
extrinsic |
SubmittableExtrinsic <"promise" , ISubmittableResult > |
Extrinsic to get fee estimation about. |
Promise
<MonetaryAmount
<Currency
>>
amount of native currency that will be paid as transaction fee.
Note
This fee estimation does not include tip.
src/parachain/transaction.ts:45
▸ removeAccount(): void
void
src/parachain/transaction.ts:17
▸ sendLogged<T
>(transaction
, successEventType?
, extrinsicStatus?
): Promise
<ISubmittableResult
>
Name | Type |
---|---|
T |
extends AnyTuple |
Name | Type |
---|---|
transaction |
SubmittableExtrinsic <"promise" , ISubmittableResult > |
successEventType? |
AugmentedEvent <ApiTypes , T > |
extrinsicStatus? |
ExtrinsicStatus |
Promise
<ISubmittableResult
>
src/parachain/transaction.ts:19
▸ setAccount(account
): void
Name | Type |
---|---|
account |
AddressOrPair |
void