@dedot/api 0.18.8 → 1.0.0
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/consts.d.ts +2 -2
- package/chaintypes/substrate/consts.js +1 -0
- package/chaintypes/substrate/errors.d.ts +909 -909
- package/chaintypes/substrate/errors.js +1 -0
- package/chaintypes/substrate/events.d.ts +664 -664
- package/chaintypes/substrate/events.js +1 -0
- package/chaintypes/substrate/index.d.ts +13 -16
- package/chaintypes/substrate/index.js +1 -0
- package/chaintypes/substrate/json-rpc.d.ts +2 -2
- package/chaintypes/substrate/json-rpc.js +1 -0
- package/chaintypes/substrate/query.d.ts +509 -527
- package/chaintypes/substrate/query.js +1 -0
- package/chaintypes/substrate/runtime.d.ts +123 -123
- package/chaintypes/substrate/runtime.js +1 -0
- package/chaintypes/substrate/tx.d.ts +1311 -1311
- package/chaintypes/substrate/tx.js +1 -0
- package/chaintypes/substrate/types.js +1 -0
- package/chaintypes/substrate/view-functions.d.ts +2 -2
- package/chaintypes/substrate/view-functions.js +1 -0
- package/cjs/chaintypes/substrate/consts.js +1 -0
- package/cjs/chaintypes/substrate/errors.js +1 -0
- package/cjs/chaintypes/substrate/events.js +1 -0
- package/cjs/chaintypes/substrate/index.js +1 -0
- package/cjs/chaintypes/substrate/json-rpc.js +1 -0
- package/cjs/chaintypes/substrate/query.js +1 -0
- package/cjs/chaintypes/substrate/runtime.js +1 -0
- package/cjs/chaintypes/substrate/tx.js +1 -0
- package/cjs/chaintypes/substrate/types.js +1 -0
- package/cjs/chaintypes/substrate/view-functions.js +1 -0
- package/cjs/client/BaseSubstrateClient.js +45 -2
- package/cjs/client/DedotClient.js +356 -224
- package/cjs/client/LegacyClient.js +99 -23
- package/cjs/client/V2Client.js +316 -0
- package/cjs/client/explorer/LegacyBlockExplorer.js +263 -0
- package/cjs/client/explorer/V2BlockExplorer.js +74 -0
- package/cjs/client/explorer/index.js +18 -0
- package/cjs/client/utils.js +57 -0
- package/cjs/executor/EventExecutor.js +1 -0
- package/cjs/executor/RuntimeApiExecutor.js +49 -2
- package/cjs/executor/StorageQueryExecutor.js +114 -2
- package/cjs/executor/ViewFunctionExecutor.js +21 -2
- package/cjs/executor/v2/StorageQueryExecutorV2.js +7 -1
- package/cjs/executor/validation-helpers.js +181 -0
- package/cjs/extrinsic/submittable/BaseSubmittableExtrinsic.js +86 -2
- package/cjs/extrinsic/submittable/SubmittableExtrinsic.js +38 -16
- package/cjs/extrinsic/submittable/SubmittableExtrinsicV2.js +12 -2
- package/cjs/json-rpc/group/ChainHead/ChainHead.js +226 -21
- package/cjs/storage/QueryableStorage.js +1 -0
- package/client/BaseSubstrateClient.d.ts +34 -18
- package/client/BaseSubstrateClient.js +47 -4
- package/client/DedotClient.d.ts +346 -49
- package/client/DedotClient.js +356 -224
- package/client/LegacyClient.d.ts +22 -17
- package/client/LegacyClient.js +101 -25
- package/client/V2Client.d.ts +75 -0
- package/client/V2Client.js +312 -0
- package/client/explorer/LegacyBlockExplorer.d.ts +68 -0
- package/client/explorer/LegacyBlockExplorer.js +259 -0
- package/client/explorer/V2BlockExplorer.d.ts +40 -0
- package/client/explorer/V2BlockExplorer.js +70 -0
- package/client/explorer/index.d.ts +2 -0
- package/client/explorer/index.js +2 -0
- package/client/utils.d.ts +18 -0
- package/client/utils.js +52 -0
- package/executor/ConstantExecutor.d.ts +1 -2
- package/executor/ErrorExecutor.d.ts +2 -2
- package/executor/EventExecutor.d.ts +2 -2
- package/executor/EventExecutor.js +1 -0
- package/executor/Executor.d.ts +4 -5
- package/executor/RuntimeApiExecutor.d.ts +2 -2
- package/executor/RuntimeApiExecutor.js +27 -3
- package/executor/StorageQueryExecutor.d.ts +3 -2
- package/executor/StorageQueryExecutor.js +92 -3
- package/executor/TxExecutor.d.ts +2 -2
- package/executor/ViewFunctionExecutor.d.ts +2 -2
- package/executor/ViewFunctionExecutor.js +22 -3
- package/executor/v2/RuntimeApiExecutorV2.d.ts +2 -3
- package/executor/v2/StorageQueryExecutorV2.d.ts +3 -3
- package/executor/v2/StorageQueryExecutorV2.js +8 -2
- package/executor/v2/TxExecutorV2.d.ts +5 -5
- package/executor/v2/ViewFunctionExecutorV2.d.ts +2 -3
- package/executor/validation-helpers.d.ts +36 -0
- package/executor/validation-helpers.js +174 -0
- package/extrinsic/extensions/SignedExtension.d.ts +1 -1
- package/extrinsic/submittable/BaseSubmittableExtrinsic.d.ts +7 -3
- package/extrinsic/submittable/BaseSubmittableExtrinsic.js +64 -3
- package/extrinsic/submittable/SubmittableExtrinsic.d.ts +4 -1
- package/extrinsic/submittable/SubmittableExtrinsic.js +39 -17
- package/extrinsic/submittable/SubmittableExtrinsicV2.d.ts +6 -3
- package/extrinsic/submittable/SubmittableExtrinsicV2.js +13 -3
- package/json-rpc/JsonRpcClient.d.ts +6 -6
- package/json-rpc/group/Archive.d.ts +1 -1
- package/json-rpc/group/ChainHead/ChainHead.d.ts +18 -2
- package/json-rpc/group/ChainHead/ChainHead.js +226 -21
- package/json-rpc/group/ChainSpec.d.ts +3 -3
- package/json-rpc/group/Transaction.d.ts +1 -1
- package/json-rpc/group/TransactionWatch.d.ts +1 -1
- package/package.json +9 -9
- package/proxychain.d.ts +3 -4
- package/storage/NewStorageQuery.d.ts +3 -3
- package/storage/QueryableStorage.js +1 -0
- package/types.d.ts +94 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MultiAddress } from '@dedot/codecs';
|
|
2
|
-
import type { GenericChainKnownTypes, GenericSubstrateApi
|
|
2
|
+
import type { GenericChainKnownTypes, GenericSubstrateApi } from '@dedot/types';
|
|
3
3
|
import { ChainConsts } from './consts.js';
|
|
4
4
|
import { ChainErrors } from './errors.js';
|
|
5
5
|
import { ChainEvents } from './events.js';
|
|
@@ -7,7 +7,7 @@ import { ChainJsonRpcApis } from './json-rpc.js';
|
|
|
7
7
|
import { ChainStorage } from './query.js';
|
|
8
8
|
import { RuntimeApis } from './runtime.js';
|
|
9
9
|
import { ChainTx } from './tx.js';
|
|
10
|
-
import type { FrameMetadataHashExtensionCheckMetadataHash, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckMortality, FrameSystemExtensionsCheckNonZeroSender, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckTxVersion, FrameSystemExtensionsCheckWeight, FrameSystemExtensionsWeightReclaim, KitchensinkRuntimeRuntimeCall, PalletAssetConversionTxPaymentChargeAssetTxPayment, SpRuntimeMultiSignature } from './types.js';
|
|
10
|
+
import type { FrameMetadataHashExtensionCheckMetadataHash, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckMortality, FrameSystemExtensionsCheckNonZeroSender, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckTxVersion, FrameSystemExtensionsCheckWeight, FrameSystemExtensionsWeightReclaim, KitchensinkRuntimeRuntimeCall, PalletAssetConversionTxPaymentChargeAssetTxPayment, SpRuntimeMultiSignature } from './types.js';
|
|
11
11
|
import { ChainViewFunctions } from './view-functions.js';
|
|
12
12
|
export * from './types.js';
|
|
13
13
|
interface ChainKnownTypes extends GenericChainKnownTypes {
|
|
@@ -26,23 +26,20 @@ interface ChainKnownTypes extends GenericChainKnownTypes {
|
|
|
26
26
|
FrameMetadataHashExtensionCheckMetadataHash,
|
|
27
27
|
FrameSystemExtensionsWeightReclaim
|
|
28
28
|
];
|
|
29
|
-
|
|
30
|
-
export interface VersionedSubstrateApi<Rv extends RpcVersion> extends GenericSubstrateApi<Rv> {
|
|
31
|
-
rpc: ChainJsonRpcApis<Rv>;
|
|
32
|
-
consts: ChainConsts<Rv>;
|
|
33
|
-
query: ChainStorage<Rv>;
|
|
34
|
-
errors: ChainErrors<Rv>;
|
|
35
|
-
events: ChainEvents<Rv>;
|
|
36
|
-
call: RuntimeApis<Rv>;
|
|
37
|
-
view: ChainViewFunctions<Rv>;
|
|
38
|
-
tx: ChainTx<Rv>;
|
|
39
|
-
types: ChainKnownTypes;
|
|
29
|
+
AssetId: FrameSupportTokensFungibleUnionOfNativeOrWithId;
|
|
40
30
|
}
|
|
41
31
|
/**
|
|
42
32
|
* @name: SubstrateApi
|
|
43
33
|
* @specVersion: 268
|
|
44
34
|
**/
|
|
45
|
-
export interface SubstrateApi {
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
export interface SubstrateApi extends GenericSubstrateApi {
|
|
36
|
+
rpc: ChainJsonRpcApis;
|
|
37
|
+
consts: ChainConsts;
|
|
38
|
+
query: ChainStorage;
|
|
39
|
+
errors: ChainErrors;
|
|
40
|
+
events: ChainEvents;
|
|
41
|
+
call: RuntimeApis;
|
|
42
|
+
view: ChainViewFunctions;
|
|
43
|
+
tx: ChainTx<ChainKnownTypes>;
|
|
44
|
+
types: ChainKnownTypes;
|
|
48
45
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { GenericJsonRpcApis
|
|
1
|
+
import type { GenericJsonRpcApis } from '@dedot/types';
|
|
2
2
|
import type { JsonRpcApis } from '@dedot/types/json-rpc';
|
|
3
|
-
export type ChainJsonRpcApis
|
|
3
|
+
export type ChainJsonRpcApis = Pick<JsonRpcApis, 'author_hasKey' | 'author_hasSessionKeys' | 'author_insertKey' | 'author_pendingExtrinsics' | 'author_removeExtrinsic' | 'author_rotateKeys' | 'author_submitAndWatchExtrinsic' | 'author_submitExtrinsic' | 'babe_epochAuthorship' | 'beefy_getFinalizedHead' | 'beefy_subscribeJustifications' | 'chainHead_v1_body' | 'chainHead_v1_call' | 'chainHead_v1_continue' | 'chainHead_v1_follow' | 'chainHead_v1_header' | 'chainHead_v1_stopOperation' | 'chainHead_v1_storage' | 'chainHead_v1_unpin' | 'chainSpec_v1_chainName' | 'chainSpec_v1_genesisHash' | 'chainSpec_v1_properties' | 'chain_getBlock' | 'chain_getBlockHash' | 'chain_getFinalizedHead' | 'chain_getHeader' | 'chain_subscribeAllHeads' | 'chain_subscribeFinalizedHeads' | 'chain_subscribeNewHeads' | 'childstate_getKeys' | 'childstate_getKeysPaged' | 'childstate_getStorage' | 'childstate_getStorageEntries' | 'childstate_getStorageHash' | 'childstate_getStorageSize' | 'dev_getBlockStats' | 'grandpa_proveFinality' | 'grandpa_roundState' | 'grandpa_subscribeJustifications' | 'mmr_generateProof' | 'mmr_root' | 'mmr_verifyProof' | 'mmr_verifyProofStateless' | 'offchain_localStorageClear' | 'offchain_localStorageGet' | 'offchain_localStorageSet' | 'payment_queryFeeDetails' | 'payment_queryInfo' | 'rpc_methods' | 'state_call' | 'state_getChildReadProof' | 'state_getKeys' | 'state_getKeysPaged' | 'state_getMetadata' | 'state_getPairs' | 'state_getReadProof' | 'state_getRuntimeVersion' | 'state_getStorage' | 'state_getStorageHash' | 'state_getStorageSize' | 'state_queryStorage' | 'state_queryStorageAt' | 'state_subscribeRuntimeVersion' | 'state_subscribeStorage' | 'state_traceBlock' | 'state_trieMigrationStatus' | 'statement_broadcasts' | 'statement_dump' | 'statement_posted' | 'statement_postedClear' | 'statement_remove' | 'statement_submit' | 'sync_state_genSyncSpec' | 'system_accountNextIndex' | 'system_addLogFilter' | 'system_addReservedPeer' | 'system_chain' | 'system_chainType' | 'system_dryRun' | 'system_health' | 'system_localListenAddresses' | 'system_localPeerId' | 'system_name' | 'system_nodeRoles' | 'system_peers' | 'system_properties' | 'system_removeReservedPeer' | 'system_reservedPeers' | 'system_resetLogFilter' | 'system_syncState' | 'system_unstable_networkState' | 'system_version' | 'transactionWatch_v1_submitAndWatch' | 'transaction_v1_broadcast' | 'transaction_v1_stop'> & GenericJsonRpcApis;
|