@dedot/chaintypes 0.0.1-alpha.65 → 0.0.1-alpha.67
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/package.json +2 -2
- package/rococo/consts.d.ts +9 -0
- package/rococo/errors.d.ts +0 -16
- package/rococo/events.d.ts +38 -1
- package/rococo/query.d.ts +21 -0
- package/rococo/runtime.d.ts +46 -13
- package/rococo/tx.d.ts +119 -40
- package/rococo/types.d.ts +246 -68
- package/rococoAssetHub/consts.d.ts +43 -0
- package/rococoAssetHub/errors.d.ts +74 -16
- package/rococoAssetHub/events.d.ts +88 -0
- package/rococoAssetHub/query.d.ts +39 -0
- package/rococoAssetHub/runtime.d.ts +36 -13
- package/rococoAssetHub/tx.d.ts +293 -39
- package/rococoAssetHub/types.d.ts +482 -62
- package/westendAssetHub/consts.d.ts +9 -0
- package/westendAssetHub/errors.d.ts +29 -16
- package/westendAssetHub/events.d.ts +52 -0
- package/westendAssetHub/runtime.d.ts +36 -13
- package/westendAssetHub/tx.d.ts +129 -39
- package/westendAssetHub/types.d.ts +253 -62
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedot/chaintypes",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.67",
|
|
4
4
|
"description": "Types for substrate-based chains",
|
|
5
5
|
"author": "Thang X. Vu <thang@coongcrafts.io>",
|
|
6
6
|
"main": "",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"directory": "dist"
|
|
21
21
|
},
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "d4d37014615c2e4ceab107c709d3b1e062c40313",
|
|
24
24
|
"module": "./index.js",
|
|
25
25
|
"types": "./index.d.ts"
|
|
26
26
|
}
|
package/rococo/consts.d.ts
CHANGED
|
@@ -164,6 +164,15 @@ export interface ChainConsts extends GenericChainConsts {
|
|
|
164
164
|
**/
|
|
165
165
|
[name: string]: any;
|
|
166
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* Pallet `Parameters`'s constants
|
|
169
|
+
**/
|
|
170
|
+
parameters: {
|
|
171
|
+
/**
|
|
172
|
+
* Generic pallet constant
|
|
173
|
+
**/
|
|
174
|
+
[name: string]: any;
|
|
175
|
+
};
|
|
167
176
|
/**
|
|
168
177
|
* Pallet `TransactionPayment`'s constants
|
|
169
178
|
**/
|
package/rococo/errors.d.ts
CHANGED
|
@@ -2564,11 +2564,6 @@ export interface ChainErrors extends GenericChainErrors {
|
|
|
2564
2564
|
**/
|
|
2565
2565
|
InUse: GenericPalletError;
|
|
2566
2566
|
|
|
2567
|
-
/**
|
|
2568
|
-
* Invalid non-concrete asset.
|
|
2569
|
-
**/
|
|
2570
|
-
InvalidAssetNotConcrete: GenericPalletError;
|
|
2571
|
-
|
|
2572
2567
|
/**
|
|
2573
2568
|
* Invalid asset, reserve chain could not be determined for it.
|
|
2574
2569
|
**/
|
|
@@ -2589,17 +2584,6 @@ export interface ChainErrors extends GenericChainErrors {
|
|
|
2589
2584
|
**/
|
|
2590
2585
|
LocalExecutionIncomplete: GenericPalletError;
|
|
2591
2586
|
|
|
2592
|
-
/**
|
|
2593
|
-
* Could not decode XCM.
|
|
2594
|
-
**/
|
|
2595
|
-
UnableToDecode: GenericPalletError;
|
|
2596
|
-
|
|
2597
|
-
/**
|
|
2598
|
-
* XCM encoded length is too large.
|
|
2599
|
-
* Returned when an XCM encoded length is larger than `MaxXcmEncodedSize`.
|
|
2600
|
-
**/
|
|
2601
|
-
XcmTooLarge: GenericPalletError;
|
|
2602
|
-
|
|
2603
2587
|
/**
|
|
2604
2588
|
* Generic pallet error
|
|
2605
2589
|
**/
|
package/rococo/events.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ import type {
|
|
|
15
15
|
} from '@dedot/codecs';
|
|
16
16
|
import type {
|
|
17
17
|
FrameSupportTokensMiscBalanceStatus,
|
|
18
|
+
RococoRuntimeRuntimeParametersKey,
|
|
19
|
+
RococoRuntimeRuntimeParametersValue,
|
|
18
20
|
SpConsensusGrandpaAppPublic,
|
|
19
21
|
PolkadotRuntimeCommonImplsVersionedLocatableAsset,
|
|
20
22
|
XcmVersionedLocation,
|
|
@@ -249,6 +251,41 @@ export interface ChainEvents extends GenericChainEvents {
|
|
|
249
251
|
**/
|
|
250
252
|
[prop: string]: GenericPalletEvent;
|
|
251
253
|
};
|
|
254
|
+
/**
|
|
255
|
+
* Pallet `Parameters`'s events
|
|
256
|
+
**/
|
|
257
|
+
parameters: {
|
|
258
|
+
/**
|
|
259
|
+
* A Parameter was set.
|
|
260
|
+
*
|
|
261
|
+
* Is also emitted when the value was not changed.
|
|
262
|
+
**/
|
|
263
|
+
Updated: GenericPalletEvent<
|
|
264
|
+
'Parameters',
|
|
265
|
+
'Updated',
|
|
266
|
+
{
|
|
267
|
+
/**
|
|
268
|
+
* The key that was updated.
|
|
269
|
+
**/
|
|
270
|
+
key: RococoRuntimeRuntimeParametersKey;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* The old value before this call.
|
|
274
|
+
**/
|
|
275
|
+
oldValue?: RococoRuntimeRuntimeParametersValue | undefined;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The new value after this call.
|
|
279
|
+
**/
|
|
280
|
+
newValue?: RococoRuntimeRuntimeParametersValue | undefined;
|
|
281
|
+
}
|
|
282
|
+
>;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Generic pallet event
|
|
286
|
+
**/
|
|
287
|
+
[prop: string]: GenericPalletEvent;
|
|
288
|
+
};
|
|
252
289
|
/**
|
|
253
290
|
* Pallet `TransactionPayment`'s events
|
|
254
291
|
**/
|
|
@@ -2258,7 +2295,7 @@ export interface ChainEvents extends GenericChainEvents {
|
|
|
2258
2295
|
>;
|
|
2259
2296
|
|
|
2260
2297
|
/**
|
|
2261
|
-
* An HRMP channel was opened
|
|
2298
|
+
* An HRMP channel was opened with a system chain.
|
|
2262
2299
|
**/
|
|
2263
2300
|
HrmpSystemChannelOpened: GenericPalletEvent<
|
|
2264
2301
|
'Hrmp',
|
package/rococo/query.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ import type {
|
|
|
32
32
|
PalletBalancesReserveData,
|
|
33
33
|
PalletBalancesIdAmount,
|
|
34
34
|
PalletBalancesIdAmount002,
|
|
35
|
+
RococoRuntimeRuntimeParametersValue,
|
|
36
|
+
RococoRuntimeRuntimeParametersKey,
|
|
35
37
|
PalletTransactionPaymentReleases,
|
|
36
38
|
SpStakingOffenceOffenceDetails,
|
|
37
39
|
RococoRuntimeSessionKeys,
|
|
@@ -588,6 +590,25 @@ export interface ChainStorage extends GenericChainStorage {
|
|
|
588
590
|
**/
|
|
589
591
|
[storage: string]: GenericStorageQuery;
|
|
590
592
|
};
|
|
593
|
+
/**
|
|
594
|
+
* Pallet `Parameters`'s storage queries
|
|
595
|
+
**/
|
|
596
|
+
parameters: {
|
|
597
|
+
/**
|
|
598
|
+
* Stored parameters.
|
|
599
|
+
*
|
|
600
|
+
* @param {RococoRuntimeRuntimeParametersKey} arg
|
|
601
|
+
* @param {Callback<RococoRuntimeRuntimeParametersValue | undefined> =} callback
|
|
602
|
+
**/
|
|
603
|
+
parameters: GenericStorageQuery<
|
|
604
|
+
(arg: RococoRuntimeRuntimeParametersKey) => RococoRuntimeRuntimeParametersValue | undefined
|
|
605
|
+
>;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Generic pallet storage query
|
|
609
|
+
**/
|
|
610
|
+
[storage: string]: GenericStorageQuery;
|
|
611
|
+
};
|
|
591
612
|
/**
|
|
592
613
|
* Pallet `TransactionPayment`'s storage queries
|
|
593
614
|
**/
|
package/rococo/runtime.d.ts
CHANGED
|
@@ -667,6 +667,16 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
667
667
|
() => Promise<Array<[PolkadotPrimitivesV7CoreIndex, Array<PolkadotParachainPrimitivesPrimitivesId>]>>
|
|
668
668
|
>;
|
|
669
669
|
|
|
670
|
+
/**
|
|
671
|
+
* Elastic scaling support
|
|
672
|
+
*
|
|
673
|
+
* @callname: ParachainHost_candidates_pending_availability
|
|
674
|
+
* @param {PolkadotParachainPrimitivesPrimitivesId} para_id
|
|
675
|
+
**/
|
|
676
|
+
candidatesPendingAvailability: GenericRuntimeApiMethod<
|
|
677
|
+
(paraId: PolkadotParachainPrimitivesPrimitivesId) => Promise<Array<PolkadotPrimitivesV7CommittedCandidateReceipt>>
|
|
678
|
+
>;
|
|
679
|
+
|
|
670
680
|
/**
|
|
671
681
|
* Generic runtime api call
|
|
672
682
|
**/
|
|
@@ -1113,28 +1123,51 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
1113
1123
|
**/
|
|
1114
1124
|
genesisBuilder: {
|
|
1115
1125
|
/**
|
|
1116
|
-
*
|
|
1126
|
+
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
|
|
1127
|
+
* storage.
|
|
1128
|
+
*
|
|
1129
|
+
* In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and
|
|
1130
|
+
* puts it into the storage. If the provided JSON blob is incorrect or incomplete or the
|
|
1131
|
+
* deserialization fails, an error is returned.
|
|
1117
1132
|
*
|
|
1118
|
-
*
|
|
1119
|
-
*
|
|
1133
|
+
* Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
|
|
1134
|
+
* defaults will be used.
|
|
1120
1135
|
*
|
|
1121
|
-
* @callname:
|
|
1136
|
+
* @callname: GenesisBuilder_build_state
|
|
1137
|
+
* @param {BytesLike} json
|
|
1122
1138
|
**/
|
|
1123
|
-
|
|
1139
|
+
buildState: GenericRuntimeApiMethod<(json: BytesLike) => Promise<Result<[], string>>>;
|
|
1124
1140
|
|
|
1125
1141
|
/**
|
|
1126
|
-
*
|
|
1142
|
+
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
|
|
1143
|
+
* `id`.
|
|
1127
1144
|
*
|
|
1128
|
-
*
|
|
1129
|
-
*
|
|
1130
|
-
*
|
|
1145
|
+
* If `id` is `None` the function returns JSON blob representation of the default
|
|
1146
|
+
* `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
|
|
1147
|
+
* `RuntimeGenesisConfig`.
|
|
1131
1148
|
*
|
|
1132
|
-
*
|
|
1149
|
+
* Otherwise function returns a JSON representation of the built-in, named
|
|
1150
|
+
* `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
|
|
1151
|
+
* exists. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
|
|
1152
|
+
* (potentially nested) key-value pairs that are intended for customizing the default
|
|
1153
|
+
* runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
|
|
1154
|
+
* of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
|
|
1155
|
+
* be used in `build_state` method.
|
|
1133
1156
|
*
|
|
1134
|
-
* @callname:
|
|
1135
|
-
* @param {
|
|
1157
|
+
* @callname: GenesisBuilder_get_preset
|
|
1158
|
+
* @param {string | undefined} id
|
|
1159
|
+
**/
|
|
1160
|
+
getPreset: GenericRuntimeApiMethod<(id?: string | undefined) => Promise<Bytes | undefined>>;
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
|
|
1164
|
+
*
|
|
1165
|
+
* The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If
|
|
1166
|
+
* no named presets are provided by the runtime the list is empty.
|
|
1167
|
+
*
|
|
1168
|
+
* @callname: GenesisBuilder_preset_names
|
|
1136
1169
|
**/
|
|
1137
|
-
|
|
1170
|
+
presetNames: GenericRuntimeApiMethod<() => Promise<Array<string>>>;
|
|
1138
1171
|
|
|
1139
1172
|
/**
|
|
1140
1173
|
* Generic runtime api call
|
package/rococo/tx.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import type {
|
|
|
28
28
|
SpSessionMembershipProof,
|
|
29
29
|
SpConsensusBabeDigestsNextConfigDescriptor,
|
|
30
30
|
PalletBalancesAdjustmentDirection,
|
|
31
|
+
RococoRuntimeRuntimeParameters,
|
|
31
32
|
RococoRuntimeSessionKeys,
|
|
32
33
|
SpConsensusGrandpaEquivocationProof,
|
|
33
34
|
PolkadotRuntimeCommonImplsVersionedLocatableAsset,
|
|
@@ -66,6 +67,8 @@ import type {
|
|
|
66
67
|
XcmVersionedAssets,
|
|
67
68
|
StagingXcmV4Location,
|
|
68
69
|
XcmV3WeightLimit,
|
|
70
|
+
StagingXcmExecutorAssetTransferTransferType,
|
|
71
|
+
XcmVersionedAssetId,
|
|
69
72
|
SpConsensusBeefyEquivocationProof,
|
|
70
73
|
PolkadotRuntimeParachainsParasParaGenesisArgs,
|
|
71
74
|
PolkadotRuntimeCommonAssignedSlotsSlotLeasePeriodStart,
|
|
@@ -756,6 +759,33 @@ export interface ChainTx extends GenericChainTx<TxCall> {
|
|
|
756
759
|
**/
|
|
757
760
|
[callName: string]: GenericTxCall<TxCall>;
|
|
758
761
|
};
|
|
762
|
+
/**
|
|
763
|
+
* Pallet `Parameters`'s transaction calls
|
|
764
|
+
**/
|
|
765
|
+
parameters: {
|
|
766
|
+
/**
|
|
767
|
+
* Set the value of a parameter.
|
|
768
|
+
*
|
|
769
|
+
* The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be
|
|
770
|
+
* deleted by setting them to `None`.
|
|
771
|
+
*
|
|
772
|
+
* @param {RococoRuntimeRuntimeParameters} keyValue
|
|
773
|
+
**/
|
|
774
|
+
setParameter: GenericTxCall<
|
|
775
|
+
(keyValue: RococoRuntimeRuntimeParameters) => ChainSubmittableExtrinsic<{
|
|
776
|
+
pallet: 'Parameters';
|
|
777
|
+
palletCall: {
|
|
778
|
+
name: 'SetParameter';
|
|
779
|
+
params: { keyValue: RococoRuntimeRuntimeParameters };
|
|
780
|
+
};
|
|
781
|
+
}>
|
|
782
|
+
>;
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* Generic pallet tx call
|
|
786
|
+
**/
|
|
787
|
+
[callName: string]: GenericTxCall<TxCall>;
|
|
788
|
+
};
|
|
759
789
|
/**
|
|
760
790
|
* Pallet `Session`'s transaction calls
|
|
761
791
|
**/
|
|
@@ -7025,6 +7055,27 @@ export interface ChainTx extends GenericChainTx<TxCall> {
|
|
|
7025
7055
|
}>
|
|
7026
7056
|
>;
|
|
7027
7057
|
|
|
7058
|
+
/**
|
|
7059
|
+
* Establish a bidirectional HRMP channel between a parachain and a system chain.
|
|
7060
|
+
*
|
|
7061
|
+
* Arguments:
|
|
7062
|
+
*
|
|
7063
|
+
* - `target_system_chain`: A system chain, `ParaId`.
|
|
7064
|
+
*
|
|
7065
|
+
* The origin needs to be the parachain origin.
|
|
7066
|
+
*
|
|
7067
|
+
* @param {PolkadotParachainPrimitivesPrimitivesId} targetSystemChain
|
|
7068
|
+
**/
|
|
7069
|
+
establishChannelWithSystem: GenericTxCall<
|
|
7070
|
+
(targetSystemChain: PolkadotParachainPrimitivesPrimitivesId) => ChainSubmittableExtrinsic<{
|
|
7071
|
+
pallet: 'Hrmp';
|
|
7072
|
+
palletCall: {
|
|
7073
|
+
name: 'EstablishChannelWithSystem';
|
|
7074
|
+
params: { targetSystemChain: PolkadotParachainPrimitivesPrimitivesId };
|
|
7075
|
+
};
|
|
7076
|
+
}>
|
|
7077
|
+
>;
|
|
7078
|
+
|
|
7028
7079
|
/**
|
|
7029
7080
|
* Generic pallet tx call
|
|
7030
7081
|
**/
|
|
@@ -7426,7 +7477,7 @@ export interface ChainTx extends GenericChainTx<TxCall> {
|
|
|
7426
7477
|
* validators have reported on the validity of the code, the code will either be enacted
|
|
7427
7478
|
* or the upgrade will be rejected. If the code will be enacted, the current code of the
|
|
7428
7479
|
* parachain will be overwritten directly. This means that any PoV will be checked by this
|
|
7429
|
-
* new code. The parachain itself will not be informed
|
|
7480
|
+
* new code. The parachain itself will not be informed explicitly that the validation code
|
|
7430
7481
|
* has changed.
|
|
7431
7482
|
*
|
|
7432
7483
|
* Can be called by Root, the parachain, or the parachain manager if the parachain is
|
|
@@ -7960,7 +8011,6 @@ export interface ChainTx extends GenericChainTx<TxCall> {
|
|
|
7960
8011
|
**/
|
|
7961
8012
|
xcmPallet: {
|
|
7962
8013
|
/**
|
|
7963
|
-
* WARNING: DEPRECATED. `send` will be removed after June 2024. Use `send_blob` instead.
|
|
7964
8014
|
*
|
|
7965
8015
|
* @param {XcmVersionedLocation} dest
|
|
7966
8016
|
* @param {XcmVersionedXcm} message
|
|
@@ -8090,9 +8140,6 @@ export interface ChainTx extends GenericChainTx<TxCall> {
|
|
|
8090
8140
|
* the maximum amount of weight that the message could take to be executed, then no
|
|
8091
8141
|
* execution attempt will be made.
|
|
8092
8142
|
*
|
|
8093
|
-
* WARNING: DEPRECATED. `execute` will be removed after June 2024. Use `execute_blob`
|
|
8094
|
-
* instead.
|
|
8095
|
-
*
|
|
8096
8143
|
* @param {XcmVersionedXcm} message
|
|
8097
8144
|
* @param {SpWeightsWeightV2Weight} maxWeight
|
|
8098
8145
|
**/
|
|
@@ -8404,53 +8451,85 @@ export interface ChainTx extends GenericChainTx<TxCall> {
|
|
|
8404
8451
|
>;
|
|
8405
8452
|
|
|
8406
8453
|
/**
|
|
8407
|
-
*
|
|
8408
|
-
*
|
|
8409
|
-
* An event is deposited indicating whether the message could be executed completely
|
|
8410
|
-
* or only partially.
|
|
8411
|
-
*
|
|
8412
|
-
* No more than `max_weight` will be used in its attempted execution. If this is less than
|
|
8413
|
-
* the maximum amount of weight that the message could take to be executed, then no
|
|
8414
|
-
* execution attempt will be made.
|
|
8454
|
+
* Transfer assets from the local chain to the destination chain using explicit transfer
|
|
8455
|
+
* types for assets and fees.
|
|
8415
8456
|
*
|
|
8416
|
-
*
|
|
8457
|
+
* `assets` must have same reserve location or may be teleportable to `dest`. Caller must
|
|
8458
|
+
* provide the `assets_transfer_type` to be used for `assets`:
|
|
8459
|
+
* - `TransferType::LocalReserve`: transfer assets to sovereign account of destination
|
|
8460
|
+
* chain and forward a notification XCM to `dest` to mint and deposit reserve-based
|
|
8461
|
+
* assets to `beneficiary`.
|
|
8462
|
+
* - `TransferType::DestinationReserve`: burn local assets and forward a notification to
|
|
8463
|
+
* `dest` chain to withdraw the reserve assets from this chain's sovereign account and
|
|
8464
|
+
* deposit them to `beneficiary`.
|
|
8465
|
+
* - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve`
|
|
8466
|
+
* chain to move reserves from this chain's SA to `dest` chain's SA, and forward another
|
|
8467
|
+
* XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically
|
|
8468
|
+
* the remote `reserve` is Asset Hub.
|
|
8469
|
+
* - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to
|
|
8470
|
+
* mint/teleport assets and deposit them to `beneficiary`.
|
|
8471
|
+
*
|
|
8472
|
+
* On the destination chain, as well as any intermediary hops, `BuyExecution` is used to
|
|
8473
|
+
* buy execution using transferred `assets` identified by `remote_fees_id`.
|
|
8474
|
+
* Make sure enough of the specified `remote_fees_id` asset is included in the given list
|
|
8475
|
+
* of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight
|
|
8476
|
+
* is needed than `weight_limit`, then the operation will fail and the sent assets may be
|
|
8477
|
+
* at risk.
|
|
8417
8478
|
*
|
|
8418
|
-
*
|
|
8419
|
-
*
|
|
8420
|
-
**/
|
|
8421
|
-
executeBlob: GenericTxCall<
|
|
8422
|
-
(
|
|
8423
|
-
encodedMessage: BytesLike,
|
|
8424
|
-
maxWeight: SpWeightsWeightV2Weight,
|
|
8425
|
-
) => ChainSubmittableExtrinsic<{
|
|
8426
|
-
pallet: 'XcmPallet';
|
|
8427
|
-
palletCall: {
|
|
8428
|
-
name: 'ExecuteBlob';
|
|
8429
|
-
params: { encodedMessage: BytesLike; maxWeight: SpWeightsWeightV2Weight };
|
|
8430
|
-
};
|
|
8431
|
-
}>
|
|
8432
|
-
>;
|
|
8433
|
-
|
|
8434
|
-
/**
|
|
8435
|
-
* Send an XCM from a local, signed, origin.
|
|
8479
|
+
* `remote_fees_id` may use different transfer type than rest of `assets` and can be
|
|
8480
|
+
* specified through `fees_transfer_type`.
|
|
8436
8481
|
*
|
|
8437
|
-
* The
|
|
8438
|
-
*
|
|
8482
|
+
* The caller needs to specify what should happen to the transferred assets once they reach
|
|
8483
|
+
* the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which
|
|
8484
|
+
* contains the instructions to execute on `dest` as a final step.
|
|
8485
|
+
* This is usually as simple as:
|
|
8486
|
+
* `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`,
|
|
8487
|
+
* but could be something more exotic like sending the `assets` even further.
|
|
8439
8488
|
*
|
|
8440
|
-
*
|
|
8489
|
+
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
8490
|
+
* - `dest`: Destination context for the assets. Will typically be `[Parent,
|
|
8491
|
+
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
|
|
8492
|
+
* relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from
|
|
8493
|
+
* parachain across a bridge to another ecosystem destination.
|
|
8494
|
+
* - `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
8495
|
+
* fee on the `dest` (and possibly reserve) chains.
|
|
8496
|
+
* - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`.
|
|
8497
|
+
* - `remote_fees_id`: One of the included `assets` to be be used to pay fees.
|
|
8498
|
+
* - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets.
|
|
8499
|
+
* - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the
|
|
8500
|
+
* transfer, which also determines what happens to the assets on the destination chain.
|
|
8501
|
+
* - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
|
|
8441
8502
|
*
|
|
8442
8503
|
* @param {XcmVersionedLocation} dest
|
|
8443
|
-
* @param {
|
|
8504
|
+
* @param {XcmVersionedAssets} assets
|
|
8505
|
+
* @param {StagingXcmExecutorAssetTransferTransferType} assetsTransferType
|
|
8506
|
+
* @param {XcmVersionedAssetId} remoteFeesId
|
|
8507
|
+
* @param {StagingXcmExecutorAssetTransferTransferType} feesTransferType
|
|
8508
|
+
* @param {XcmVersionedXcm} customXcmOnDest
|
|
8509
|
+
* @param {XcmV3WeightLimit} weightLimit
|
|
8444
8510
|
**/
|
|
8445
|
-
|
|
8511
|
+
transferAssetsUsingTypeAndThen: GenericTxCall<
|
|
8446
8512
|
(
|
|
8447
8513
|
dest: XcmVersionedLocation,
|
|
8448
|
-
|
|
8514
|
+
assets: XcmVersionedAssets,
|
|
8515
|
+
assetsTransferType: StagingXcmExecutorAssetTransferTransferType,
|
|
8516
|
+
remoteFeesId: XcmVersionedAssetId,
|
|
8517
|
+
feesTransferType: StagingXcmExecutorAssetTransferTransferType,
|
|
8518
|
+
customXcmOnDest: XcmVersionedXcm,
|
|
8519
|
+
weightLimit: XcmV3WeightLimit,
|
|
8449
8520
|
) => ChainSubmittableExtrinsic<{
|
|
8450
8521
|
pallet: 'XcmPallet';
|
|
8451
8522
|
palletCall: {
|
|
8452
|
-
name: '
|
|
8453
|
-
params: {
|
|
8523
|
+
name: 'TransferAssetsUsingTypeAndThen';
|
|
8524
|
+
params: {
|
|
8525
|
+
dest: XcmVersionedLocation;
|
|
8526
|
+
assets: XcmVersionedAssets;
|
|
8527
|
+
assetsTransferType: StagingXcmExecutorAssetTransferTransferType;
|
|
8528
|
+
remoteFeesId: XcmVersionedAssetId;
|
|
8529
|
+
feesTransferType: StagingXcmExecutorAssetTransferTransferType;
|
|
8530
|
+
customXcmOnDest: XcmVersionedXcm;
|
|
8531
|
+
weightLimit: XcmV3WeightLimit;
|
|
8532
|
+
};
|
|
8454
8533
|
};
|
|
8455
8534
|
}>
|
|
8456
8535
|
>;
|