@dedot/api 0.15.2 → 0.15.3-next.65898ecf.10
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/chaintypes/substrate/index.d.ts +21 -1
- package/chaintypes/substrate/index.js +0 -1
- package/cjs/chaintypes/substrate/index.js +0 -1
- package/cjs/client/DedotClient.js +39 -6
- package/cjs/executor/Executor.js +1 -0
- package/cjs/executor/v2/StorageQueryExecutorV2.js +1 -3
- package/cjs/executor/v2/TxExecutorV2.js +5 -3
- package/cjs/json-rpc/group/Archive.js +226 -0
- package/cjs/json-rpc/group/ChainHead/ChainHead.js +121 -44
- package/cjs/json-rpc/group/ChainHead/error.js +5 -0
- package/cjs/json-rpc/group/index.js +1 -0
- package/cjs/json-rpc/subscriptionsInfo.js +4 -0
- package/cjs/storage/LegacyStorageQuery.js +5 -0
- package/cjs/storage/NewStorageQuery.js +5 -0
- package/client/BaseSubstrateClient.d.ts +3 -3
- package/client/DedotClient.d.ts +6 -4
- package/client/DedotClient.js +42 -9
- package/client/LegacyClient.d.ts +2 -2
- package/executor/Executor.d.ts +5 -5
- package/executor/Executor.js +1 -0
- package/executor/StorageQueryExecutor.d.ts +2 -2
- package/executor/v2/RuntimeApiExecutorV2.d.ts +2 -2
- package/executor/v2/StorageQueryExecutorV2.d.ts +4 -4
- package/executor/v2/StorageQueryExecutorV2.js +1 -3
- package/executor/v2/TxExecutorV2.d.ts +2 -1
- package/executor/v2/TxExecutorV2.js +5 -3
- package/executor/v2/ViewFunctionExecutorV2.d.ts +2 -2
- package/extrinsic/extensions/SignedExtension.d.ts +3 -3
- package/extrinsic/submittable/BaseSubmittableExtrinsic.d.ts +2 -2
- package/extrinsic/submittable/SubmittableExtrinsicV2.d.ts +2 -2
- package/json-rpc/group/Archive.d.ts +134 -0
- package/json-rpc/group/Archive.js +222 -0
- package/json-rpc/group/ChainHead/ChainHead.d.ts +10 -0
- package/json-rpc/group/ChainHead/ChainHead.js +121 -44
- package/json-rpc/group/ChainHead/error.d.ts +3 -0
- package/json-rpc/group/ChainHead/error.js +5 -0
- package/json-rpc/group/index.d.ts +1 -0
- package/json-rpc/group/index.js +1 -0
- package/json-rpc/subscriptionsInfo.js +4 -0
- package/package.json +9 -9
- package/storage/BaseStorageQuery.d.ts +5 -6
- package/storage/LegacyStorageQuery.d.ts +4 -3
- package/storage/LegacyStorageQuery.js +5 -0
- package/storage/NewStorageQuery.d.ts +5 -4
- package/storage/NewStorageQuery.js +5 -0
- package/storage/QueryableStorage.d.ts +2 -2
- package/types.d.ts +10 -5
|
@@ -13,6 +13,11 @@ import { BaseStorageQuery } from './BaseStorageQuery.js';
|
|
|
13
13
|
* - Efficient change detection for subscriptions
|
|
14
14
|
*/
|
|
15
15
|
export class NewStorageQuery extends BaseStorageQuery {
|
|
16
|
+
client;
|
|
17
|
+
constructor(client) {
|
|
18
|
+
super(client);
|
|
19
|
+
this.client = client;
|
|
20
|
+
}
|
|
16
21
|
/**
|
|
17
22
|
* Query multiple storage items in a single call using chainHead_storage
|
|
18
23
|
*
|
|
@@ -5,12 +5,12 @@ import { PortableRegistry, PalletDefLatest, StorageDataLike, StorageEntryLatest,
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class QueryableStorage {
|
|
7
7
|
#private;
|
|
8
|
-
readonly registry: PortableRegistry
|
|
8
|
+
readonly registry: PortableRegistry<any>;
|
|
9
9
|
readonly palletName: string;
|
|
10
10
|
readonly storageItem: string;
|
|
11
11
|
readonly pallet: PalletDefLatest;
|
|
12
12
|
readonly storageEntry: StorageEntryLatest;
|
|
13
|
-
constructor(registry: PortableRegistry
|
|
13
|
+
constructor(registry: PortableRegistry<any>, palletName: string, storageItem: string);
|
|
14
14
|
get prefixKey(): PrefixedStorageKey;
|
|
15
15
|
get prefixKeyAsU8a(): Uint8Array;
|
|
16
16
|
/**
|
package/types.d.ts
CHANGED
|
@@ -83,16 +83,15 @@ export interface IJsonRpcClient<ChainApi extends GenericSubstrateApi = GenericSu
|
|
|
83
83
|
rpc: ChainApi['rpc'];
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* @internal
|
|
87
87
|
*/
|
|
88
|
-
export interface
|
|
89
|
-
atBlockHash?: BlockHash;
|
|
88
|
+
export interface IGenericSubstrateClient<ChainApi extends GenericSubstrateApi = GenericSubstrateApi> {
|
|
90
89
|
rpcVersion: RpcVersion;
|
|
91
90
|
options: ApiOptions;
|
|
92
91
|
genesisHash: Hash;
|
|
93
92
|
runtimeVersion: SubstrateRuntimeVersion;
|
|
94
93
|
metadata: Metadata;
|
|
95
|
-
registry: PortableRegistry
|
|
94
|
+
registry: PortableRegistry<ChainApi>;
|
|
96
95
|
rpc: ChainApi['rpc'];
|
|
97
96
|
consts: ChainApi['consts'];
|
|
98
97
|
query: ChainApi['query'];
|
|
@@ -101,10 +100,16 @@ export interface ISubstrateClientAt<ChainApi extends GenericSubstrateApi = Gener
|
|
|
101
100
|
errors: ChainApi['errors'];
|
|
102
101
|
view: ChainApi['view'];
|
|
103
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* A generic interface for Substrate clients at a specific block
|
|
105
|
+
*/
|
|
106
|
+
export interface ISubstrateClientAt<ChainApi extends GenericSubstrateApi = GenericSubstrateApi> extends IGenericSubstrateClient<ChainApi> {
|
|
107
|
+
atBlockHash: BlockHash;
|
|
108
|
+
}
|
|
104
109
|
/**
|
|
105
110
|
* A generic interface for Substrate clients
|
|
106
111
|
*/
|
|
107
|
-
export interface ISubstrateClient<ChainApi extends GenericSubstrateApi = GenericSubstrateApi, Events extends string = ApiEvent> extends IJsonRpcClient<ChainApi, Events>,
|
|
112
|
+
export interface ISubstrateClient<ChainApi extends GenericSubstrateApi = GenericSubstrateApi, Events extends string = ApiEvent> extends IJsonRpcClient<ChainApi, Events>, IGenericSubstrateClient<ChainApi> {
|
|
108
113
|
options: ApiOptions;
|
|
109
114
|
tx: ChainApi['tx'];
|
|
110
115
|
at<ChainApiAt extends GenericSubstrateApi = ChainApi>(hash: BlockHash): Promise<ISubstrateClientAt<ChainApiAt>>;
|