@polkadot/api-base 10.1.3 → 10.2.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/cjs/packageInfo.js +1 -1
- package/package.json +4 -4
- package/packageInfo.js +1 -1
- package/types/base.d.ts +3 -1
- package/types/calls.d.ts +2 -2
- package/types/consts.d.ts +3 -3
- package/types/errors.d.ts +3 -3
- package/types/events.d.ts +3 -3
- package/types/storage.d.ts +2 -2
- package/types/submittable.d.ts +2 -2
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: '10.1
|
|
4
|
+
exports.packageInfo = { name: '@polkadot/api-base', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.2.1' };
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"./cjs/detectPackage.js"
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
|
-
"version": "10.1
|
|
21
|
+
"version": "10.2.1",
|
|
22
22
|
"main": "./cjs/index.js",
|
|
23
23
|
"module": "./index.js",
|
|
24
24
|
"types": "./index.d.ts",
|
|
@@ -116,9 +116,9 @@
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@polkadot/rpc-core": "10.1
|
|
120
|
-
"@polkadot/types": "10.1
|
|
121
|
-
"@polkadot/util": "^11.
|
|
119
|
+
"@polkadot/rpc-core": "10.2.1",
|
|
120
|
+
"@polkadot/types": "10.2.1",
|
|
121
|
+
"@polkadot/util": "^11.1.2",
|
|
122
122
|
"rxjs": "^7.8.0",
|
|
123
123
|
"tslib": "^2.5.0"
|
|
124
124
|
}
|
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: '10.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: '10.2.1' };
|
package/types/base.d.ts
CHANGED
|
@@ -28,7 +28,9 @@ export interface PaginationOptions<A = unknown> {
|
|
|
28
28
|
pageSize: number;
|
|
29
29
|
startKey?: string;
|
|
30
30
|
}
|
|
31
|
-
export type DecorateMethod<
|
|
31
|
+
export type DecorateMethod<_ApiType extends ApiTypes, T = any> = <M extends (...args: any[]) => Observable<any>>(method: M, options?: DecorateMethodOptions) => T;
|
|
32
32
|
type AsCodec<R extends Codec | any> = R extends Codec ? R : Codec;
|
|
33
33
|
export type ReturnCodec<F extends AnyFunction> = AsCodec<ObsInnerType<ReturnType<F>>>;
|
|
34
|
+
export interface EmptyBase<_> {
|
|
35
|
+
}
|
|
34
36
|
export {};
|
package/types/calls.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Observable } from 'rxjs';
|
|
2
2
|
import type { AnyFunction, Codec, DefinitionCallNamed } from '@polkadot/types/types';
|
|
3
|
-
import type { ApiTypes, ReturnCodec } from './base.js';
|
|
3
|
+
import type { ApiTypes, EmptyBase, ReturnCodec } from './base.js';
|
|
4
4
|
export 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 type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = DecoratedCallBase<ApiType, F> & {
|
|
6
6
|
/** The metadata/description/definition for this method */
|
|
7
7
|
meta: DefinitionCallNamed;
|
|
8
8
|
};
|
|
9
|
-
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
|
9
|
+
export interface AugmentedCalls<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
|
10
10
|
}
|
|
11
11
|
export interface QueryableCalls<ApiType extends ApiTypes> extends AugmentedCalls<ApiType> {
|
|
12
12
|
[key: string]: QueryableModuleCalls<ApiType>;
|
package/types/consts.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { PalletConstantMetadataLatest } from '@polkadot/types/interfaces';
|
|
2
2
|
import type { Codec } from '@polkadot/types/types';
|
|
3
|
-
import type { ApiTypes } from './base.js';
|
|
4
|
-
export interface AugmentedConst<
|
|
3
|
+
import type { ApiTypes, EmptyBase } from './base.js';
|
|
4
|
+
export interface AugmentedConst<_ extends ApiTypes> {
|
|
5
5
|
meta: PalletConstantMetadataLatest;
|
|
6
6
|
}
|
|
7
|
-
export interface AugmentedConsts<ApiType extends ApiTypes> {
|
|
7
|
+
export interface AugmentedConsts<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
|
8
8
|
}
|
|
9
9
|
export interface QueryableConsts<ApiType extends ApiTypes> extends AugmentedConsts<ApiType> {
|
|
10
10
|
[key: string]: QueryableModuleConsts;
|
package/types/errors.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IsError } from '@polkadot/types/metadata/decorate/types';
|
|
2
|
-
import type { ApiTypes } from './base.js';
|
|
3
|
-
export type AugmentedError<
|
|
4
|
-
export interface AugmentedErrors<ApiType extends ApiTypes> {
|
|
2
|
+
import type { ApiTypes, EmptyBase } from './base.js';
|
|
3
|
+
export type AugmentedError<_ extends ApiTypes> = IsError;
|
|
4
|
+
export interface AugmentedErrors<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
|
5
5
|
}
|
|
6
6
|
export interface DecoratedErrors<ApiType extends ApiTypes> extends AugmentedErrors<ApiType> {
|
|
7
7
|
[key: string]: ModuleErrors<ApiType>;
|
package/types/events.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { IsEvent } from '@polkadot/types/metadata/decorate/types';
|
|
2
2
|
import type { AnyTuple } from '@polkadot/types/types';
|
|
3
|
-
import type { ApiTypes } from './base.js';
|
|
4
|
-
export type AugmentedEvent<
|
|
5
|
-
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
|
3
|
+
import type { ApiTypes, EmptyBase } from './base.js';
|
|
4
|
+
export type AugmentedEvent<_ extends ApiTypes, T extends AnyTuple = AnyTuple, N = unknown> = IsEvent<T, N>;
|
|
5
|
+
export interface AugmentedEvents<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
|
6
6
|
}
|
|
7
7
|
export interface DecoratedEvents<ApiType extends ApiTypes> extends AugmentedEvents<ApiType> {
|
|
8
8
|
[key: string]: ModuleEvents<ApiType>;
|
package/types/storage.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { StorageKey, u64 } from '@polkadot/types';
|
|
|
3
3
|
import type { Hash } from '@polkadot/types/interfaces';
|
|
4
4
|
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
|
5
5
|
import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types';
|
|
6
|
-
import type { ApiTypes, DropLast, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base.js';
|
|
6
|
+
import type { ApiTypes, DropLast, EmptyBase, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base.js';
|
|
7
7
|
interface StorageEntryObservableMulti<R extends Codec = Codec> {
|
|
8
8
|
<T extends Codec = R>(args: (unknown[] | unknown)[]): Observable<T[]>;
|
|
9
9
|
}
|
|
@@ -78,7 +78,7 @@ export type QueryableStorageMulti<ApiType extends ApiTypes> = ApiType extends 'r
|
|
|
78
78
|
export type AugmentedQuery<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> = MethodResult<ApiType, F> & StorageEntryBase<ApiType, F, A>;
|
|
79
79
|
export type AugmentedQueryAt<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> = MethodResult<ApiType, F> & StorageEntryBaseAt<ApiType, F, A>;
|
|
80
80
|
export type AugmentedQueryDoubleMap<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> = AugmentedQuery<ApiType, F, A>;
|
|
81
|
-
export interface AugmentedQueries<ApiType extends ApiTypes> {
|
|
81
|
+
export interface AugmentedQueries<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
|
82
82
|
}
|
|
83
83
|
export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
|
|
84
84
|
[key: string]: QueryableModuleStorage<ApiType>;
|
package/types/submittable.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Observable } from 'rxjs';
|
|
2
2
|
import type { AccountId, Address, ApplyExtrinsicResult, BlockNumber, Call, DispatchError, DispatchInfo, EventRecord, Extrinsic, ExtrinsicStatus, Hash, RuntimeDispatchInfo } from '@polkadot/types/interfaces';
|
|
3
3
|
import type { AnyFunction, AnyNumber, AnyTuple, Callback, CallBase, Codec, IExtrinsicEra, IKeyringPair, ISubmittableResult, Signer } from '@polkadot/types/types';
|
|
4
|
-
import type { ApiTypes, PromiseOrObs } from './base.js';
|
|
4
|
+
import type { ApiTypes, EmptyBase, PromiseOrObs } from './base.js';
|
|
5
5
|
export type AugmentedSubmittable<T extends AnyFunction, A extends AnyTuple = AnyTuple> = T & CallBase<A>;
|
|
6
6
|
export type AddressOrPair = IKeyringPair | string | AccountId | Address;
|
|
7
7
|
export interface SignerOptions {
|
|
@@ -44,7 +44,7 @@ export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmi
|
|
|
44
44
|
export interface SubmittableExtrinsicFunction<ApiType extends ApiTypes, A extends AnyTuple = AnyTuple> extends CallBase<A> {
|
|
45
45
|
(...params: any[]): SubmittableExtrinsic<ApiType>;
|
|
46
46
|
}
|
|
47
|
-
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
|
47
|
+
export interface AugmentedSubmittables<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
|
48
48
|
}
|
|
49
49
|
export interface SubmittableExtrinsics<ApiType extends ApiTypes> extends AugmentedSubmittables<ApiType> {
|
|
50
50
|
(extrinsic: Call | Extrinsic | Uint8Array | string): SubmittableExtrinsic<ApiType>;
|