diff --git a/avail-js/docs/extrinsics/README.md b/avail-js/docs/extrinsics/README.md index 4fd093d66..38de9127e 100644 --- a/avail-js/docs/extrinsics/README.md +++ b/avail-js/docs/extrinsics/README.md @@ -11,17 +11,17 @@ Origin Level: Signed ### Interface ```js -function createApplicationKey(key: string, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function createApplicationKey(key: string, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| key | string | false | name of the application key | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| key | string | false | name of the application key | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -82,17 +82,17 @@ Origin Level: Signed ### Interface ```js -function submitData(data: string, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function submitData(data: string, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| data | string | false | data to be submitted | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| data | string | false | data to be submitted | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -154,18 +154,18 @@ Origin Level: Root ### Interface ```js -function submitBlockLengthProposal(rows: number, cols: number, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function submitBlockLengthProposal(rows: number, cols: number, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| rows | number | false | number of rows in block | -| cols | number | false | number of cols in block | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| rows | number | false | number of rows in block | +| cols | number | false | number of cols in block | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -215,18 +215,18 @@ Origin Level: Root ### Interface ```js -function setApplicationKey(oldKey: string, newKey: string, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function setApplicationKey(oldKey: string, newKey: string, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| oldKey | string | false | application key to be replaced | -| newKey | string | false | application key that will replace the old one | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| oldKey | string | false | application key to be replaced | +| newKey | string | false | application key that will replace the old one | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -276,17 +276,17 @@ Origin Level: Root ### Interface ```js -function setSubmitDataFeeModifier(modifier: DispatchFeeModifier, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function setSubmitDataFeeModifier(modifier: DispatchFeeModifier, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------------- | -------- | ----------------------------------------------- | -| modifier | DispatchFeeModifier | false | new fee modifier values | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------- | -------- | ------------------------------------------------------------ | +| modifier | DispatchFeeModifier | false | new fee modifier values | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -357,18 +357,18 @@ Origin Level: Signed ### Interface ```js -function transferKeepAlive(dest: string, value: BN, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function transferKeepAlive(dest: string, value: BN, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| dest | string | false | account that will receive funds | -| value | BN | false | amount that is send. 10^18 is equal to 1 AVL | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| dest | string | false | account that will receive funds | +| value | BN | false | amount that is send. 10^18 is equal to 1 AVL | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -430,18 +430,18 @@ Origin Level: Signed ### Interface ```js -function transferAllowDeath(dest: string, value: BN, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function transferAllowDeath(dest: string, value: BN, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| dest | string | false | account that will receive funds | -| value | BN | false | amount that is send. 10^18 is equal to 1 AVL | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| dest | string | false | account that will receive funds | +| value | BN | false | amount that is send. 10^18 is equal to 1 AVL | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -503,18 +503,18 @@ Origin Level: Signed ### Interface ```js -function transferAll(dest: string, keepAlive: boolean, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function transferAll(dest: string, keepAlive: boolean, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ------------------------------------------------ | -| dest | string | false | account that will receive funds | -| keepAlive | boolean | false | if set to false it will reap the account as well | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| dest | string | false | account that will receive funds | +| keepAlive | boolean | false | if set to false it will reap the account as well | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -582,18 +582,18 @@ Origin Level: Signed ### Interface ```js -function bond(value: BN, payee: StakingRewardDestination, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function bond(value: BN, payee: StakingRewardDestination, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------------------ | -------- | ------------------------------------------------------- | -| value | BN | false | amount that is bond. 10^18 is equal to 1 AVL | -| payee | StakingRewardDestination | false | Can be: "Staked", "Stash", "None" or an account address | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------------ | -------- | ------------------------------------------------------------ | +| value | BN | false | amount that is bond. 10^18 is equal to 1 AVL | +| payee | StakingRewardDestination | false | Can be: "Staked", "Stash", "None" or an account address | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -654,17 +654,17 @@ Origin Level: Signed ### Interface ```js -function bondExtra(maxAdditional: BN, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function bondExtra(maxAdditional: BN, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| ------------- | ------------- | -------- | ------------------------------------------------------- | -| maxAdditional | BN | false | additional amount that is bond. 10^18 is equal to 1 AVL | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| ------------- | ------------------ | -------- | ------------------------------------------------------------ | +| maxAdditional | BN | false | additional amount that is bond. 10^18 is equal to 1 AVL | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -724,16 +724,16 @@ Origin Level: Signed ### Interface ```js -function chill(waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function chill(waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -790,17 +790,17 @@ Origin Level: Signed ### Interface ```js -function chillOther(stash: string, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function chillOther(stash: string, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| stash | string | false | address of stash account to chill | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| stash | string | false | address of stash account to chill | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -848,17 +848,17 @@ Origin Level: Signed ### Interface ```js -function nominate(targets: string[], waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function nominate(targets: string[], waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| targets | string[] | false | list od addresses to nominate | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| targets | string[] | false | list od addresses to nominate | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -923,17 +923,17 @@ Origin Level: Signed ### Interface ```js -function unbond(value: BN, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function unbond(value: BN, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| value | BN | false | amount of tokens to unbond | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| value | BN | false | amount of tokens to unbond | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -992,18 +992,18 @@ Origin Level: Signed ### Interface ```js -function validate(commission: number, blocked: boolean, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function validate(commission: number, blocked: boolean, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| ---------- | ------------- | -------- | ----------------------------------------------------- | -| commission | number | false | how much validator charge nominators in 0 - 100 range | -| blocked | boolean | false | whether or not this validator accepts nominations | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| ---------- | ------------------ | -------- | ------------------------------------------------------------ | +| commission | number | false | how much validator charge nominators in 0 - 100 range | +| blocked | boolean | false | whether or not this validator accepts nominations | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1071,20 +1071,20 @@ Origin Level: Signed ### Interface ```js -function create(amount: BN, root: string, nominator: string, bouncer: string, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function create(amount: BN, root: string, nominator: string, bouncer: string, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | -------------------------------------------------- | -| amount | BN | false | The amount of funds to delegate to the pool | -| root | string | false | The account to set as [`PoolRoles::root`] | -| nominator | string | false | The account to set as the [`PoolRoles::nominator`] | -| bouncer | string | false | The account to set as the [`PoolRoles::bouncer`] | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| amount | BN | false | The amount of funds to delegate to the pool | +| root | string | false | The account to set as [`PoolRoles::root`] | +| nominator | string | false | The account to set as the [`PoolRoles::nominator`] | +| bouncer | string | false | The account to set as the [`PoolRoles::bouncer`] | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1153,21 +1153,21 @@ Origin Level: Signed ### Interface ```js -function createWithPoolId(amount: BN, root: string, nominator: string, bouncer: string, poolId: number, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function createWithPoolId(amount: BN, root: string, nominator: string, bouncer: string, poolId: number, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | -------------------------------------------------- | -| amount | BN | false | The amount of funds to delegate to the pool | -| root | string | false | The account to set as [`PoolRoles::root`] | -| nominator | string | false | The account to set as the [`PoolRoles::nominator`] | -| bouncer | string | false | The account to set as the [`PoolRoles::bouncer`] | -| poolId | number | false | pool id | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| amount | BN | false | The amount of funds to delegate to the pool | +| root | string | false | The account to set as [`PoolRoles::root`] | +| nominator | string | false | The account to set as the [`PoolRoles::nominator`] | +| bouncer | string | false | The account to set as the [`PoolRoles::bouncer`] | +| poolId | number | false | pool id | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1245,18 +1245,18 @@ Origin Level: Signed ### Interface ```js -function join(amount: BN, poolId: number, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function join(amount: BN, poolId: number, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| amount | BN | false | The amount of funds to delegate to the pool | -| poolId | number | false | pool id | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| amount | BN | false | The amount of funds to delegate to the pool | +| poolId | number | false | pool id | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1318,18 +1318,18 @@ Origin Level: Signed ### Interface ```js -function nominate(poolId: number, validators: string[], waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function nominate(poolId: number, validators: string[], waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| ---------- | ------------- | -------- | ----------------------------------------------- | -| poolId | number | false | pool id | -| validators | string[] | false | list of validators to nominate | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| ---------- | ------------------ | -------- | ------------------------------------------------------------ | +| poolId | number | false | pool id | +| validators | string[] | false | list of validators to nominate | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1388,17 +1388,17 @@ Origin Level: Signed ### Interface ```js -function bondExtra(extra: BondExtra, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function bondExtra(extra: BondExtra, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ------------------------------------------------------------------------------------------------------ | -| extra | BondExtra | false | Additional funds can come from either the free balance of the account, of from the accumulated rewards | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------------------------------------------------ | +| extra | BondExtra | false | Additional funds can come from either the free balance of the account, of from the accumulated rewards | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1460,18 +1460,18 @@ Origin Level: Signed ### Interface ```js -function setMetadata(poolId: number, metadata: string, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function setMetadata(poolId: number, metadata: string, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| poolId | number | false | pool id | -| metadata | string | false | metadata | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| poolId | number | false | pool id | +| metadata | string | false | metadata | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1527,18 +1527,18 @@ Origin Level: Signed ### Interface ```js -function unbond(memberAccount: string, unbondingPoints: BN, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function unbond(memberAccount: string, unbondingPoints: BN, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------------- | ------------- | -------- | ----------------------------------------------- | -| memberAccount | string | false | member account | -| unbondingPoints | BN | false | defines how many tokens will be unbond | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------------- | ------------------ | -------- | ------------------------------------------------------------ | +| memberAccount | string | false | member account | +| unbondingPoints | BN | false | defines how many tokens will be unbond | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1601,17 +1601,17 @@ Origin Level: Signed ### Interface ```js -function chill(poolId: number, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function chill(poolId: number, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| poolId | number | false | pool id | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| poolId | number | false | pool id | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1666,17 +1666,17 @@ Origin Level: Signed ### Interface ```js -function setClaimPermission(permission: ClaimPermission, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function setClaimPermission(permission: ClaimPermission, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| ---------- | --------------- | -------- | ----------------------------------------------- | -| permission | ClaimPermission | false | permission type | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| ---------- | ------------------ | -------- | ------------------------------------------------------------ | +| permission | ClaimPermission | false | permission type | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1731,17 +1731,17 @@ Origin Level: Signed ### Interface ```js -function claimCommission(poolId: number, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function claimCommission(poolId: number, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| poolId | number | false | pool id | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| poolId | number | false | pool id | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1800,16 +1800,16 @@ Origin Level: Signed ### Interface ```js -function claimPayout(waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function claimPayout(waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1868,17 +1868,17 @@ Origin Level: Signed ### Interface ```js -function claimPayoutOther(other: string, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function claimPayoutOther(other: string, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| other | &str | false | other account to claim payout | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| other | &str | false | other account to claim payout | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -1938,7 +1938,7 @@ Origin Level: Signed ### Interface ```js -function setCommission(poolId: number, newCommission: NewCommission | null, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function setCommission(poolId: number, newCommission: NewCommission | null, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters @@ -1949,7 +1949,7 @@ function setCommission(poolId: number, newCommission: NewCommission | null, wait | newCommission | NewCommission or Null | false | if empty it removes the existing commission otherwise it sets it | | waitFor | WaitFor | false | wait for block inclusion or finalization | | account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -2009,18 +2009,18 @@ Origin Level: Signed ### Interface ```js -function withdrawUnbonded(memberAccount: string, numSlashingSpans: number, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function withdrawUnbonded(memberAccount: string, numSlashingSpans: number, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| ---------------- | ------------- | -------- | ----------------------------------------------- | -| memberAccount | string | false | member account | -| numSlashingSpans | number | false | number of slashing spans | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| ---------------- | ------------------ | -------- | ------------------------------------------------------------ | +| memberAccount | string | false | member account | +| numSlashingSpans | number | false | number of slashing spans | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example @@ -2087,18 +2087,18 @@ Origin Level: Signed ### Interface ```js -function setState(poolId: number, state: PoolState, waitFor: WaitFor, account: KeyringPair, options?: Partial): Promise; +function setState(poolId: number, state: PoolState, waitFor: WaitFor, account: KeyringPair, options?: TransactionOptions): Promise; ``` #### Parameters -| parameter | type | optional | description | -| --------- | ------------- | -------- | ----------------------------------------------- | -| poolId | number | false | pool id | -| state | PoolState | false | "Open" or "Blocked" or "Destroying" | -| waitFor | WaitFor | false | wait for block inclusion or finalization | -| account | KeyringPair | false | account that will send and sign the transaction | -| options | SignerOptions | true | used to overwrite existing signer options | +| parameter | type | optional | description | +| --------- | ------------------ | -------- | ------------------------------------------------------------ | +| poolId | number | false | pool id | +| state | PoolState | false | "Open" or "Blocked" or "Destroying" | +| waitFor | WaitFor | false | wait for block inclusion or finalization | +| account | KeyringPair | false | account that will send and sign the transaction | +| options | TransactionOptions | true | an be used to set nonce, app id or other transaction options | ### Minimal Example diff --git a/avail-js/docs/extrinsics/da_submit_data.ts b/avail-js/docs/extrinsics/da_submit_data.ts index 41e14b894..fa01fff4c 100644 --- a/avail-js/docs/extrinsics/da_submit_data.ts +++ b/avail-js/docs/extrinsics/da_submit_data.ts @@ -1,4 +1,4 @@ -import { SDK, WaitFor, Keyring } from "avail-js-sdk" +import { SDK, WaitFor, Keyring, TransactionOptions } from "avail-js-sdk" const main = async () => { const providerEndpoint = "ws://127.0.0.1:9944" @@ -8,7 +8,8 @@ const main = async () => { const account = new Keyring({ type: "sr25519" }).addFromUri("//Alice") const data = "My Awesome Data" - const result = await sdk.tx.dataAvailability.submitData(data, WaitFor.BlockInclusion, account) + const options: TransactionOptions = { app_id: 1 } + const result = await sdk.tx.dataAvailability.submitData(data, WaitFor.BlockInclusion, account, options) if (result.isErr) { console.log(result.reason) process.exit(1) diff --git a/avail-js/docs/package-lock.json b/avail-js/docs/package-lock.json index 4de10b806..192b4604c 100644 --- a/avail-js/docs/package-lock.json +++ b/avail-js/docs/package-lock.json @@ -8,7 +8,7 @@ "name": "avail-js-docs", "version": "0.0.1", "dependencies": { - "avail-js-sdk": "^0.2.18" + "avail-js-sdk": "^0.3.0" } }, "node_modules/@noble/curves": { @@ -645,9 +645,9 @@ } }, "node_modules/avail-js-sdk": { - "version": "0.2.18", - "resolved": "https://registry.npmjs.org/avail-js-sdk/-/avail-js-sdk-0.2.18.tgz", - "integrity": "sha512-omVaiJhy4RwRBwvcOgtCIxlOhZmUhDq0uJfrOVZjbaY/9yHr6Crh9W/S6FsZXrUaQYK3yOV+17xKhuzFz51SeA==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/avail-js-sdk/-/avail-js-sdk-0.3.0.tgz", + "integrity": "sha512-xZrqRC5xOeFbIaQIaOmF48UtO0qPxEsK15uX2gYm/iDJnXUaiaj+J5ChuTerNLHFzigF/OALRlKXVwRxhOmUPA==", "dependencies": { "@polkadot/api": "^10.11.3", "neverthrow": "^7.0.0" diff --git a/avail-js/docs/package.json b/avail-js/docs/package.json index 288b2c7b2..35bd4129d 100644 --- a/avail-js/docs/package.json +++ b/avail-js/docs/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Shows a basic usage of the Avail-js SDK", "dependencies": { - "avail-js-sdk": "^0.2.18" + "avail-js-sdk": "^0.3.0" }, "resolutions": { "ws": ">=8.17.1" diff --git a/avail-js/examples/next-example/package-lock.json b/avail-js/examples/next-example/package-lock.json index 19ef7e69f..baa9fdb5c 100644 --- a/avail-js/examples/next-example/package-lock.json +++ b/avail-js/examples/next-example/package-lock.json @@ -14,7 +14,7 @@ "@types/react": "18.2.67", "@types/react-dom": "18.2.22", "autoprefixer": "10.4.18", - "avail-js-sdk": "^0.2.18", + "avail-js-sdk": "^0.3.0", "eslint": "8.57.0", "eslint-config-next": "14.1.4", "next": "^14.2.12", @@ -1564,9 +1564,9 @@ } }, "node_modules/avail-js-sdk": { - "version": "0.2.18", - "resolved": "https://registry.npmjs.org/avail-js-sdk/-/avail-js-sdk-0.2.18.tgz", - "integrity": "sha512-omVaiJhy4RwRBwvcOgtCIxlOhZmUhDq0uJfrOVZjbaY/9yHr6Crh9W/S6FsZXrUaQYK3yOV+17xKhuzFz51SeA==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/avail-js-sdk/-/avail-js-sdk-0.3.0.tgz", + "integrity": "sha512-xZrqRC5xOeFbIaQIaOmF48UtO0qPxEsK15uX2gYm/iDJnXUaiaj+J5ChuTerNLHFzigF/OALRlKXVwRxhOmUPA==", "dependencies": { "@polkadot/api": "^10.11.3", "neverthrow": "^7.0.0" diff --git a/avail-js/examples/next-example/package.json b/avail-js/examples/next-example/package.json index c0f5980c3..bf0bbd56a 100644 --- a/avail-js/examples/next-example/package.json +++ b/avail-js/examples/next-example/package.json @@ -15,7 +15,7 @@ "@types/react": "18.2.67", "@types/react-dom": "18.2.22", "autoprefixer": "10.4.18", - "avail-js-sdk": "^0.2.18", + "avail-js-sdk": "^0.3.0", "eslint": "8.57.0", "eslint-config-next": "14.1.4", "next": "^14.2.12", diff --git a/avail-js/examples/node-examples/package-lock.json b/avail-js/examples/node-examples/package-lock.json index c026fed96..7891ca606 100644 --- a/avail-js/examples/node-examples/package-lock.json +++ b/avail-js/examples/node-examples/package-lock.json @@ -8,7 +8,7 @@ "name": "node-examples", "version": "0.0.1", "dependencies": { - "avail-js-sdk": "^0.2.18", + "avail-js-sdk": "^0.3.0", "ethers": "^6.13.2" }, "devDependencies": { @@ -709,9 +709,9 @@ } }, "node_modules/avail-js-sdk": { - "version": "0.2.18", - "resolved": "https://registry.npmjs.org/avail-js-sdk/-/avail-js-sdk-0.2.18.tgz", - "integrity": "sha512-omVaiJhy4RwRBwvcOgtCIxlOhZmUhDq0uJfrOVZjbaY/9yHr6Crh9W/S6FsZXrUaQYK3yOV+17xKhuzFz51SeA==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/avail-js-sdk/-/avail-js-sdk-0.3.0.tgz", + "integrity": "sha512-xZrqRC5xOeFbIaQIaOmF48UtO0qPxEsK15uX2gYm/iDJnXUaiaj+J5ChuTerNLHFzigF/OALRlKXVwRxhOmUPA==", "dependencies": { "@polkadot/api": "^10.11.3", "neverthrow": "^7.0.0" diff --git a/avail-js/examples/node-examples/package.json b/avail-js/examples/node-examples/package.json index 3b34ca4ac..b3a55ffef 100644 --- a/avail-js/examples/node-examples/package.json +++ b/avail-js/examples/node-examples/package.json @@ -24,7 +24,7 @@ "validium": "npm run build && node build/node-examples/src/validium.js" }, "dependencies": { - "avail-js-sdk": "^0.2.18", + "avail-js-sdk": "^0.3.0", "ethers": "^6.13.2" }, "devDependencies": { diff --git a/avail-js/package-lock.json b/avail-js/package-lock.json index 9087c1e43..2b19b1e83 100644 --- a/avail-js/package-lock.json +++ b/avail-js/package-lock.json @@ -1,12 +1,12 @@ { "name": "avail-js-sdk", - "version": "0.2.17", + "version": "0.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "avail-js-sdk", - "version": "0.2.17", + "version": "0.3.0", "license": "ISC", "dependencies": { "@polkadot/api": "^10.11.3", diff --git a/avail-js/package.json b/avail-js/package.json index bb1589b7c..ce65bc784 100644 --- a/avail-js/package.json +++ b/avail-js/package.json @@ -1,6 +1,6 @@ { "name": "avail-js-sdk", - "version": "0.2.18", + "version": "0.3.0", "description": "Avail library of functions to interact with blockchain and manipulate transactions", "main": "./build/index.js", "scripts": { diff --git a/avail-js/src/sdk/index.ts b/avail-js/src/sdk/index.ts index a06ac9425..9be68a4eb 100644 --- a/avail-js/src/sdk/index.ts +++ b/avail-js/src/sdk/index.ts @@ -16,6 +16,7 @@ export { ClaimPermission, NewCommission, PoolState, + TransactionOptions, } from "./transactions" export class SDK { diff --git a/avail-js/src/sdk/transactions/balances.ts b/avail-js/src/sdk/transactions/balances.ts index 2112b3db4..813dd7943 100644 --- a/avail-js/src/sdk/transactions/balances.ts +++ b/avail-js/src/sdk/transactions/balances.ts @@ -5,9 +5,8 @@ import { BN } from "@polkadot/util" import { KeyringPair } from "@polkadot/keyring/types" import { err, Result } from "neverthrow" -import { SignerOptions } from "@polkadot/api/types" import { decodeError } from "../../helpers" -import { WaitFor, GenericFailure, standardCallback, getBlockHashAndTxHash } from "./common" +import { WaitFor, GenericFailure, standardCallback, getBlockHashAndTxHash, TransactionOptions } from "./common" type TransferKeepAliveTxSuccess = { isErr: false @@ -51,7 +50,7 @@ export class Balances { keepAlive: boolean, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -96,7 +95,7 @@ export class Balances { value: BN, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -150,7 +149,7 @@ export class Balances { value: BN, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { diff --git a/avail-js/src/sdk/transactions/common.ts b/avail-js/src/sdk/transactions/common.ts index 4383b968d..0eee953c7 100644 --- a/avail-js/src/sdk/transactions/common.ts +++ b/avail-js/src/sdk/transactions/common.ts @@ -47,3 +47,10 @@ export async function getBlockHashAndTxHash( } export type GenericFailure = { isErr: true; reason: string } + +export interface TransactionOptions { + app_id?: number + nonce?: number + era?: number + blockHash?: H256 +} diff --git a/avail-js/src/sdk/transactions/da.ts b/avail-js/src/sdk/transactions/da.ts index bfa48cacc..8a04563f1 100644 --- a/avail-js/src/sdk/transactions/da.ts +++ b/avail-js/src/sdk/transactions/da.ts @@ -4,11 +4,9 @@ import { H256, EventRecord } from "@polkadot/types/interfaces/types" import { BN } from "@polkadot/util" import { KeyringPair } from "@polkadot/keyring/types" import { err, Result } from "neverthrow" - import * as TransactionData from "./../transaction_data" -import { SignerOptions } from "@polkadot/api/types" import { decodeError, fromHexToAscii } from "../../helpers" -import { WaitFor, GenericFailure, standardCallback, getBlockHashAndTxHash } from "./common" +import { WaitFor, GenericFailure, standardCallback, getBlockHashAndTxHash, TransactionOptions } from "./common" export type DispatchFeeModifier = { weightMaximumFee: BN | null @@ -74,7 +72,7 @@ export class DataAvailability { data: string, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -131,7 +129,7 @@ export class DataAvailability { key: string, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -175,7 +173,7 @@ export class DataAvailability { newKey: string, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -230,7 +228,7 @@ export class DataAvailability { cols: number, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -292,7 +290,7 @@ export class DataAvailability { modifier: DispatchFeeModifier, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { diff --git a/avail-js/src/sdk/transactions/index.ts b/avail-js/src/sdk/transactions/index.ts index 67223e244..284524e9b 100644 --- a/avail-js/src/sdk/transactions/index.ts +++ b/avail-js/src/sdk/transactions/index.ts @@ -4,7 +4,7 @@ import { Staking } from "./staking" import { DataAvailability } from "./da" import { NominationPools } from "./nomination_pools" -export { WaitFor } from "./common" +export { WaitFor, TransactionOptions } from "./common" export { DispatchFeeModifier } from "./da" export { StakingRewardDestination } from "./staking" export { BondExtra, ClaimPermission, NewCommission, PoolState } from "./nomination_pools" diff --git a/avail-js/src/sdk/transactions/nomination_pools.ts b/avail-js/src/sdk/transactions/nomination_pools.ts index 5d6947e80..c56bd5d8d 100644 --- a/avail-js/src/sdk/transactions/nomination_pools.ts +++ b/avail-js/src/sdk/transactions/nomination_pools.ts @@ -4,10 +4,8 @@ import { H256, EventRecord } from "@polkadot/types/interfaces/types" import { BN } from "@polkadot/util" import { KeyringPair } from "@polkadot/keyring/types" import { err, Result } from "neverthrow" - -import { SignerOptions } from "@polkadot/api/types" import { decodeError } from "../../helpers" -import { WaitFor, GenericFailure, standardCallback, getBlockHashAndTxHash } from "./common" +import { WaitFor, GenericFailure, standardCallback, getBlockHashAndTxHash, TransactionOptions } from "./common" import { commissionNumberToPerbill } from "../utils" export interface BondExtra { @@ -185,7 +183,7 @@ export class NominationPools { bouncer: string, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -237,7 +235,7 @@ export class NominationPools { poolId: number, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -295,7 +293,7 @@ export class NominationPools { poolId: number, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -339,7 +337,7 @@ export class NominationPools { validators: string[], waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -377,7 +375,7 @@ export class NominationPools { extra: BondExtra, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -421,7 +419,7 @@ export class NominationPools { metadata: string, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -460,7 +458,7 @@ export class NominationPools { unbondingPoints: BN, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -499,7 +497,7 @@ export class NominationPools { poolId: number, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -537,7 +535,7 @@ export class NominationPools { poolId: number, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -579,7 +577,7 @@ export class NominationPools { async claimPayout( waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -618,7 +616,7 @@ export class NominationPools { other: string, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -657,7 +655,7 @@ export class NominationPools { permission: ClaimPermission, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -696,7 +694,7 @@ export class NominationPools { newCommission: NewCommission | null, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} @@ -749,7 +747,7 @@ export class NominationPools { numSlashingSpans: number, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -793,7 +791,7 @@ export class NominationPools { state: PoolState, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { diff --git a/avail-js/src/sdk/transactions/staking.ts b/avail-js/src/sdk/transactions/staking.ts index 3719f0195..8cb40c976 100644 --- a/avail-js/src/sdk/transactions/staking.ts +++ b/avail-js/src/sdk/transactions/staking.ts @@ -4,11 +4,9 @@ import { H256, EventRecord } from "@polkadot/types/interfaces/types" import { BN } from "@polkadot/util" import { KeyringPair } from "@polkadot/keyring/types" import { err, Result } from "neverthrow" - import * as TransactionData from "./../transaction_data" -import { SignerOptions } from "@polkadot/api/types" import { decodeError } from "../../helpers" -import { WaitFor, GenericFailure, standardCallback, getBlockHashAndTxHash } from "./common" +import { WaitFor, GenericFailure, standardCallback, getBlockHashAndTxHash, TransactionOptions } from "./common" import { commissionNumberToPerbill } from "../utils" type ValidatorPerfs = { commission: string; blocked: boolean } @@ -90,7 +88,7 @@ export class Staking { payee: StakingRewardDestination, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -133,7 +131,7 @@ export class Staking { maxAdditional: BN, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -175,7 +173,7 @@ export class Staking { async chill( waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -218,7 +216,7 @@ export class Staking { stash: string, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -261,7 +259,7 @@ export class Staking { targets: string[], waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -312,7 +310,7 @@ export class Staking { value: BN, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const optionWrapper = options || {} const maybeTxResult = await new Promise>((res, _) => { @@ -356,7 +354,7 @@ export class Staking { blocked: boolean, waitFor: WaitFor, account: KeyringPair, - options?: Partial, + options?: TransactionOptions, ): Promise { const maybeCommission = commissionNumberToPerbill(commission) if (maybeCommission.isErr()) {