@dedot/api 0.0.1-next.d9aff57d.57 → 0.1.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.
Files changed (70) hide show
  1. package/chaintypes/substrate/consts.js +1 -1
  2. package/chaintypes/substrate/errors.js +1 -1
  3. package/chaintypes/substrate/events.js +1 -1
  4. package/chaintypes/substrate/index.js +1 -1
  5. package/chaintypes/substrate/json-rpc.d.ts +1 -1
  6. package/chaintypes/substrate/json-rpc.js +1 -1
  7. package/chaintypes/substrate/query.js +1 -1
  8. package/chaintypes/substrate/runtime.js +1 -1
  9. package/chaintypes/substrate/tx.d.ts +2 -2
  10. package/chaintypes/substrate/tx.js +1 -1
  11. package/chaintypes/substrate/types.d.ts +377 -377
  12. package/chaintypes/substrate/types.js +1 -1
  13. package/cjs/chaintypes/substrate/consts.js +1 -1
  14. package/cjs/chaintypes/substrate/errors.js +1 -1
  15. package/cjs/chaintypes/substrate/events.js +1 -1
  16. package/cjs/chaintypes/substrate/index.js +1 -1
  17. package/cjs/chaintypes/substrate/json-rpc.js +1 -1
  18. package/cjs/chaintypes/substrate/query.js +1 -1
  19. package/cjs/chaintypes/substrate/runtime.js +1 -1
  20. package/cjs/chaintypes/substrate/tx.js +1 -1
  21. package/cjs/chaintypes/substrate/types.js +1 -1
  22. package/cjs/client/BaseSubstrateClient.js +21 -0
  23. package/cjs/client/DedotClient.js +5 -4
  24. package/cjs/client/{Dedot.js → LegacyClient.js} +13 -9
  25. package/cjs/client/index.js +1 -1
  26. package/cjs/executor/ErrorExecutor.js +3 -3
  27. package/cjs/executor/EventExecutor.js +2 -2
  28. package/cjs/executor/StorageQueryExecutor.js +1 -1
  29. package/cjs/executor/TxExecutor.js +3 -3
  30. package/cjs/executor/v2/StorageQueryExecutorV2.js +7 -7
  31. package/cjs/extrinsic/extensions/known/ChargeAssetTxPayment.js +2 -2
  32. package/cjs/extrinsic/extensions/known/CheckMetadataHash.js +31 -0
  33. package/cjs/extrinsic/extensions/known/StorageWeightReclaim.js +10 -0
  34. package/cjs/extrinsic/extensions/known/index.js +4 -0
  35. package/cjs/extrinsic/submittable/BaseSubmittableExtrinsic.js +31 -1
  36. package/cjs/extrinsic/submittable/SubmittableExtrinsic.js +7 -4
  37. package/cjs/extrinsic/submittable/SubmittableExtrinsicV2.js +11 -11
  38. package/cjs/extrinsic/submittable/utils.js +66 -1
  39. package/cjs/storage/QueryableStorage.js +17 -17
  40. package/client/BaseSubstrateClient.d.ts +15 -9
  41. package/client/BaseSubstrateClient.js +22 -1
  42. package/client/DedotClient.d.ts +2 -2
  43. package/client/DedotClient.js +5 -4
  44. package/client/{Dedot.d.ts → LegacyClient.d.ts} +8 -7
  45. package/client/{Dedot.js → LegacyClient.js} +11 -7
  46. package/client/index.d.ts +1 -1
  47. package/client/index.js +1 -1
  48. package/executor/ErrorExecutor.js +3 -3
  49. package/executor/EventExecutor.js +2 -2
  50. package/executor/Executor.d.ts +12 -12
  51. package/executor/StorageQueryExecutor.js +1 -1
  52. package/executor/TxExecutor.js +3 -3
  53. package/executor/v2/StorageQueryExecutorV2.js +7 -7
  54. package/extrinsic/extensions/known/ChargeAssetTxPayment.js +2 -2
  55. package/extrinsic/extensions/known/CheckMetadataHash.d.ts +13 -0
  56. package/extrinsic/extensions/known/CheckMetadataHash.js +27 -0
  57. package/extrinsic/extensions/known/StorageWeightReclaim.d.ts +6 -0
  58. package/extrinsic/extensions/known/StorageWeightReclaim.js +6 -0
  59. package/extrinsic/extensions/known/index.js +4 -0
  60. package/extrinsic/submittable/BaseSubmittableExtrinsic.d.ts +2 -0
  61. package/extrinsic/submittable/BaseSubmittableExtrinsic.js +32 -2
  62. package/extrinsic/submittable/SubmittableExtrinsic.js +7 -4
  63. package/extrinsic/submittable/SubmittableExtrinsicV2.js +11 -11
  64. package/extrinsic/submittable/SubmittableResult.d.ts +4 -4
  65. package/extrinsic/submittable/utils.d.ts +10 -1
  66. package/extrinsic/submittable/utils.js +65 -1
  67. package/json-rpc/JsonRpcClient.d.ts +6 -5
  68. package/package.json +11 -11
  69. package/storage/QueryableStorage.js +17 -17
  70. package/types.d.ts +9 -1
@@ -1,2 +1,2 @@
1
- // Generated by @dedot/codegen
1
+ // Generated by dedot cli
2
2
  export {};
@@ -1,2 +1,2 @@
1
- // Generated by @dedot/codegen
1
+ // Generated by dedot cli
2
2
  export {};
@@ -1,2 +1,2 @@
1
- // Generated by @dedot/codegen
1
+ // Generated by dedot cli
2
2
  export {};
@@ -1,2 +1,2 @@
1
- // Generated by @dedot/codegen
1
+ // Generated by dedot cli
2
2
  export * from './types.js';
@@ -1,3 +1,3 @@
1
1
  import type { GenericJsonRpcApis, RpcVersion } from '@dedot/types';
2
2
  import type { JsonRpcApis } from '@dedot/types/json-rpc';
3
- export type ChainJsonRpcApis<Rv extends RpcVersion> = 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_unstable_body' | 'chainHead_unstable_call' | 'chainHead_unstable_continue' | 'chainHead_unstable_follow' | 'chainHead_unstable_header' | 'chainHead_unstable_stopOperation' | 'chainHead_unstable_storage' | 'chainHead_unstable_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_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_unstable_submitAndWatch' | 'transaction_unstable_broadcast' | 'transaction_unstable_stop'> & GenericJsonRpcApis<Rv>;
3
+ export type ChainJsonRpcApis<Rv extends RpcVersion> = 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_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<Rv>;
@@ -1,2 +1,2 @@
1
- // Generated by @dedot/codegen
1
+ // Generated by dedot cli
2
2
  export {};
@@ -1,2 +1,2 @@
1
- // Generated by @dedot/codegen
1
+ // Generated by dedot cli
2
2
  export {};
@@ -1,2 +1,2 @@
1
- // Generated by @dedot/codegen
1
+ // Generated by dedot cli
2
2
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { AccountId32Like, BytesLike, Data, Extrinsic, FixedBytes, FixedU128, FixedU64, H256, MultiAddressLike, Perbill, Percent, Perquintill } from '@dedot/codecs';
2
- import type { GenericChainTx, GenericTxCall, IRuntimeTxCall, ISubmittableExtrinsic, ISubmittableExtrinsicLegacy, ISubmittableResult, RpcV2, RpcVersion, TransactionStatusLegacy, TransactionStatusV2 } from '@dedot/types';
2
+ import type { GenericChainTx, GenericTxCall, IRuntimeTxCall, ISubmittableExtrinsic, ISubmittableExtrinsicLegacy, ISubmittableResult, RpcV2, RpcVersion } from '@dedot/types';
3
3
  import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSystemEventRecord, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeRuntimeCallLike, KitchensinkRuntimeRuntimeParameters, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletBalancesAdjustmentDirection, PalletBrokerConfigRecord, PalletBrokerCoreMask, PalletBrokerFinality, PalletBrokerRegionId, PalletBrokerScheduleItem, PalletContractsWasmDeterminism, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityJudgement, PalletIdentityLegacyIdentityInfo, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMigrationsHistoricCleanupSelector, PalletMigrationsMigrationCursor, PalletMixnetRegistration, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsBitFlags, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsConfigOp, PalletNominationPoolsConfigOp004, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOp, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBeefyEquivocationProof, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpMixnetAppSignature, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from './types.js';
4
- export type ChainSubmittableExtrinsic<Rv extends RpcVersion, T extends IRuntimeTxCall = KitchensinkRuntimeRuntimeCallLike> = Extrinsic<MultiAddressLike, T, SpRuntimeMultiSignature, any[]> & (Rv extends RpcV2 ? ISubmittableExtrinsic<ISubmittableResult<FrameSystemEventRecord, TransactionStatusV2>> : ISubmittableExtrinsicLegacy<ISubmittableResult<FrameSystemEventRecord, TransactionStatusLegacy>>);
4
+ export type ChainSubmittableExtrinsic<Rv extends RpcVersion, T extends IRuntimeTxCall = KitchensinkRuntimeRuntimeCallLike> = Extrinsic<MultiAddressLike, T, SpRuntimeMultiSignature, any[]> & (Rv extends RpcV2 ? ISubmittableExtrinsic<ISubmittableResult<FrameSystemEventRecord>> : ISubmittableExtrinsicLegacy<ISubmittableResult<FrameSystemEventRecord>>);
5
5
  export type TxCall<Rv extends RpcVersion> = (...args: any[]) => ChainSubmittableExtrinsic<Rv>;
6
6
  export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCall<Rv>> {
7
7
  /**
@@ -1,2 +1,2 @@
1
- // Generated by @dedot/codegen
1
+ // Generated by dedot cli
2
2
  export {};