@dedot/chaintypes 0.136.0 → 0.137.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.
@@ -124,6 +124,11 @@ import type {
124
124
  SpCoreCryptoKeyTypeId,
125
125
  SpConsensusAuraSr25519AppSr25519Public,
126
126
  SpConsensusSlotsSlot,
127
+ IsmpConsensusStateCommitment,
128
+ IsmpConsensusStateMachineHeight,
129
+ IsmpConsensusStateMachineId,
130
+ PalletHyperbridgeVersionedHostParams,
131
+ IsmpHostStateMachine,
127
132
  PalletEmaOracleOracleEntry,
128
133
  HydradxTraitsOracleOraclePeriod,
129
134
  PalletBroadcastExecutionType,
@@ -3142,6 +3147,239 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
3142
3147
  **/
3143
3148
  [storage: string]: GenericStorageQuery<Rv>;
3144
3149
  };
3150
+ /**
3151
+ * Pallet `Ismp`'s storage queries
3152
+ **/
3153
+ ismp: {
3154
+ /**
3155
+ * Holds a map of state machine heights to their verified state commitments. These state
3156
+ * commitments end up here after they are successfully verified by a `ConsensusClient`
3157
+ *
3158
+ * @param {IsmpConsensusStateMachineHeight} arg
3159
+ * @param {Callback<IsmpConsensusStateCommitment | undefined> =} callback
3160
+ **/
3161
+ stateCommitments: GenericStorageQuery<
3162
+ Rv,
3163
+ (arg: IsmpConsensusStateMachineHeight) => IsmpConsensusStateCommitment | undefined,
3164
+ IsmpConsensusStateMachineHeight
3165
+ >;
3166
+
3167
+ /**
3168
+ * Holds a map of consensus state identifiers to their consensus state.
3169
+ *
3170
+ * @param {FixedBytes<4>} arg
3171
+ * @param {Callback<Bytes | undefined> =} callback
3172
+ **/
3173
+ consensusStates: GenericStorageQuery<Rv, (arg: FixedBytes<4>) => Bytes | undefined, FixedBytes<4>>;
3174
+
3175
+ /**
3176
+ * A mapping of consensus state identifier to it's associated consensus client identifier
3177
+ *
3178
+ * @param {FixedBytes<4>} arg
3179
+ * @param {Callback<FixedBytes<4> | undefined> =} callback
3180
+ **/
3181
+ consensusStateClient: GenericStorageQuery<Rv, (arg: FixedBytes<4>) => FixedBytes<4> | undefined, FixedBytes<4>>;
3182
+
3183
+ /**
3184
+ * A mapping of consensus state identifiers to their unbonding periods
3185
+ *
3186
+ * @param {FixedBytes<4>} arg
3187
+ * @param {Callback<bigint | undefined> =} callback
3188
+ **/
3189
+ unbondingPeriod: GenericStorageQuery<Rv, (arg: FixedBytes<4>) => bigint | undefined, FixedBytes<4>>;
3190
+
3191
+ /**
3192
+ * A mapping of state machine Ids to their challenge periods
3193
+ *
3194
+ * @param {IsmpConsensusStateMachineId} arg
3195
+ * @param {Callback<bigint | undefined> =} callback
3196
+ **/
3197
+ challengePeriod: GenericStorageQuery<
3198
+ Rv,
3199
+ (arg: IsmpConsensusStateMachineId) => bigint | undefined,
3200
+ IsmpConsensusStateMachineId
3201
+ >;
3202
+
3203
+ /**
3204
+ * Holds a map of consensus clients frozen due to byzantine
3205
+ * behaviour
3206
+ *
3207
+ * @param {FixedBytes<4>} arg
3208
+ * @param {Callback<boolean> =} callback
3209
+ **/
3210
+ frozenConsensusClients: GenericStorageQuery<Rv, (arg: FixedBytes<4>) => boolean, FixedBytes<4>>;
3211
+
3212
+ /**
3213
+ * The latest verified height for a state machine
3214
+ *
3215
+ * @param {IsmpConsensusStateMachineId} arg
3216
+ * @param {Callback<bigint | undefined> =} callback
3217
+ **/
3218
+ latestStateMachineHeight: GenericStorageQuery<
3219
+ Rv,
3220
+ (arg: IsmpConsensusStateMachineId) => bigint | undefined,
3221
+ IsmpConsensusStateMachineId
3222
+ >;
3223
+
3224
+ /**
3225
+ * Holds the timestamp at which a consensus client was recently updated.
3226
+ * Used in ensuring that the configured challenge period elapses.
3227
+ *
3228
+ * @param {FixedBytes<4>} arg
3229
+ * @param {Callback<bigint | undefined> =} callback
3230
+ **/
3231
+ consensusClientUpdateTime: GenericStorageQuery<Rv, (arg: FixedBytes<4>) => bigint | undefined, FixedBytes<4>>;
3232
+
3233
+ /**
3234
+ * Holds the timestamp at which a state machine height was updated.
3235
+ * Used in ensuring that the configured challenge period elapses.
3236
+ *
3237
+ * @param {IsmpConsensusStateMachineHeight} arg
3238
+ * @param {Callback<bigint | undefined> =} callback
3239
+ **/
3240
+ stateMachineUpdateTime: GenericStorageQuery<
3241
+ Rv,
3242
+ (arg: IsmpConsensusStateMachineHeight) => bigint | undefined,
3243
+ IsmpConsensusStateMachineHeight
3244
+ >;
3245
+
3246
+ /**
3247
+ * Tracks requests that have been responded to
3248
+ * The key is the request commitment
3249
+ *
3250
+ * @param {H256} arg
3251
+ * @param {Callback<boolean> =} callback
3252
+ **/
3253
+ responded: GenericStorageQuery<Rv, (arg: H256) => boolean, H256>;
3254
+
3255
+ /**
3256
+ * Latest nonce for messages sent from this chain
3257
+ *
3258
+ * @param {Callback<bigint> =} callback
3259
+ **/
3260
+ nonce: GenericStorageQuery<Rv, () => bigint>;
3261
+
3262
+ /**
3263
+ * The child trie root of messages
3264
+ *
3265
+ * @param {Callback<H256> =} callback
3266
+ **/
3267
+ childTrieRoot: GenericStorageQuery<Rv, () => H256>;
3268
+
3269
+ /**
3270
+ * Generic pallet storage query
3271
+ **/
3272
+ [storage: string]: GenericStorageQuery<Rv>;
3273
+ };
3274
+ /**
3275
+ * Pallet `IsmpParachain`'s storage queries
3276
+ **/
3277
+ ismpParachain: {
3278
+ /**
3279
+ * Mapping of relay chain heights to it's state commitment. The state commitment of the parent
3280
+ * relay block is inserted at every block in `on_finalize`. This commitment is gotten from
3281
+ * parachain-system.
3282
+ *
3283
+ * @param {number} arg
3284
+ * @param {Callback<H256 | undefined> =} callback
3285
+ **/
3286
+ relayChainStateCommitments: GenericStorageQuery<Rv, (arg: number) => H256 | undefined, number>;
3287
+
3288
+ /**
3289
+ * Tracks whether we've already seen the `update_parachain_consensus` inherent
3290
+ *
3291
+ * @param {Callback<boolean | undefined> =} callback
3292
+ **/
3293
+ consensusUpdated: GenericStorageQuery<Rv, () => boolean | undefined>;
3294
+
3295
+ /**
3296
+ * List of parachains that this state machine is interested in.
3297
+ *
3298
+ * @param {number} arg
3299
+ * @param {Callback<bigint | undefined> =} callback
3300
+ **/
3301
+ parachains: GenericStorageQuery<Rv, (arg: number) => bigint | undefined, number>;
3302
+
3303
+ /**
3304
+ * Generic pallet storage query
3305
+ **/
3306
+ [storage: string]: GenericStorageQuery<Rv>;
3307
+ };
3308
+ /**
3309
+ * Pallet `Hyperbridge`'s storage queries
3310
+ **/
3311
+ hyperbridge: {
3312
+ /**
3313
+ * The host parameters of the pallet-hyperbridge.
3314
+ *
3315
+ * @param {Callback<PalletHyperbridgeVersionedHostParams> =} callback
3316
+ **/
3317
+ hostParams: GenericStorageQuery<Rv, () => PalletHyperbridgeVersionedHostParams>;
3318
+
3319
+ /**
3320
+ * Generic pallet storage query
3321
+ **/
3322
+ [storage: string]: GenericStorageQuery<Rv>;
3323
+ };
3324
+ /**
3325
+ * Pallet `TokenGateway`'s storage queries
3326
+ **/
3327
+ tokenGateway: {
3328
+ /**
3329
+ * Assets supported by this instance of token gateway
3330
+ * A map of the local asset id to the token gateway asset id
3331
+ *
3332
+ * @param {number} arg
3333
+ * @param {Callback<H256 | undefined> =} callback
3334
+ **/
3335
+ supportedAssets: GenericStorageQuery<Rv, (arg: number) => H256 | undefined, number>;
3336
+
3337
+ /**
3338
+ * Assets that originate from this chain
3339
+ *
3340
+ * @param {number} arg
3341
+ * @param {Callback<boolean> =} callback
3342
+ **/
3343
+ nativeAssets: GenericStorageQuery<Rv, (arg: number) => boolean, number>;
3344
+
3345
+ /**
3346
+ * Assets supported by this instance of token gateway
3347
+ * A map of the token gateway asset id to the local asset id
3348
+ *
3349
+ * @param {H256} arg
3350
+ * @param {Callback<number | undefined> =} callback
3351
+ **/
3352
+ localAssets: GenericStorageQuery<Rv, (arg: H256) => number | undefined, H256>;
3353
+
3354
+ /**
3355
+ * The decimals used by the EVM counterpart of this asset
3356
+ *
3357
+ * @param {[number, IsmpHostStateMachine]} arg
3358
+ * @param {Callback<number | undefined> =} callback
3359
+ **/
3360
+ precisions: GenericStorageQuery<
3361
+ Rv,
3362
+ (arg: [number, IsmpHostStateMachine]) => number | undefined,
3363
+ [number, IsmpHostStateMachine]
3364
+ >;
3365
+
3366
+ /**
3367
+ * The token gateway adresses on different chains
3368
+ *
3369
+ * @param {IsmpHostStateMachine} arg
3370
+ * @param {Callback<Bytes | undefined> =} callback
3371
+ **/
3372
+ tokenGatewayAddresses: GenericStorageQuery<
3373
+ Rv,
3374
+ (arg: IsmpHostStateMachine) => Bytes | undefined,
3375
+ IsmpHostStateMachine
3376
+ >;
3377
+
3378
+ /**
3379
+ * Generic pallet storage query
3380
+ **/
3381
+ [storage: string]: GenericStorageQuery<Rv>;
3382
+ };
3145
3383
  /**
3146
3384
  * Pallet `EmaOracle`'s storage queries
3147
3385
  **/
@@ -55,6 +55,13 @@ import type {
55
55
  XcmRuntimeApisConversionsError,
56
56
  HydradxTraitsOracleOraclePeriod,
57
57
  HydradxRuntimeEvmAaveTradeExecutorPoolData,
58
+ IsmpHostStateMachine,
59
+ IsmpEventsEvent,
60
+ IsmpConsensusStateMachineHeight,
61
+ IsmpConsensusStateMachineId,
62
+ IsmpRouterRequest,
63
+ IsmpRouterResponse,
64
+ CumulusPalletParachainSystemRelayChainState,
58
65
  } from './types.js';
59
66
 
60
67
  export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
@@ -934,6 +941,113 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
934
941
  **/
935
942
  [method: string]: GenericRuntimeApiMethod<Rv>;
936
943
  };
944
+ /**
945
+ * @runtimeapi: IsmpRuntimeApi - 0x0ebc8fd84ae20ada
946
+ **/
947
+ ismpRuntimeApi: {
948
+ /**
949
+ * Should return the host's state machine identifier
950
+ *
951
+ * @callname: IsmpRuntimeApi_host_state_machine
952
+ **/
953
+ hostStateMachine: GenericRuntimeApiMethod<Rv, () => Promise<IsmpHostStateMachine>>;
954
+
955
+ /**
956
+ * Fetch all ISMP events
957
+ *
958
+ * @callname: IsmpRuntimeApi_block_events
959
+ **/
960
+ blockEvents: GenericRuntimeApiMethod<Rv, () => Promise<Array<IsmpEventsEvent>>>;
961
+
962
+ /**
963
+ * Fetch all ISMP events and their extrinsic metadata
964
+ *
965
+ * @callname: IsmpRuntimeApi_block_events_with_metadata
966
+ **/
967
+ blockEventsWithMetadata: GenericRuntimeApiMethod<Rv, () => Promise<Array<[IsmpEventsEvent, number | undefined]>>>;
968
+
969
+ /**
970
+ * Return the scale encoded consensus state
971
+ *
972
+ * @callname: IsmpRuntimeApi_consensus_state
973
+ * @param {FixedBytes<4>} id
974
+ **/
975
+ consensusState: GenericRuntimeApiMethod<Rv, (id: FixedBytes<4>) => Promise<Bytes | undefined>>;
976
+
977
+ /**
978
+ * Return the timestamp this client was last updated in seconds
979
+ *
980
+ * @callname: IsmpRuntimeApi_state_machine_update_time
981
+ * @param {IsmpConsensusStateMachineHeight} id
982
+ **/
983
+ stateMachineUpdateTime: GenericRuntimeApiMethod<
984
+ Rv,
985
+ (id: IsmpConsensusStateMachineHeight) => Promise<bigint | undefined>
986
+ >;
987
+
988
+ /**
989
+ * Return the challenge period timestamp
990
+ *
991
+ * @callname: IsmpRuntimeApi_challenge_period
992
+ * @param {IsmpConsensusStateMachineId} id
993
+ **/
994
+ challengePeriod: GenericRuntimeApiMethod<Rv, (id: IsmpConsensusStateMachineId) => Promise<bigint | undefined>>;
995
+
996
+ /**
997
+ * Return the latest height of the state machine
998
+ *
999
+ * @callname: IsmpRuntimeApi_latest_state_machine_height
1000
+ * @param {IsmpConsensusStateMachineId} id
1001
+ **/
1002
+ latestStateMachineHeight: GenericRuntimeApiMethod<
1003
+ Rv,
1004
+ (id: IsmpConsensusStateMachineId) => Promise<bigint | undefined>
1005
+ >;
1006
+
1007
+ /**
1008
+ * Fetch the requests for the given commitments.
1009
+ *
1010
+ * @callname: IsmpRuntimeApi_requests
1011
+ * @param {Array<H256>} request_commitments
1012
+ **/
1013
+ requests: GenericRuntimeApiMethod<Rv, (requestCommitments: Array<H256>) => Promise<Array<IsmpRouterRequest>>>;
1014
+
1015
+ /**
1016
+ * Fetch the responses for the given commitments.
1017
+ *
1018
+ * @callname: IsmpRuntimeApi_responses
1019
+ * @param {Array<H256>} response_commitments
1020
+ **/
1021
+ responses: GenericRuntimeApiMethod<Rv, (responseCommitments: Array<H256>) => Promise<Array<IsmpRouterResponse>>>;
1022
+
1023
+ /**
1024
+ * Generic runtime api call
1025
+ **/
1026
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1027
+ };
1028
+ /**
1029
+ * @runtimeapi: IsmpParachainApi - 0x5d1df2fe7d4f6bc8
1030
+ **/
1031
+ ismpParachainApi: {
1032
+ /**
1033
+ * Return all the para_ids this runtime is interested in. Used by the inherent provider
1034
+ *
1035
+ * @callname: IsmpParachainApi_para_ids
1036
+ **/
1037
+ paraIds: GenericRuntimeApiMethod<Rv, () => Promise<Array<number>>>;
1038
+
1039
+ /**
1040
+ * Return the current relay chain state.
1041
+ *
1042
+ * @callname: IsmpParachainApi_current_relay_chain_state
1043
+ **/
1044
+ currentRelayChainState: GenericRuntimeApiMethod<Rv, () => Promise<CumulusPalletParachainSystemRelayChainState>>;
1045
+
1046
+ /**
1047
+ * Generic runtime api call
1048
+ **/
1049
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1050
+ };
937
1051
  /**
938
1052
  * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
939
1053
  **/