@decentro-dev/polkadot-sufficient-assets 0.0.1
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/LICENSE +201 -0
- package/README.md +60 -0
- package/package.json +99 -0
- package/packages/client/README.md +333 -0
- package/packages/client/dist/chain-specs/ksmcc3/index.d.mts +1 -0
- package/packages/client/dist/chain-specs/ksmcc3/index.d.ts +1 -0
- package/packages/client/dist/chain-specs/ksmcc3/index.js +2 -0
- package/packages/client/dist/chain-specs/ksmcc3/index.mjs +2 -0
- package/packages/client/dist/chain-specs/ksmcc3_asset_hub/index.d.mts +1 -0
- package/packages/client/dist/chain-specs/ksmcc3_asset_hub/index.d.ts +1 -0
- package/packages/client/dist/chain-specs/ksmcc3_asset_hub/index.js +2 -0
- package/packages/client/dist/chain-specs/ksmcc3_asset_hub/index.mjs +2 -0
- package/packages/client/dist/chain-specs/paseo/index.d.mts +1 -0
- package/packages/client/dist/chain-specs/paseo/index.d.ts +1 -0
- package/packages/client/dist/chain-specs/paseo/index.js +2 -0
- package/packages/client/dist/chain-specs/paseo/index.mjs +2 -0
- package/packages/client/dist/chain-specs/paseo_asset_hub/index.d.mts +1 -0
- package/packages/client/dist/chain-specs/paseo_asset_hub/index.d.ts +1 -0
- package/packages/client/dist/chain-specs/paseo_asset_hub/index.js +2 -0
- package/packages/client/dist/chain-specs/paseo_asset_hub/index.mjs +2 -0
- package/packages/client/dist/chain-specs/polkadot/index.d.mts +1 -0
- package/packages/client/dist/chain-specs/polkadot/index.d.ts +1 -0
- package/packages/client/dist/chain-specs/polkadot/index.js +2 -0
- package/packages/client/dist/chain-specs/polkadot/index.mjs +2 -0
- package/packages/client/dist/chain-specs/polkadot_asset_hub/index.d.mts +1 -0
- package/packages/client/dist/chain-specs/polkadot_asset_hub/index.d.ts +1 -0
- package/packages/client/dist/chain-specs/polkadot_asset_hub/index.js +2 -0
- package/packages/client/dist/chain-specs/polkadot_asset_hub/index.mjs +2 -0
- package/packages/client/dist/chain-specs/rococo_v2_2/index.d.mts +1 -0
- package/packages/client/dist/chain-specs/rococo_v2_2/index.d.ts +1 -0
- package/packages/client/dist/chain-specs/rococo_v2_2/index.js +2 -0
- package/packages/client/dist/chain-specs/rococo_v2_2/index.mjs +2 -0
- package/packages/client/dist/chain-specs/rococo_v2_2_asset_hub/index.d.mts +1 -0
- package/packages/client/dist/chain-specs/rococo_v2_2_asset_hub/index.d.ts +1 -0
- package/packages/client/dist/chain-specs/rococo_v2_2_asset_hub/index.js +2 -0
- package/packages/client/dist/chain-specs/rococo_v2_2_asset_hub/index.mjs +2 -0
- package/packages/client/dist/chain-specs/westend2/index.d.mts +1 -0
- package/packages/client/dist/chain-specs/westend2/index.d.ts +1 -0
- package/packages/client/dist/chain-specs/westend2/index.js +2 -0
- package/packages/client/dist/chain-specs/westend2/index.mjs +2 -0
- package/packages/client/dist/chain-specs/westend2_asset_hub/index.d.mts +1 -0
- package/packages/client/dist/chain-specs/westend2_asset_hub/index.d.ts +1 -0
- package/packages/client/dist/chain-specs/westend2_asset_hub/index.js +2 -0
- package/packages/client/dist/chain-specs/westend2_asset_hub/index.mjs +2 -0
- package/packages/client/dist/index.d.mts +106 -0
- package/packages/client/dist/index.d.ts +106 -0
- package/packages/client/dist/index.js +2 -0
- package/packages/client/dist/index.mjs +2 -0
- package/packages/client/dist/smoldot/from-node-worker/index.d.mts +1 -0
- package/packages/client/dist/smoldot/from-node-worker/index.d.ts +1 -0
- package/packages/client/dist/smoldot/from-node-worker/index.js +2 -0
- package/packages/client/dist/smoldot/from-node-worker/index.mjs +2 -0
- package/packages/client/dist/smoldot/from-worker/index.d.mts +1 -0
- package/packages/client/dist/smoldot/from-worker/index.d.ts +1 -0
- package/packages/client/dist/smoldot/from-worker/index.js +2 -0
- package/packages/client/dist/smoldot/from-worker/index.mjs +2 -0
- package/packages/client/dist/smoldot/index.d.mts +14 -0
- package/packages/client/dist/smoldot/index.d.ts +14 -0
- package/packages/client/dist/smoldot/index.js +2 -0
- package/packages/client/dist/smoldot/index.mjs +2 -0
- package/packages/client/dist/smoldot/worker/index.d.mts +1 -0
- package/packages/client/dist/smoldot/worker/index.d.ts +1 -0
- package/packages/client/dist/smoldot/worker/index.js +2 -0
- package/packages/client/dist/smoldot/worker/index.mjs +2 -0
- package/packages/core/.papi/descriptors/dist/common-types.d.ts +21274 -0
- package/packages/core/.papi/descriptors/dist/descriptors-EQXQJ7SL.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/descriptors.d.ts +11 -0
- package/packages/core/.papi/descriptors/dist/hdx.d.ts +366 -0
- package/packages/core/.papi/descriptors/dist/hdx_metadata-XH2Y6EGQ.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/hdx_metadata.d.ts +2 -0
- package/packages/core/.papi/descriptors/dist/index.d.mts +24579 -0
- package/packages/core/.papi/descriptors/dist/index.d.ts +23 -0
- package/packages/core/.papi/descriptors/dist/index.js +1 -0
- package/packages/core/.papi/descriptors/dist/index.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/kah.d.ts +434 -0
- package/packages/core/.papi/descriptors/dist/kah_metadata-OCBL5LAN.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/kah_metadata.d.ts +2 -0
- package/packages/core/.papi/descriptors/dist/kusama.d.ts +291 -0
- package/packages/core/.papi/descriptors/dist/kusama_metadata-TGJ43LLG.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/kusama_metadata.d.ts +2 -0
- package/packages/core/.papi/descriptors/dist/metadataTypes-MIM6CGSL.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/metadataTypes.d.ts +2 -0
- package/packages/core/.papi/descriptors/dist/pah.d.ts +434 -0
- package/packages/core/.papi/descriptors/dist/pah_metadata-JG7F7QDO.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/pah_metadata.d.ts +2 -0
- package/packages/core/.papi/descriptors/dist/paseo.d.ts +291 -0
- package/packages/core/.papi/descriptors/dist/paseo_metadata-5VVMOYKO.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/paseo_metadata.d.ts +2 -0
- package/packages/core/.papi/descriptors/dist/paseoah.d.ts +242 -0
- package/packages/core/.papi/descriptors/dist/paseoah_metadata-KVQKFE5R.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/paseoah_metadata.d.ts +2 -0
- package/packages/core/.papi/descriptors/dist/polkadot.d.ts +291 -0
- package/packages/core/.papi/descriptors/dist/polkadot_metadata-ASE5745E.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/polkadot_metadata.d.ts +2 -0
- package/packages/core/.papi/descriptors/dist/rah.d.ts +434 -0
- package/packages/core/.papi/descriptors/dist/rah_metadata-FL7L2MWD.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/rah_metadata.d.ts +2 -0
- package/packages/core/.papi/descriptors/dist/rococo.d.ts +291 -0
- package/packages/core/.papi/descriptors/dist/rococo_metadata-CHYQZIV5.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/rococo_metadata.d.ts +2 -0
- package/packages/core/.papi/descriptors/dist/wah.d.ts +434 -0
- package/packages/core/.papi/descriptors/dist/wah_metadata-M2H6IX7C.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/wah_metadata.d.ts +2 -0
- package/packages/core/.papi/descriptors/dist/westend.d.ts +291 -0
- package/packages/core/.papi/descriptors/dist/westend_metadata-IAM3KHRQ.mjs +1 -0
- package/packages/core/.papi/descriptors/dist/westend_metadata.d.ts +2 -0
- package/packages/core/.papi/descriptors/package.json +24 -0
- package/packages/core/.papi/metadata/hdx.scale +0 -0
- package/packages/core/.papi/metadata/kah.scale +0 -0
- package/packages/core/.papi/metadata/kusama.scale +0 -0
- package/packages/core/.papi/metadata/pah.scale +0 -0
- package/packages/core/.papi/metadata/paseo.scale +0 -0
- package/packages/core/.papi/metadata/paseoah.scale +0 -0
- package/packages/core/.papi/metadata/polkadot.scale +0 -0
- package/packages/core/.papi/metadata/rah.scale +0 -0
- package/packages/core/.papi/metadata/rococo.scale +0 -0
- package/packages/core/.papi/metadata/wah.scale +0 -0
- package/packages/core/.papi/metadata/westend.scale +0 -0
- package/packages/core/.papi/polkadot-api.json +50 -0
- package/packages/core/dist/index.d.mts +676 -0
- package/packages/core/dist/index.d.ts +676 -0
- package/packages/core/dist/index.js +1 -0
- package/packages/core/dist/index.mjs +1 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { StorageDescriptor, PlainDescriptor, TxDescriptor, Enum, QueryFromPalletsDef, TxFromPalletsDef, EventsFromPalletsDef, ErrorsFromPalletsDef, ConstFromPalletsDef, SS58String, Binary, FixedSizeBinary, FixedSizeArray } from "polkadot-api";
|
|
2
|
+
import { I5sesotjlssv2d, I1q8tnt1cluu5j, I4ktuaksf5i1gk, I3gjjd2kmfr3gt, Iakevv83i18n4r, I5gi8h3e5lkbeq, I84lqest6ohk0p } from "./common-types";
|
|
3
|
+
type AnonymousEnum<T extends {}> = T & {
|
|
4
|
+
__anonymous: true;
|
|
5
|
+
};
|
|
6
|
+
type MyTuple<T> = [T, ...T[]];
|
|
7
|
+
type SeparateUndefined<T> = undefined extends T ? undefined | Exclude<T, undefined> : T;
|
|
8
|
+
type Anonymize<T> = SeparateUndefined<T extends FixedSizeBinary<infer L> ? number extends L ? Binary : FixedSizeBinary<L> : T extends string | number | bigint | boolean | void | undefined | null | symbol | Uint8Array | Enum<any> ? T : T extends AnonymousEnum<infer V> ? Enum<V> : T extends MyTuple<any> ? {
|
|
9
|
+
[K in keyof T]: T[K];
|
|
10
|
+
} : T extends [] ? [] : T extends FixedSizeArray<infer L, infer T> ? number extends L ? Array<T> : FixedSizeArray<L, T> : {
|
|
11
|
+
[K in keyof T & string]: T[K];
|
|
12
|
+
}>;
|
|
13
|
+
type IStorage = {
|
|
14
|
+
System: {
|
|
15
|
+
/**
|
|
16
|
+
* The full account information for a particular account ID.
|
|
17
|
+
*/
|
|
18
|
+
Account: StorageDescriptor<[Key: SS58String], Anonymize<I5sesotjlssv2d>, false, never>;
|
|
19
|
+
};
|
|
20
|
+
Balances: {
|
|
21
|
+
/**
|
|
22
|
+
* The total units issued in the system.
|
|
23
|
+
*/
|
|
24
|
+
TotalIssuance: StorageDescriptor<[], bigint, false, never>;
|
|
25
|
+
/**
|
|
26
|
+
* The Balances pallet example of storing the balance of an account.
|
|
27
|
+
*
|
|
28
|
+
* # Example
|
|
29
|
+
*
|
|
30
|
+
* ```nocompile
|
|
31
|
+
* impl pallet_balances::Config for Runtime {
|
|
32
|
+
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* You can also store the balance of an account in the `System` pallet.
|
|
37
|
+
*
|
|
38
|
+
* # Example
|
|
39
|
+
*
|
|
40
|
+
* ```nocompile
|
|
41
|
+
* impl pallet_balances::Config for Runtime {
|
|
42
|
+
* type AccountStore = System
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* But this comes with tradeoffs, storing account balances in the system pallet stores
|
|
47
|
+
* `frame_system` data alongside the account data contrary to storing account balances in the
|
|
48
|
+
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
|
|
49
|
+
* NOTE: This is only used in the case that this pallet is used to store balances.
|
|
50
|
+
*/
|
|
51
|
+
Account: StorageDescriptor<[Key: SS58String], Anonymize<I1q8tnt1cluu5j>, false, never>;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
type ICalls = {
|
|
55
|
+
Balances: {
|
|
56
|
+
/**
|
|
57
|
+
*Same as the [`transfer_allow_death`] call, but with a check that the transfer will not
|
|
58
|
+
*kill the origin account.
|
|
59
|
+
*
|
|
60
|
+
*99% of the time you want [`transfer_allow_death`] instead.
|
|
61
|
+
*
|
|
62
|
+
*[`transfer_allow_death`]: struct.Pallet.html#method.transfer
|
|
63
|
+
*/
|
|
64
|
+
transfer_keep_alive: TxDescriptor<Anonymize<I4ktuaksf5i1gk>>;
|
|
65
|
+
};
|
|
66
|
+
Utility: {
|
|
67
|
+
/**
|
|
68
|
+
*Send a batch of dispatch calls and atomically execute them.
|
|
69
|
+
*The whole transaction will rollback and fail if any of the calls failed.
|
|
70
|
+
*
|
|
71
|
+
*May be called from any origin except `None`.
|
|
72
|
+
*
|
|
73
|
+
*- `calls`: The calls to be dispatched from the same origin. The number of call must not
|
|
74
|
+
* exceed the constant: `batched_calls_limit` (available in constant metadata).
|
|
75
|
+
*
|
|
76
|
+
*If origin is root then the calls are dispatched without checking origin filter. (This
|
|
77
|
+
*includes bypassing `frame_system::Config::BaseCallFilter`).
|
|
78
|
+
*
|
|
79
|
+
*## Complexity
|
|
80
|
+
*- O(C) where C is the number of calls to be batched.
|
|
81
|
+
*/
|
|
82
|
+
batch_all: TxDescriptor<Anonymize<I3gjjd2kmfr3gt>>;
|
|
83
|
+
};
|
|
84
|
+
XcmPallet: {
|
|
85
|
+
/**
|
|
86
|
+
*Teleport some assets from the local chain to some destination chain.
|
|
87
|
+
*
|
|
88
|
+
***This function is deprecated: Use `limited_teleport_assets` instead.**
|
|
89
|
+
*
|
|
90
|
+
*Fee payment on the destination side is made from the asset in the `assets` vector of
|
|
91
|
+
*index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
|
92
|
+
*with all fees taken as needed from the asset.
|
|
93
|
+
*
|
|
94
|
+
*- `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
95
|
+
*- `dest`: Destination context for the assets. Will typically be `[Parent,
|
|
96
|
+
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
|
|
97
|
+
* relay to parachain.
|
|
98
|
+
*- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will
|
|
99
|
+
* generally be an `AccountId32` value.
|
|
100
|
+
*- `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
101
|
+
* fee on the `dest` chain.
|
|
102
|
+
*- `fee_asset_item`: The index into `assets` of the item which should be used to pay
|
|
103
|
+
* fees.
|
|
104
|
+
*/
|
|
105
|
+
teleport_assets: TxDescriptor<Anonymize<Iakevv83i18n4r>>;
|
|
106
|
+
/**
|
|
107
|
+
*Transfer some assets from the local chain to the destination chain through their local,
|
|
108
|
+
*destination or remote reserve.
|
|
109
|
+
*
|
|
110
|
+
*`assets` must have same reserve location and may not be teleportable to `dest`.
|
|
111
|
+
* - `assets` have local reserve: transfer assets to sovereign account of destination
|
|
112
|
+
* chain and forward a notification XCM to `dest` to mint and deposit reserve-based
|
|
113
|
+
* assets to `beneficiary`.
|
|
114
|
+
* - `assets` have destination reserve: burn local assets and forward a notification to
|
|
115
|
+
* `dest` chain to withdraw the reserve assets from this chain's sovereign account and
|
|
116
|
+
* deposit them to `beneficiary`.
|
|
117
|
+
* - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move
|
|
118
|
+
* reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest`
|
|
119
|
+
* to mint and deposit reserve-based assets to `beneficiary`.
|
|
120
|
+
*
|
|
121
|
+
***This function is deprecated: Use `limited_reserve_transfer_assets` instead.**
|
|
122
|
+
*
|
|
123
|
+
*Fee payment on the destination side is made from the asset in the `assets` vector of
|
|
124
|
+
*index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
|
125
|
+
*with all fees taken as needed from the asset.
|
|
126
|
+
*
|
|
127
|
+
*- `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
128
|
+
*- `dest`: Destination context for the assets. Will typically be `[Parent,
|
|
129
|
+
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
|
|
130
|
+
* relay to parachain.
|
|
131
|
+
*- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will
|
|
132
|
+
* generally be an `AccountId32` value.
|
|
133
|
+
*- `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
134
|
+
* fee on the `dest` (and possibly reserve) chains.
|
|
135
|
+
*- `fee_asset_item`: The index into `assets` of the item which should be used to pay
|
|
136
|
+
* fees.
|
|
137
|
+
*/
|
|
138
|
+
reserve_transfer_assets: TxDescriptor<Anonymize<Iakevv83i18n4r>>;
|
|
139
|
+
/**
|
|
140
|
+
*Transfer some assets from the local chain to the destination chain through their local,
|
|
141
|
+
*destination or remote reserve.
|
|
142
|
+
*
|
|
143
|
+
*`assets` must have same reserve location and may not be teleportable to `dest`.
|
|
144
|
+
* - `assets` have local reserve: transfer assets to sovereign account of destination
|
|
145
|
+
* chain and forward a notification XCM to `dest` to mint and deposit reserve-based
|
|
146
|
+
* assets to `beneficiary`.
|
|
147
|
+
* - `assets` have destination reserve: burn local assets and forward a notification to
|
|
148
|
+
* `dest` chain to withdraw the reserve assets from this chain's sovereign account and
|
|
149
|
+
* deposit them to `beneficiary`.
|
|
150
|
+
* - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move
|
|
151
|
+
* reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest`
|
|
152
|
+
* to mint and deposit reserve-based assets to `beneficiary`.
|
|
153
|
+
*
|
|
154
|
+
*Fee payment on the destination side is made from the asset in the `assets` vector of
|
|
155
|
+
*index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
|
156
|
+
*is needed than `weight_limit`, then the operation will fail and the sent assets may be
|
|
157
|
+
*at risk.
|
|
158
|
+
*
|
|
159
|
+
*- `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
160
|
+
*- `dest`: Destination context for the assets. Will typically be `[Parent,
|
|
161
|
+
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
|
|
162
|
+
* relay to parachain.
|
|
163
|
+
*- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will
|
|
164
|
+
* generally be an `AccountId32` value.
|
|
165
|
+
*- `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
166
|
+
* fee on the `dest` (and possibly reserve) chains.
|
|
167
|
+
*- `fee_asset_item`: The index into `assets` of the item which should be used to pay
|
|
168
|
+
* fees.
|
|
169
|
+
*- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
|
|
170
|
+
*/
|
|
171
|
+
limited_reserve_transfer_assets: TxDescriptor<Anonymize<I5gi8h3e5lkbeq>>;
|
|
172
|
+
/**
|
|
173
|
+
*Teleport some assets from the local chain to some destination chain.
|
|
174
|
+
*
|
|
175
|
+
*Fee payment on the destination side is made from the asset in the `assets` vector of
|
|
176
|
+
*index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
|
177
|
+
*is needed than `weight_limit`, then the operation will fail and the sent assets may be
|
|
178
|
+
*at risk.
|
|
179
|
+
*
|
|
180
|
+
*- `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
181
|
+
*- `dest`: Destination context for the assets. Will typically be `[Parent,
|
|
182
|
+
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
|
|
183
|
+
* relay to parachain.
|
|
184
|
+
*- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will
|
|
185
|
+
* generally be an `AccountId32` value.
|
|
186
|
+
*- `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
187
|
+
* fee on the `dest` chain.
|
|
188
|
+
*- `fee_asset_item`: The index into `assets` of the item which should be used to pay
|
|
189
|
+
* fees.
|
|
190
|
+
*- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
|
|
191
|
+
*/
|
|
192
|
+
limited_teleport_assets: TxDescriptor<Anonymize<I5gi8h3e5lkbeq>>;
|
|
193
|
+
/**
|
|
194
|
+
*Transfer some assets from the local chain to the destination chain through their local,
|
|
195
|
+
*destination or remote reserve, or through teleports.
|
|
196
|
+
*
|
|
197
|
+
*Fee payment on the destination side is made from the asset in the `assets` vector of
|
|
198
|
+
*index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for
|
|
199
|
+
*`weight_limit` of weight. If more weight is needed than `weight_limit`, then the
|
|
200
|
+
*operation will fail and the sent assets may be at risk.
|
|
201
|
+
*
|
|
202
|
+
*`assets` (excluding `fees`) must have same reserve location or otherwise be teleportable
|
|
203
|
+
*to `dest`, no limitations imposed on `fees`.
|
|
204
|
+
* - for local reserve: transfer assets to sovereign account of destination chain and
|
|
205
|
+
* forward a notification XCM to `dest` to mint and deposit reserve-based assets to
|
|
206
|
+
* `beneficiary`.
|
|
207
|
+
* - for destination reserve: burn local assets and forward a notification to `dest` chain
|
|
208
|
+
* to withdraw the reserve assets from this chain's sovereign account and deposit them
|
|
209
|
+
* to `beneficiary`.
|
|
210
|
+
* - for remote reserve: burn local assets, forward XCM to reserve chain to move reserves
|
|
211
|
+
* from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint
|
|
212
|
+
* and deposit reserve-based assets to `beneficiary`.
|
|
213
|
+
* - for teleports: burn local assets and forward XCM to `dest` chain to mint/teleport
|
|
214
|
+
* assets and deposit them to `beneficiary`.
|
|
215
|
+
*
|
|
216
|
+
*- `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
217
|
+
*- `dest`: Destination context for the assets. Will typically be `X2(Parent,
|
|
218
|
+
* Parachain(..))` to send from parachain to parachain, or `X1(Parachain(..))` to send
|
|
219
|
+
* from relay to parachain.
|
|
220
|
+
*- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will
|
|
221
|
+
* generally be an `AccountId32` value.
|
|
222
|
+
*- `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
223
|
+
* fee on the `dest` (and possibly reserve) chains.
|
|
224
|
+
*- `fee_asset_item`: The index into `assets` of the item which should be used to pay
|
|
225
|
+
* fees.
|
|
226
|
+
*- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
|
|
227
|
+
*/
|
|
228
|
+
transfer_assets: TxDescriptor<Anonymize<I5gi8h3e5lkbeq>>;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
type IEvent = {};
|
|
232
|
+
type IError = {};
|
|
233
|
+
type IConstants = {
|
|
234
|
+
Balances: {
|
|
235
|
+
/**
|
|
236
|
+
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
|
|
237
|
+
*
|
|
238
|
+
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
|
|
239
|
+
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
|
|
240
|
+
* In case you have multiple sources of provider references, you may also get unexpected
|
|
241
|
+
* behaviour if you set this to zero.
|
|
242
|
+
*
|
|
243
|
+
* Bottom line: Do yourself a favour and make it at least one!
|
|
244
|
+
*/
|
|
245
|
+
ExistentialDeposit: PlainDescriptor<bigint>;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
type IRuntimeCalls = {};
|
|
249
|
+
type IAsset = PlainDescriptor<void>;
|
|
250
|
+
export type PolkadotDispatchError = unknown;
|
|
251
|
+
type PalletsTypedef = {
|
|
252
|
+
__storage: IStorage;
|
|
253
|
+
__tx: ICalls;
|
|
254
|
+
__event: IEvent;
|
|
255
|
+
__error: IError;
|
|
256
|
+
__const: IConstants;
|
|
257
|
+
};
|
|
258
|
+
type IDescriptors = {
|
|
259
|
+
descriptors: {
|
|
260
|
+
pallets: PalletsTypedef;
|
|
261
|
+
apis: IRuntimeCalls;
|
|
262
|
+
} & Promise<any>;
|
|
263
|
+
metadataTypes: Promise<Uint8Array>;
|
|
264
|
+
asset: IAsset;
|
|
265
|
+
getMetadata: () => Promise<Uint8Array>;
|
|
266
|
+
genesis: string | undefined;
|
|
267
|
+
};
|
|
268
|
+
declare const _allDescriptors: IDescriptors;
|
|
269
|
+
export default _allDescriptors;
|
|
270
|
+
export type PolkadotQueries = QueryFromPalletsDef<PalletsTypedef>;
|
|
271
|
+
export type PolkadotCalls = TxFromPalletsDef<PalletsTypedef>;
|
|
272
|
+
export type PolkadotEvents = EventsFromPalletsDef<PalletsTypedef>;
|
|
273
|
+
export type PolkadotErrors = ErrorsFromPalletsDef<PalletsTypedef>;
|
|
274
|
+
export type PolkadotConstants = ConstFromPalletsDef<PalletsTypedef>;
|
|
275
|
+
export type PolkadotCallData = Anonymize<I84lqest6ohk0p> & {
|
|
276
|
+
value: {
|
|
277
|
+
type: string;
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
export type PolkadotWhitelistEntry = PalletKey | ApiKey<IRuntimeCalls> | `query.${NestedKey<PalletsTypedef['__storage']>}` | `tx.${NestedKey<PalletsTypedef['__tx']>}` | `event.${NestedKey<PalletsTypedef['__event']>}` | `error.${NestedKey<PalletsTypedef['__error']>}` | `const.${NestedKey<PalletsTypedef['__const']>}`;
|
|
281
|
+
type PalletKey = `*.${keyof (IStorage & ICalls & IEvent & IError & IConstants & IRuntimeCalls)}`;
|
|
282
|
+
type NestedKey<D extends Record<string, Record<string, any>>> = "*" | {
|
|
283
|
+
[P in keyof D & string]: `${P}.*` | {
|
|
284
|
+
[N in keyof D[P] & string]: `${P}.${N}`;
|
|
285
|
+
}[keyof D[P] & string];
|
|
286
|
+
}[keyof D & string];
|
|
287
|
+
type ApiKey<D extends Record<string, Record<string, any>>> = "api.*" | {
|
|
288
|
+
[P in keyof D & string]: `api.${P}.*` | {
|
|
289
|
+
[N in keyof D[P] & string]: `api.${P}.${N}`;
|
|
290
|
+
}[keyof D[P] & string];
|
|
291
|
+
}[keyof D & string];
|