@polkadot/api-base 9.6.2 → 9.8.1
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/bundle.js +1 -1
- package/cjs/detectOther.js +1 -1
- package/cjs/packageInfo.js +1 -1
- package/detectOther.js +1 -1
- package/index.js +1 -1
- package/package.json +5 -5
- package/packageInfo.js +1 -1
- package/types/calls.d.ts +1 -0
- package/types/rpc.d.ts +3 -2
- package/types/submittable.d.ts +4 -0
package/bundle.js
CHANGED
package/cjs/detectOther.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _packageInfo = require("@polkadot/rpc-core/cjs/packageInfo");
|
|
8
8
|
var _packageInfo2 = require("@polkadot/types/cjs/packageInfo");
|
|
9
|
-
// Copyright 2017-2022 @polkadot/api-
|
|
9
|
+
// Copyright 2017-2022 @polkadot/api-base authors & contributors
|
|
10
10
|
// SPDX-License-Identifier: Apache-2.0
|
|
11
11
|
var _default = [_packageInfo.packageInfo, _packageInfo2.packageInfo];
|
|
12
12
|
exports.default = _default;
|
package/cjs/packageInfo.js
CHANGED
package/detectOther.js
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"./cjs/detectPackage.js"
|
|
21
21
|
],
|
|
22
22
|
"type": "module",
|
|
23
|
-
"version": "9.
|
|
23
|
+
"version": "9.8.1",
|
|
24
24
|
"main": "./cjs/index.js",
|
|
25
25
|
"module": "./index.js",
|
|
26
26
|
"types": "./index.d.ts",
|
|
@@ -115,10 +115,10 @@
|
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
"dependencies": {
|
|
118
|
-
"@babel/runtime": "^7.20.
|
|
119
|
-
"@polkadot/rpc-core": "9.
|
|
120
|
-
"@polkadot/types": "9.
|
|
121
|
-
"@polkadot/util": "^10.1.
|
|
118
|
+
"@babel/runtime": "^7.20.1",
|
|
119
|
+
"@polkadot/rpc-core": "9.8.1",
|
|
120
|
+
"@polkadot/types": "9.8.1",
|
|
121
|
+
"@polkadot/util": "^10.1.12",
|
|
122
122
|
"rxjs": "^7.5.7"
|
|
123
123
|
}
|
|
124
124
|
}
|
package/packageInfo.js
CHANGED
|
@@ -7,5 +7,5 @@ export const packageInfo = {
|
|
|
7
7
|
name: '@polkadot/api-base',
|
|
8
8
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
9
9
|
type: 'esm',
|
|
10
|
-
version: '9.
|
|
10
|
+
version: '9.8.1'
|
|
11
11
|
};
|
package/types/calls.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { AnyFunction, Codec, DefinitionCallNamed } from '@polkadot/types/ty
|
|
|
3
3
|
import type { ApiTypes, ReturnCodec } from './base';
|
|
4
4
|
export declare type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = ApiType extends 'rxjs' ? <T extends Codec | any = ReturnCodec<F>>(...args: Parameters<F>) => Observable<T> : <T extends Codec | any = ReturnCodec<F>>(...args: Parameters<F>) => Promise<T>;
|
|
5
5
|
export declare type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = DecoratedCallBase<ApiType, F> & {
|
|
6
|
+
/** The metadata/description/definition for this method */
|
|
6
7
|
meta: DefinitionCallNamed;
|
|
7
8
|
};
|
|
8
9
|
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
package/types/rpc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Observable } from 'rxjs';
|
|
2
|
-
import type { AnyFunction, Callback, DefinitionRpc } from '@polkadot/types/types';
|
|
2
|
+
import type { AnyFunction, AnyJson, Callback, DefinitionRpc } from '@polkadot/types/types';
|
|
3
3
|
import { ApiTypes, PromiseResult, Push, RxResult, UnsubscribePromise } from './base';
|
|
4
4
|
export type { AugmentedRpc } from '@polkadot/rpc-core/types';
|
|
5
5
|
export interface RxRpcResult<F extends AnyFunction> extends RxResult<F> {
|
|
@@ -15,6 +15,7 @@ export declare type RpcMethodResult<ApiType extends ApiTypes, F extends AnyFunct
|
|
|
15
15
|
export declare type DecoratedRpcSection<ApiType extends ApiTypes, Section> = {
|
|
16
16
|
[M in keyof Section]: Section[M] extends AnyFunction ? RpcMethodResult<ApiType, Section[M]> : never;
|
|
17
17
|
};
|
|
18
|
+
export declare type RawRpcType<ApiType extends ApiTypes> = (method: string, ...params: unknown[]) => ApiType extends 'rxjs' ? Observable<AnyJson> : Promise<AnyJson>;
|
|
18
19
|
export declare type DecoratedRpc<ApiType extends ApiTypes, AllSections> = {
|
|
19
20
|
[S in keyof AllSections]: DecoratedRpcSection<ApiType, AllSections[S]>;
|
|
20
|
-
}
|
|
21
|
+
} & RawRpcType<ApiType>;
|
package/types/submittable.d.ts
CHANGED
|
@@ -26,6 +26,10 @@ export interface SubmittableResultValue {
|
|
|
26
26
|
txIndex?: number;
|
|
27
27
|
}
|
|
28
28
|
export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> extends Extrinsic {
|
|
29
|
+
/** true if api.rpc.system.dryRun is available, enabling dryRun(...) */
|
|
30
|
+
hasDryRun: boolean;
|
|
31
|
+
/** true if api.call.transactionPaymentApi.queryInfo is available, enabling paymentInfo(...) */
|
|
32
|
+
hasPaymentInfo: boolean;
|
|
29
33
|
dryRun(account: AddressOrPair, options?: Partial<SignerOptions>): SubmittableDryRunResult<ApiType>;
|
|
30
34
|
paymentInfo(account: AddressOrPair, options?: Partial<SignerOptions>): SubmittablePaymentResult<ApiType>;
|
|
31
35
|
send(): SubmittableResultResult<ApiType>;
|