@polkadot/api-base 11.3.1 → 12.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/packageInfo.js +1 -1
- package/package.json +3 -3
- package/packageInfo.js +1 -1
- package/types/submittable.d.ts +20 -0
package/cjs/packageInfo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageInfo = void 0;
|
|
4
|
-
exports.packageInfo = { name: '@polkadot/api-base', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '
|
|
4
|
+
exports.packageInfo = { name: '@polkadot/api-base', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '12.0.2' };
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"./cjs/packageDetect.js"
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
|
-
"version": "
|
|
21
|
+
"version": "12.0.2",
|
|
22
22
|
"main": "./cjs/index.js",
|
|
23
23
|
"module": "./index.js",
|
|
24
24
|
"types": "./index.d.ts",
|
|
@@ -127,8 +127,8 @@
|
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
"dependencies": {
|
|
130
|
-
"@polkadot/rpc-core": "
|
|
131
|
-
"@polkadot/types": "
|
|
130
|
+
"@polkadot/rpc-core": "12.0.2",
|
|
131
|
+
"@polkadot/types": "12.0.2",
|
|
132
132
|
"@polkadot/util": "^12.6.2",
|
|
133
133
|
"rxjs": "^7.8.1",
|
|
134
134
|
"tslib": "^2.6.2"
|
package/packageInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageInfo = { name: '@polkadot/api-base', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '
|
|
1
|
+
export const packageInfo = { name: '@polkadot/api-base', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '12.0.2' };
|
package/types/submittable.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface SignerOptions {
|
|
|
13
13
|
assetId?: AnyNumber | object;
|
|
14
14
|
mode?: AnyNumber;
|
|
15
15
|
metadataHash?: AnyU8a;
|
|
16
|
+
withSignedTransaction?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export type SubmittableDryRunResult<ApiType extends ApiTypes> = ApiType extends 'rxjs' ? Observable<ApplyExtrinsicResult> : Promise<ApplyExtrinsicResult>;
|
|
18
19
|
export type SubmittableResultResult<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> = ApiType extends 'rxjs' ? Observable<R> : Promise<Hash>;
|
|
@@ -37,7 +38,26 @@ export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmi
|
|
|
37
38
|
paymentInfo(account: AddressOrPair, options?: Partial<SignerOptions>): SubmittablePaymentResult<ApiType>;
|
|
38
39
|
send(): SubmittableResultResult<ApiType>;
|
|
39
40
|
send(statusCb: Callback<R>): SubmittableResultSubscription<ApiType, R>;
|
|
41
|
+
/**
|
|
42
|
+
* @description Sign and broadcast the constructued transaction.
|
|
43
|
+
*
|
|
44
|
+
* Note for injected signers:
|
|
45
|
+
* As of v12.0.2 and up the `SignerResult` return type for `signPayload` allows for the `signedTransaction` field.
|
|
46
|
+
* This allows the signer to input a signed transaction that will modify the payload. This
|
|
47
|
+
* The api will ensure that the Call Data is not changed. This allows for the signer to modify the payload to add
|
|
48
|
+
* things like `mode`, and `metadataHash` for signedExtensions such as `CheckMetadataHash`.
|
|
49
|
+
*/
|
|
40
50
|
signAsync(account: AddressOrPair, _options?: Partial<SignerOptions>): PromiseOrObs<ApiType, this>;
|
|
51
|
+
/**
|
|
52
|
+
* @description Sign and broadcast the constructued transaction.
|
|
53
|
+
*
|
|
54
|
+
* Note for injected signers:
|
|
55
|
+
* As of v12.0.1 and up the `SignerResult` return type for `signPayload` allows for the `signedTransaction` field.
|
|
56
|
+
* This allows the signer to input a signed transaction that will be directly broadcasted. This
|
|
57
|
+
* bypasses the api adding the signature to the payload. The api will ensure that the Call Data is not changed before it broadcasts the
|
|
58
|
+
* transaction. This allows for the signer to modify the payload to add things like `mode`, and `metadataHash` for
|
|
59
|
+
* signedExtensions such as `CheckMetadataHash`.
|
|
60
|
+
*/
|
|
41
61
|
signAndSend(account: AddressOrPair, options?: Partial<SignerOptions>): SubmittableResultResult<ApiType, R>;
|
|
42
62
|
signAndSend(account: AddressOrPair, statusCb: Callback<R>): SubmittableResultSubscription<ApiType>;
|
|
43
63
|
signAndSend(account: AddressOrPair, options: Partial<SignerOptions>, statusCb?: Callback<R>): SubmittableResultSubscription<ApiType, R>;
|