@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.
Files changed (123) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +60 -0
  3. package/package.json +99 -0
  4. package/packages/client/README.md +333 -0
  5. package/packages/client/dist/chain-specs/ksmcc3/index.d.mts +1 -0
  6. package/packages/client/dist/chain-specs/ksmcc3/index.d.ts +1 -0
  7. package/packages/client/dist/chain-specs/ksmcc3/index.js +2 -0
  8. package/packages/client/dist/chain-specs/ksmcc3/index.mjs +2 -0
  9. package/packages/client/dist/chain-specs/ksmcc3_asset_hub/index.d.mts +1 -0
  10. package/packages/client/dist/chain-specs/ksmcc3_asset_hub/index.d.ts +1 -0
  11. package/packages/client/dist/chain-specs/ksmcc3_asset_hub/index.js +2 -0
  12. package/packages/client/dist/chain-specs/ksmcc3_asset_hub/index.mjs +2 -0
  13. package/packages/client/dist/chain-specs/paseo/index.d.mts +1 -0
  14. package/packages/client/dist/chain-specs/paseo/index.d.ts +1 -0
  15. package/packages/client/dist/chain-specs/paseo/index.js +2 -0
  16. package/packages/client/dist/chain-specs/paseo/index.mjs +2 -0
  17. package/packages/client/dist/chain-specs/paseo_asset_hub/index.d.mts +1 -0
  18. package/packages/client/dist/chain-specs/paseo_asset_hub/index.d.ts +1 -0
  19. package/packages/client/dist/chain-specs/paseo_asset_hub/index.js +2 -0
  20. package/packages/client/dist/chain-specs/paseo_asset_hub/index.mjs +2 -0
  21. package/packages/client/dist/chain-specs/polkadot/index.d.mts +1 -0
  22. package/packages/client/dist/chain-specs/polkadot/index.d.ts +1 -0
  23. package/packages/client/dist/chain-specs/polkadot/index.js +2 -0
  24. package/packages/client/dist/chain-specs/polkadot/index.mjs +2 -0
  25. package/packages/client/dist/chain-specs/polkadot_asset_hub/index.d.mts +1 -0
  26. package/packages/client/dist/chain-specs/polkadot_asset_hub/index.d.ts +1 -0
  27. package/packages/client/dist/chain-specs/polkadot_asset_hub/index.js +2 -0
  28. package/packages/client/dist/chain-specs/polkadot_asset_hub/index.mjs +2 -0
  29. package/packages/client/dist/chain-specs/rococo_v2_2/index.d.mts +1 -0
  30. package/packages/client/dist/chain-specs/rococo_v2_2/index.d.ts +1 -0
  31. package/packages/client/dist/chain-specs/rococo_v2_2/index.js +2 -0
  32. package/packages/client/dist/chain-specs/rococo_v2_2/index.mjs +2 -0
  33. package/packages/client/dist/chain-specs/rococo_v2_2_asset_hub/index.d.mts +1 -0
  34. package/packages/client/dist/chain-specs/rococo_v2_2_asset_hub/index.d.ts +1 -0
  35. package/packages/client/dist/chain-specs/rococo_v2_2_asset_hub/index.js +2 -0
  36. package/packages/client/dist/chain-specs/rococo_v2_2_asset_hub/index.mjs +2 -0
  37. package/packages/client/dist/chain-specs/westend2/index.d.mts +1 -0
  38. package/packages/client/dist/chain-specs/westend2/index.d.ts +1 -0
  39. package/packages/client/dist/chain-specs/westend2/index.js +2 -0
  40. package/packages/client/dist/chain-specs/westend2/index.mjs +2 -0
  41. package/packages/client/dist/chain-specs/westend2_asset_hub/index.d.mts +1 -0
  42. package/packages/client/dist/chain-specs/westend2_asset_hub/index.d.ts +1 -0
  43. package/packages/client/dist/chain-specs/westend2_asset_hub/index.js +2 -0
  44. package/packages/client/dist/chain-specs/westend2_asset_hub/index.mjs +2 -0
  45. package/packages/client/dist/index.d.mts +106 -0
  46. package/packages/client/dist/index.d.ts +106 -0
  47. package/packages/client/dist/index.js +2 -0
  48. package/packages/client/dist/index.mjs +2 -0
  49. package/packages/client/dist/smoldot/from-node-worker/index.d.mts +1 -0
  50. package/packages/client/dist/smoldot/from-node-worker/index.d.ts +1 -0
  51. package/packages/client/dist/smoldot/from-node-worker/index.js +2 -0
  52. package/packages/client/dist/smoldot/from-node-worker/index.mjs +2 -0
  53. package/packages/client/dist/smoldot/from-worker/index.d.mts +1 -0
  54. package/packages/client/dist/smoldot/from-worker/index.d.ts +1 -0
  55. package/packages/client/dist/smoldot/from-worker/index.js +2 -0
  56. package/packages/client/dist/smoldot/from-worker/index.mjs +2 -0
  57. package/packages/client/dist/smoldot/index.d.mts +14 -0
  58. package/packages/client/dist/smoldot/index.d.ts +14 -0
  59. package/packages/client/dist/smoldot/index.js +2 -0
  60. package/packages/client/dist/smoldot/index.mjs +2 -0
  61. package/packages/client/dist/smoldot/worker/index.d.mts +1 -0
  62. package/packages/client/dist/smoldot/worker/index.d.ts +1 -0
  63. package/packages/client/dist/smoldot/worker/index.js +2 -0
  64. package/packages/client/dist/smoldot/worker/index.mjs +2 -0
  65. package/packages/core/.papi/descriptors/dist/common-types.d.ts +21274 -0
  66. package/packages/core/.papi/descriptors/dist/descriptors-EQXQJ7SL.mjs +1 -0
  67. package/packages/core/.papi/descriptors/dist/descriptors.d.ts +11 -0
  68. package/packages/core/.papi/descriptors/dist/hdx.d.ts +366 -0
  69. package/packages/core/.papi/descriptors/dist/hdx_metadata-XH2Y6EGQ.mjs +1 -0
  70. package/packages/core/.papi/descriptors/dist/hdx_metadata.d.ts +2 -0
  71. package/packages/core/.papi/descriptors/dist/index.d.mts +24579 -0
  72. package/packages/core/.papi/descriptors/dist/index.d.ts +23 -0
  73. package/packages/core/.papi/descriptors/dist/index.js +1 -0
  74. package/packages/core/.papi/descriptors/dist/index.mjs +1 -0
  75. package/packages/core/.papi/descriptors/dist/kah.d.ts +434 -0
  76. package/packages/core/.papi/descriptors/dist/kah_metadata-OCBL5LAN.mjs +1 -0
  77. package/packages/core/.papi/descriptors/dist/kah_metadata.d.ts +2 -0
  78. package/packages/core/.papi/descriptors/dist/kusama.d.ts +291 -0
  79. package/packages/core/.papi/descriptors/dist/kusama_metadata-TGJ43LLG.mjs +1 -0
  80. package/packages/core/.papi/descriptors/dist/kusama_metadata.d.ts +2 -0
  81. package/packages/core/.papi/descriptors/dist/metadataTypes-MIM6CGSL.mjs +1 -0
  82. package/packages/core/.papi/descriptors/dist/metadataTypes.d.ts +2 -0
  83. package/packages/core/.papi/descriptors/dist/pah.d.ts +434 -0
  84. package/packages/core/.papi/descriptors/dist/pah_metadata-JG7F7QDO.mjs +1 -0
  85. package/packages/core/.papi/descriptors/dist/pah_metadata.d.ts +2 -0
  86. package/packages/core/.papi/descriptors/dist/paseo.d.ts +291 -0
  87. package/packages/core/.papi/descriptors/dist/paseo_metadata-5VVMOYKO.mjs +1 -0
  88. package/packages/core/.papi/descriptors/dist/paseo_metadata.d.ts +2 -0
  89. package/packages/core/.papi/descriptors/dist/paseoah.d.ts +242 -0
  90. package/packages/core/.papi/descriptors/dist/paseoah_metadata-KVQKFE5R.mjs +1 -0
  91. package/packages/core/.papi/descriptors/dist/paseoah_metadata.d.ts +2 -0
  92. package/packages/core/.papi/descriptors/dist/polkadot.d.ts +291 -0
  93. package/packages/core/.papi/descriptors/dist/polkadot_metadata-ASE5745E.mjs +1 -0
  94. package/packages/core/.papi/descriptors/dist/polkadot_metadata.d.ts +2 -0
  95. package/packages/core/.papi/descriptors/dist/rah.d.ts +434 -0
  96. package/packages/core/.papi/descriptors/dist/rah_metadata-FL7L2MWD.mjs +1 -0
  97. package/packages/core/.papi/descriptors/dist/rah_metadata.d.ts +2 -0
  98. package/packages/core/.papi/descriptors/dist/rococo.d.ts +291 -0
  99. package/packages/core/.papi/descriptors/dist/rococo_metadata-CHYQZIV5.mjs +1 -0
  100. package/packages/core/.papi/descriptors/dist/rococo_metadata.d.ts +2 -0
  101. package/packages/core/.papi/descriptors/dist/wah.d.ts +434 -0
  102. package/packages/core/.papi/descriptors/dist/wah_metadata-M2H6IX7C.mjs +1 -0
  103. package/packages/core/.papi/descriptors/dist/wah_metadata.d.ts +2 -0
  104. package/packages/core/.papi/descriptors/dist/westend.d.ts +291 -0
  105. package/packages/core/.papi/descriptors/dist/westend_metadata-IAM3KHRQ.mjs +1 -0
  106. package/packages/core/.papi/descriptors/dist/westend_metadata.d.ts +2 -0
  107. package/packages/core/.papi/descriptors/package.json +24 -0
  108. package/packages/core/.papi/metadata/hdx.scale +0 -0
  109. package/packages/core/.papi/metadata/kah.scale +0 -0
  110. package/packages/core/.papi/metadata/kusama.scale +0 -0
  111. package/packages/core/.papi/metadata/pah.scale +0 -0
  112. package/packages/core/.papi/metadata/paseo.scale +0 -0
  113. package/packages/core/.papi/metadata/paseoah.scale +0 -0
  114. package/packages/core/.papi/metadata/polkadot.scale +0 -0
  115. package/packages/core/.papi/metadata/rah.scale +0 -0
  116. package/packages/core/.papi/metadata/rococo.scale +0 -0
  117. package/packages/core/.papi/metadata/wah.scale +0 -0
  118. package/packages/core/.papi/metadata/westend.scale +0 -0
  119. package/packages/core/.papi/polkadot-api.json +50 -0
  120. package/packages/core/dist/index.d.mts +676 -0
  121. package/packages/core/dist/index.d.ts +676 -0
  122. package/packages/core/dist/index.js +1 -0
  123. package/packages/core/dist/index.mjs +1 -0
@@ -0,0 +1,2 @@
1
+ declare const binMeta: string;
2
+ export default binMeta;
@@ -0,0 +1,242 @@
1
+ import { StorageDescriptor, PlainDescriptor, TxDescriptor, RuntimeDescriptor, Enum, QueryFromPalletsDef, TxFromPalletsDef, EventsFromPalletsDef, ErrorsFromPalletsDef, ConstFromPalletsDef, SS58String, Binary, FixedSizeBinary, FixedSizeArray } from "polkadot-api";
2
+ import { I5sesotjlssv2d, I1q8tnt1cluu5j, I3qklfjubrljqh, Iag3f1hum3p4c8, I7svnfko10tq2e, I78s05f59eoi8b, I4c0s5cioidn76, I7rv8d2nr55kkq, Id0as9l3s817qs, I4ktuaksf5i1gk, Iakevv83i18n4r, I5gi8h3e5lkbeq, I10okc8e4i9esv, I72tqocvdoqfff, Ikm68gg7akl51, I35p85j063s0il, I5vv5n03oo8gas, Icua9dv39aipa0 } 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
+ Assets: {
54
+ /**
55
+ * Details of an asset.
56
+ */
57
+ Asset: StorageDescriptor<[Key: number], Anonymize<I3qklfjubrljqh>, true, never>;
58
+ /**
59
+ * The holdings of a specific account for a specific asset.
60
+ */
61
+ Account: StorageDescriptor<Anonymize<I7svnfko10tq2e>, Anonymize<Iag3f1hum3p4c8>, true, never>;
62
+ /**
63
+ * Metadata of an asset.
64
+ */
65
+ Metadata: StorageDescriptor<[Key: number], Anonymize<I78s05f59eoi8b>, false, never>;
66
+ };
67
+ ForeignAssets: {
68
+ /**
69
+ * Details of an asset.
70
+ */
71
+ Asset: StorageDescriptor<[Key: Anonymize<I4c0s5cioidn76>], Anonymize<I3qklfjubrljqh>, true, never>;
72
+ /**
73
+ * The holdings of a specific account for a specific asset.
74
+ */
75
+ Account: StorageDescriptor<Anonymize<I7rv8d2nr55kkq>, Anonymize<Iag3f1hum3p4c8>, true, never>;
76
+ /**
77
+ * Metadata of an asset.
78
+ */
79
+ Metadata: StorageDescriptor<[Key: Anonymize<I4c0s5cioidn76>], Anonymize<I78s05f59eoi8b>, false, never>;
80
+ };
81
+ PoolAssets: {
82
+ /**
83
+ * Details of an asset.
84
+ */
85
+ Asset: StorageDescriptor<[Key: number], Anonymize<I3qklfjubrljqh>, true, never>;
86
+ /**
87
+ * The holdings of a specific account for a specific asset.
88
+ */
89
+ Account: StorageDescriptor<Anonymize<I7svnfko10tq2e>, Anonymize<Iag3f1hum3p4c8>, true, never>;
90
+ };
91
+ AssetConversion: {
92
+ /**
93
+ * Map from `PoolAssetId` to `PoolInfo`. This establishes whether a pool has been officially
94
+ * created rather than people sending tokens directly to a pool's public account.
95
+ */
96
+ Pools: StorageDescriptor<[Key: Anonymize<Id0as9l3s817qs>], number, true, never>;
97
+ };
98
+ };
99
+ type ICalls = {
100
+ Balances: {
101
+ /**
102
+ *See [`Pallet::transfer_keep_alive`].
103
+ */
104
+ transfer_keep_alive: TxDescriptor<Anonymize<I4ktuaksf5i1gk>>;
105
+ };
106
+ PolkadotXcm: {
107
+ /**
108
+ *See [`Pallet::teleport_assets`].
109
+ */
110
+ teleport_assets: TxDescriptor<Anonymize<Iakevv83i18n4r>>;
111
+ /**
112
+ *See [`Pallet::reserve_transfer_assets`].
113
+ */
114
+ reserve_transfer_assets: TxDescriptor<Anonymize<Iakevv83i18n4r>>;
115
+ /**
116
+ *See [`Pallet::limited_reserve_transfer_assets`].
117
+ */
118
+ limited_reserve_transfer_assets: TxDescriptor<Anonymize<I5gi8h3e5lkbeq>>;
119
+ /**
120
+ *See [`Pallet::limited_teleport_assets`].
121
+ */
122
+ limited_teleport_assets: TxDescriptor<Anonymize<I5gi8h3e5lkbeq>>;
123
+ /**
124
+ *See [`Pallet::transfer_assets`].
125
+ */
126
+ transfer_assets: TxDescriptor<Anonymize<I5gi8h3e5lkbeq>>;
127
+ };
128
+ Utility: {
129
+ /**
130
+ *See [`Pallet::batch_all`].
131
+ */
132
+ batch_all: TxDescriptor<Anonymize<I10okc8e4i9esv>>;
133
+ };
134
+ Assets: {
135
+ /**
136
+ *See [`Pallet::transfer`].
137
+ */
138
+ transfer: TxDescriptor<Anonymize<I72tqocvdoqfff>>;
139
+ /**
140
+ *See [`Pallet::transfer_keep_alive`].
141
+ */
142
+ transfer_keep_alive: TxDescriptor<Anonymize<I72tqocvdoqfff>>;
143
+ };
144
+ ForeignAssets: {
145
+ /**
146
+ *See [`Pallet::transfer`].
147
+ */
148
+ transfer: TxDescriptor<Anonymize<Ikm68gg7akl51>>;
149
+ };
150
+ };
151
+ type IEvent = {};
152
+ type IError = {};
153
+ type IConstants = {
154
+ Balances: {
155
+ /**
156
+ * The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
157
+ *
158
+ * If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
159
+ * this pallet. However, you do so at your own risk: this will open up a major DoS vector.
160
+ * In case you have multiple sources of provider references, you may also get unexpected
161
+ * behaviour if you set this to zero.
162
+ *
163
+ * Bottom line: Do yourself a favour and make it at least one!
164
+ */
165
+ ExistentialDeposit: PlainDescriptor<bigint>;
166
+ };
167
+ AssetConversion: {
168
+ /**
169
+ * A % the liquidity providers will take of every swap. Represents 10ths of a percent.
170
+ */
171
+ LPFee: PlainDescriptor<number>;
172
+ };
173
+ };
174
+ type IRuntimeCalls = {
175
+ /**
176
+ * This runtime api allows people to query the size of the liquidity pools
177
+ * and quote prices for swaps.
178
+ */
179
+ AssetConversionApi: {
180
+ /**
181
+ * Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].
182
+ *
183
+ * Note that the price may have changed by the time the transaction is executed.
184
+ * (Use `amount_in_max` to control slippage.)
185
+ */
186
+ quote_price_tokens_for_exact_tokens: RuntimeDescriptor<[asset1: Anonymize<I4c0s5cioidn76>, asset2: Anonymize<I4c0s5cioidn76>, amount: bigint, include_fee: boolean], Anonymize<I35p85j063s0il>>;
187
+ /**
188
+ * Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].
189
+ *
190
+ * Note that the price may have changed by the time the transaction is executed.
191
+ * (Use `amount_out_min` to control slippage.)
192
+ */
193
+ quote_price_exact_tokens_for_tokens: RuntimeDescriptor<[asset1: Anonymize<I4c0s5cioidn76>, asset2: Anonymize<I4c0s5cioidn76>, amount: bigint, include_fee: boolean], Anonymize<I35p85j063s0il>>;
194
+ /**
195
+ * Returns the size of the liquidity pool for the given asset pair.
196
+ */
197
+ get_reserves: RuntimeDescriptor<[asset1: Anonymize<I4c0s5cioidn76>, asset2: Anonymize<I4c0s5cioidn76>], Anonymize<I5vv5n03oo8gas>>;
198
+ };
199
+ };
200
+ type IAsset = PlainDescriptor<Anonymize<I4c0s5cioidn76>>;
201
+ export type PaseoahDispatchError = unknown;
202
+ type PalletsTypedef = {
203
+ __storage: IStorage;
204
+ __tx: ICalls;
205
+ __event: IEvent;
206
+ __error: IError;
207
+ __const: IConstants;
208
+ };
209
+ type IDescriptors = {
210
+ descriptors: {
211
+ pallets: PalletsTypedef;
212
+ apis: IRuntimeCalls;
213
+ } & Promise<any>;
214
+ metadataTypes: Promise<Uint8Array>;
215
+ asset: IAsset;
216
+ getMetadata: () => Promise<Uint8Array>;
217
+ genesis: string | undefined;
218
+ };
219
+ declare const _allDescriptors: IDescriptors;
220
+ export default _allDescriptors;
221
+ export type PaseoahQueries = QueryFromPalletsDef<PalletsTypedef>;
222
+ export type PaseoahCalls = TxFromPalletsDef<PalletsTypedef>;
223
+ export type PaseoahEvents = EventsFromPalletsDef<PalletsTypedef>;
224
+ export type PaseoahErrors = ErrorsFromPalletsDef<PalletsTypedef>;
225
+ export type PaseoahConstants = ConstFromPalletsDef<PalletsTypedef>;
226
+ export type PaseoahCallData = Anonymize<Icua9dv39aipa0> & {
227
+ value: {
228
+ type: string;
229
+ };
230
+ };
231
+ export type PaseoahWhitelistEntry = PalletKey | ApiKey<IRuntimeCalls> | `query.${NestedKey<PalletsTypedef['__storage']>}` | `tx.${NestedKey<PalletsTypedef['__tx']>}` | `event.${NestedKey<PalletsTypedef['__event']>}` | `error.${NestedKey<PalletsTypedef['__error']>}` | `const.${NestedKey<PalletsTypedef['__const']>}`;
232
+ type PalletKey = `*.${keyof (IStorage & ICalls & IEvent & IError & IConstants & IRuntimeCalls)}`;
233
+ type NestedKey<D extends Record<string, Record<string, any>>> = "*" | {
234
+ [P in keyof D & string]: `${P}.*` | {
235
+ [N in keyof D[P] & string]: `${P}.${N}`;
236
+ }[keyof D[P] & string];
237
+ }[keyof D & string];
238
+ type ApiKey<D extends Record<string, Record<string, any>>> = "api.*" | {
239
+ [P in keyof D & string]: `api.${P}.*` | {
240
+ [N in keyof D[P] & string]: `api.${P}.${N}`;
241
+ }[keyof D[P] & string];
242
+ }[keyof D & string];