@storagehub/api-augment 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.
- package/README.md +54 -0
- package/biome.json +10 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/augment-api-consts.js +6 -0
- package/dist/interfaces/augment-api-consts.js.map +1 -0
- package/dist/interfaces/augment-api-errors.js +6 -0
- package/dist/interfaces/augment-api-errors.js.map +1 -0
- package/dist/interfaces/augment-api-events.js +6 -0
- package/dist/interfaces/augment-api-events.js.map +1 -0
- package/dist/interfaces/augment-api-query.js +6 -0
- package/dist/interfaces/augment-api-query.js.map +1 -0
- package/dist/interfaces/augment-api-rpc.js +6 -0
- package/dist/interfaces/augment-api-rpc.js.map +1 -0
- package/dist/interfaces/augment-api-runtime.js +6 -0
- package/dist/interfaces/augment-api-runtime.js.map +1 -0
- package/dist/interfaces/augment-api-tx.js +6 -0
- package/dist/interfaces/augment-api-tx.js.map +1 -0
- package/dist/interfaces/augment-api.js +10 -0
- package/dist/interfaces/augment-api.js.map +1 -0
- package/dist/interfaces/augment-types.js +6 -0
- package/dist/interfaces/augment-types.js.map +1 -0
- package/dist/interfaces/definitions.js +2 -0
- package/dist/interfaces/definitions.js.map +1 -0
- package/dist/interfaces/index.js +4 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/lookup.js +4504 -0
- package/dist/interfaces/lookup.js.map +1 -0
- package/dist/interfaces/registry.js +6 -0
- package/dist/interfaces/registry.js.map +1 -0
- package/dist/interfaces/storagehubclient/definitions.js +7 -0
- package/dist/interfaces/storagehubclient/definitions.js.map +1 -0
- package/dist/interfaces/storagehubclient/index.js +4 -0
- package/dist/interfaces/storagehubclient/index.js.map +1 -0
- package/dist/interfaces/storagehubclient/runtime.js +152 -0
- package/dist/interfaces/storagehubclient/runtime.js.map +1 -0
- package/dist/interfaces/storagehubclient/types.js +4 -0
- package/dist/interfaces/storagehubclient/types.js.map +1 -0
- package/dist/interfaces/types-lookup.js +6 -0
- package/dist/interfaces/types-lookup.js.map +1 -0
- package/dist/interfaces/types.js +4 -0
- package/dist/interfaces/types.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/interfaces/augment-api-consts.d.ts +556 -0
- package/dist/types/interfaces/augment-api-errors.d.ts +1195 -0
- package/dist/types/interfaces/augment-api-events.d.ts +2070 -0
- package/dist/types/interfaces/augment-api-query.d.ts +1439 -0
- package/dist/types/interfaces/augment-api-rpc.d.ts +718 -0
- package/dist/types/interfaces/augment-api-runtime.d.ts +441 -0
- package/dist/types/interfaces/augment-api-tx.d.ts +3039 -0
- package/dist/types/interfaces/augment-api.d.ts +7 -0
- package/dist/types/interfaces/augment-types.d.ts +1285 -0
- package/dist/types/interfaces/definitions.d.ts +1 -0
- package/dist/types/interfaces/index.d.ts +1 -0
- package/dist/types/interfaces/lookup.d.ts +4179 -0
- package/dist/types/interfaces/registry.d.ts +272 -0
- package/dist/types/interfaces/storagehubclient/definitions.d.ts +6 -0
- package/dist/types/interfaces/storagehubclient/index.d.ts +1 -0
- package/dist/types/interfaces/storagehubclient/runtime.d.ts +2 -0
- package/dist/types/interfaces/storagehubclient/types.d.ts +198 -0
- package/dist/types/interfaces/types-lookup.d.ts +4457 -0
- package/dist/types/interfaces/types.d.ts +1 -0
- package/package.json +38 -0
- package/scripts/scrapeMetadata.ts +77 -0
- package/src/index.ts +3 -0
- package/src/interfaces/augment-api-consts.ts +570 -0
- package/src/interfaces/augment-api-errors.ts +1203 -0
- package/src/interfaces/augment-api-events.ts +1836 -0
- package/src/interfaces/augment-api-query.ts +1975 -0
- package/src/interfaces/augment-api-rpc.ts +1201 -0
- package/src/interfaces/augment-api-runtime.ts +707 -0
- package/src/interfaces/augment-api-tx.ts +3418 -0
- package/src/interfaces/augment-api.ts +10 -0
- package/src/interfaces/augment-types.ts +2508 -0
- package/src/interfaces/definitions.ts +1 -0
- package/src/interfaces/index.ts +4 -0
- package/src/interfaces/lookup.ts +4511 -0
- package/src/interfaces/registry.ts +546 -0
- package/src/interfaces/storagehubclient/definitions.ts +7 -0
- package/src/interfaces/storagehubclient/index.ts +4 -0
- package/src/interfaces/storagehubclient/runtime.ts +156 -0
- package/src/interfaces/storagehubclient/types.ts +241 -0
- package/src/interfaces/types-lookup.ts +5623 -0
- package/src/interfaces/types.ts +4 -0
- package/storagehub.json +1 -0
- package/tsconfig.json +22 -0
|
@@ -0,0 +1,3418 @@
|
|
|
1
|
+
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
// import type lookup before we augment - in some environments
|
|
5
|
+
// this is required to allow for ambient/previous definitions
|
|
6
|
+
import "@polkadot/api-base/types/submittable";
|
|
7
|
+
|
|
8
|
+
import type {
|
|
9
|
+
ApiTypes,
|
|
10
|
+
AugmentedSubmittable,
|
|
11
|
+
SubmittableExtrinsic,
|
|
12
|
+
SubmittableExtrinsicFunction
|
|
13
|
+
} from "@polkadot/api-base/types";
|
|
14
|
+
import type { Bytes, Compact, Option, Vec, bool, u128, u32, u64 } from "@polkadot/types-codec";
|
|
15
|
+
import type { AnyNumber, IMethod, ITuple } from "@polkadot/types-codec/types";
|
|
16
|
+
import type { AccountId32, Call, H256, MultiAddress } from "@polkadot/types/interfaces/runtime";
|
|
17
|
+
import type {
|
|
18
|
+
CumulusPrimitivesCoreAggregateMessageOrigin,
|
|
19
|
+
CumulusPrimitivesParachainInherentParachainInherentData,
|
|
20
|
+
PalletBalancesAdjustmentDirection,
|
|
21
|
+
PalletFileSystemBucketMoveRequestResponse,
|
|
22
|
+
PalletFileSystemMspStorageRequestResponse,
|
|
23
|
+
PalletNftsAttributeNamespace,
|
|
24
|
+
PalletNftsCancelAttributesApprovalWitness,
|
|
25
|
+
PalletNftsCollectionConfig,
|
|
26
|
+
PalletNftsDestroyWitness,
|
|
27
|
+
PalletNftsItemConfig,
|
|
28
|
+
PalletNftsItemTip,
|
|
29
|
+
PalletNftsMintSettings,
|
|
30
|
+
PalletNftsMintWitness,
|
|
31
|
+
PalletNftsPreSignedAttributes,
|
|
32
|
+
PalletNftsPreSignedMint,
|
|
33
|
+
PalletNftsPriceWithDirection,
|
|
34
|
+
PalletProofsDealerProof,
|
|
35
|
+
PalletStorageProvidersValueProposition,
|
|
36
|
+
ShpFileKeyVerifierFileKeyProof,
|
|
37
|
+
SpRuntimeMultiSignature,
|
|
38
|
+
SpTrieStorageProofCompactProof,
|
|
39
|
+
SpWeightsWeightV2Weight,
|
|
40
|
+
StagingXcmExecutorAssetTransferTransferType,
|
|
41
|
+
StagingXcmV4Location,
|
|
42
|
+
StorageHubRuntimeConfigsRuntimeParamsRuntimeParameters,
|
|
43
|
+
StorageHubRuntimeSessionKeys,
|
|
44
|
+
XcmV3WeightLimit,
|
|
45
|
+
XcmVersionedAssetId,
|
|
46
|
+
XcmVersionedAssets,
|
|
47
|
+
XcmVersionedLocation,
|
|
48
|
+
XcmVersionedXcm
|
|
49
|
+
} from "@polkadot/types/lookup";
|
|
50
|
+
|
|
51
|
+
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
|
52
|
+
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
|
|
53
|
+
export type __SubmittableExtrinsicFunction<ApiType extends ApiTypes> =
|
|
54
|
+
SubmittableExtrinsicFunction<ApiType>;
|
|
55
|
+
|
|
56
|
+
declare module "@polkadot/api-base/types/submittable" {
|
|
57
|
+
interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
|
58
|
+
balances: {
|
|
59
|
+
/**
|
|
60
|
+
* Burn the specified liquid free balance from the origin account.
|
|
61
|
+
*
|
|
62
|
+
* If the origin's account ends up below the existential deposit as a result
|
|
63
|
+
* of the burn and `keep_alive` is false, the account will be reaped.
|
|
64
|
+
*
|
|
65
|
+
* Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,
|
|
66
|
+
* this `burn` operation will reduce total issuance by the amount _burned_.
|
|
67
|
+
**/
|
|
68
|
+
burn: AugmentedSubmittable<
|
|
69
|
+
(
|
|
70
|
+
value: Compact<u128> | AnyNumber | Uint8Array,
|
|
71
|
+
keepAlive: bool | boolean | Uint8Array
|
|
72
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
73
|
+
[Compact<u128>, bool]
|
|
74
|
+
>;
|
|
75
|
+
/**
|
|
76
|
+
* Adjust the total issuance in a saturating way.
|
|
77
|
+
*
|
|
78
|
+
* Can only be called by root and always needs a positive `delta`.
|
|
79
|
+
*
|
|
80
|
+
* # Example
|
|
81
|
+
**/
|
|
82
|
+
forceAdjustTotalIssuance: AugmentedSubmittable<
|
|
83
|
+
(
|
|
84
|
+
direction:
|
|
85
|
+
| PalletBalancesAdjustmentDirection
|
|
86
|
+
| "Increase"
|
|
87
|
+
| "Decrease"
|
|
88
|
+
| number
|
|
89
|
+
| Uint8Array,
|
|
90
|
+
delta: Compact<u128> | AnyNumber | Uint8Array
|
|
91
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
92
|
+
[PalletBalancesAdjustmentDirection, Compact<u128>]
|
|
93
|
+
>;
|
|
94
|
+
/**
|
|
95
|
+
* Set the regular balance of a given account.
|
|
96
|
+
*
|
|
97
|
+
* The dispatch origin for this call is `root`.
|
|
98
|
+
**/
|
|
99
|
+
forceSetBalance: AugmentedSubmittable<
|
|
100
|
+
(
|
|
101
|
+
who:
|
|
102
|
+
| MultiAddress
|
|
103
|
+
| { Id: any }
|
|
104
|
+
| { Index: any }
|
|
105
|
+
| { Raw: any }
|
|
106
|
+
| { Address32: any }
|
|
107
|
+
| { Address20: any }
|
|
108
|
+
| string
|
|
109
|
+
| Uint8Array,
|
|
110
|
+
newFree: Compact<u128> | AnyNumber | Uint8Array
|
|
111
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
112
|
+
[MultiAddress, Compact<u128>]
|
|
113
|
+
>;
|
|
114
|
+
/**
|
|
115
|
+
* Exactly as `transfer_allow_death`, except the origin must be root and the source account
|
|
116
|
+
* may be specified.
|
|
117
|
+
**/
|
|
118
|
+
forceTransfer: AugmentedSubmittable<
|
|
119
|
+
(
|
|
120
|
+
source:
|
|
121
|
+
| MultiAddress
|
|
122
|
+
| { Id: any }
|
|
123
|
+
| { Index: any }
|
|
124
|
+
| { Raw: any }
|
|
125
|
+
| { Address32: any }
|
|
126
|
+
| { Address20: any }
|
|
127
|
+
| string
|
|
128
|
+
| Uint8Array,
|
|
129
|
+
dest:
|
|
130
|
+
| MultiAddress
|
|
131
|
+
| { Id: any }
|
|
132
|
+
| { Index: any }
|
|
133
|
+
| { Raw: any }
|
|
134
|
+
| { Address32: any }
|
|
135
|
+
| { Address20: any }
|
|
136
|
+
| string
|
|
137
|
+
| Uint8Array,
|
|
138
|
+
value: Compact<u128> | AnyNumber | Uint8Array
|
|
139
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
140
|
+
[MultiAddress, MultiAddress, Compact<u128>]
|
|
141
|
+
>;
|
|
142
|
+
/**
|
|
143
|
+
* Unreserve some balance from a user by force.
|
|
144
|
+
*
|
|
145
|
+
* Can only be called by ROOT.
|
|
146
|
+
**/
|
|
147
|
+
forceUnreserve: AugmentedSubmittable<
|
|
148
|
+
(
|
|
149
|
+
who:
|
|
150
|
+
| MultiAddress
|
|
151
|
+
| { Id: any }
|
|
152
|
+
| { Index: any }
|
|
153
|
+
| { Raw: any }
|
|
154
|
+
| { Address32: any }
|
|
155
|
+
| { Address20: any }
|
|
156
|
+
| string
|
|
157
|
+
| Uint8Array,
|
|
158
|
+
amount: u128 | AnyNumber | Uint8Array
|
|
159
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
160
|
+
[MultiAddress, u128]
|
|
161
|
+
>;
|
|
162
|
+
/**
|
|
163
|
+
* Transfer the entire transferable balance from the caller account.
|
|
164
|
+
*
|
|
165
|
+
* NOTE: This function only attempts to transfer _transferable_ balances. This means that
|
|
166
|
+
* any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be
|
|
167
|
+
* transferred by this function. To ensure that this function results in a killed account,
|
|
168
|
+
* you might need to prepare the account by removing any reference counters, storage
|
|
169
|
+
* deposits, etc...
|
|
170
|
+
*
|
|
171
|
+
* The dispatch origin of this call must be Signed.
|
|
172
|
+
*
|
|
173
|
+
* - `dest`: The recipient of the transfer.
|
|
174
|
+
* - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all
|
|
175
|
+
* of the funds the account has, causing the sender account to be killed (false), or
|
|
176
|
+
* transfer everything except at least the existential deposit, which will guarantee to
|
|
177
|
+
* keep the sender account alive (true).
|
|
178
|
+
**/
|
|
179
|
+
transferAll: AugmentedSubmittable<
|
|
180
|
+
(
|
|
181
|
+
dest:
|
|
182
|
+
| MultiAddress
|
|
183
|
+
| { Id: any }
|
|
184
|
+
| { Index: any }
|
|
185
|
+
| { Raw: any }
|
|
186
|
+
| { Address32: any }
|
|
187
|
+
| { Address20: any }
|
|
188
|
+
| string
|
|
189
|
+
| Uint8Array,
|
|
190
|
+
keepAlive: bool | boolean | Uint8Array
|
|
191
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
192
|
+
[MultiAddress, bool]
|
|
193
|
+
>;
|
|
194
|
+
/**
|
|
195
|
+
* Transfer some liquid free balance to another account.
|
|
196
|
+
*
|
|
197
|
+
* `transfer_allow_death` will set the `FreeBalance` of the sender and receiver.
|
|
198
|
+
* If the sender's account is below the existential deposit as a result
|
|
199
|
+
* of the transfer, the account will be reaped.
|
|
200
|
+
*
|
|
201
|
+
* The dispatch origin for this call must be `Signed` by the transactor.
|
|
202
|
+
**/
|
|
203
|
+
transferAllowDeath: AugmentedSubmittable<
|
|
204
|
+
(
|
|
205
|
+
dest:
|
|
206
|
+
| MultiAddress
|
|
207
|
+
| { Id: any }
|
|
208
|
+
| { Index: any }
|
|
209
|
+
| { Raw: any }
|
|
210
|
+
| { Address32: any }
|
|
211
|
+
| { Address20: any }
|
|
212
|
+
| string
|
|
213
|
+
| Uint8Array,
|
|
214
|
+
value: Compact<u128> | AnyNumber | Uint8Array
|
|
215
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
216
|
+
[MultiAddress, Compact<u128>]
|
|
217
|
+
>;
|
|
218
|
+
/**
|
|
219
|
+
* Same as the [`transfer_allow_death`] call, but with a check that the transfer will not
|
|
220
|
+
* kill the origin account.
|
|
221
|
+
*
|
|
222
|
+
* 99% of the time you want [`transfer_allow_death`] instead.
|
|
223
|
+
*
|
|
224
|
+
* [`transfer_allow_death`]: struct.Pallet.html#method.transfer
|
|
225
|
+
**/
|
|
226
|
+
transferKeepAlive: AugmentedSubmittable<
|
|
227
|
+
(
|
|
228
|
+
dest:
|
|
229
|
+
| MultiAddress
|
|
230
|
+
| { Id: any }
|
|
231
|
+
| { Index: any }
|
|
232
|
+
| { Raw: any }
|
|
233
|
+
| { Address32: any }
|
|
234
|
+
| { Address20: any }
|
|
235
|
+
| string
|
|
236
|
+
| Uint8Array,
|
|
237
|
+
value: Compact<u128> | AnyNumber | Uint8Array
|
|
238
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
239
|
+
[MultiAddress, Compact<u128>]
|
|
240
|
+
>;
|
|
241
|
+
/**
|
|
242
|
+
* Upgrade a specified account.
|
|
243
|
+
*
|
|
244
|
+
* - `origin`: Must be `Signed`.
|
|
245
|
+
* - `who`: The account to be upgraded.
|
|
246
|
+
*
|
|
247
|
+
* This will waive the transaction fee if at least all but 10% of the accounts needed to
|
|
248
|
+
* be upgraded. (We let some not have to be upgraded just in order to allow for the
|
|
249
|
+
* possibility of churn).
|
|
250
|
+
**/
|
|
251
|
+
upgradeAccounts: AugmentedSubmittable<
|
|
252
|
+
(
|
|
253
|
+
who: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]
|
|
254
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
255
|
+
[Vec<AccountId32>]
|
|
256
|
+
>;
|
|
257
|
+
/**
|
|
258
|
+
* Generic tx
|
|
259
|
+
**/
|
|
260
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
261
|
+
};
|
|
262
|
+
bucketNfts: {
|
|
263
|
+
/**
|
|
264
|
+
* Share access to files within a bucket with another account.
|
|
265
|
+
*
|
|
266
|
+
* The `read_access_regex` parameter is optional and when set to `None` it means that the recipient will be denied access for any read request within the bucket.
|
|
267
|
+
**/
|
|
268
|
+
shareAccess: AugmentedSubmittable<
|
|
269
|
+
(
|
|
270
|
+
recipient:
|
|
271
|
+
| MultiAddress
|
|
272
|
+
| { Id: any }
|
|
273
|
+
| { Index: any }
|
|
274
|
+
| { Raw: any }
|
|
275
|
+
| { Address32: any }
|
|
276
|
+
| { Address20: any }
|
|
277
|
+
| string
|
|
278
|
+
| Uint8Array,
|
|
279
|
+
bucket: H256 | string | Uint8Array,
|
|
280
|
+
itemId: u32 | AnyNumber | Uint8Array,
|
|
281
|
+
readAccessRegex: Option<Bytes> | null | Uint8Array | Bytes | string
|
|
282
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
283
|
+
[MultiAddress, H256, u32, Option<Bytes>]
|
|
284
|
+
>;
|
|
285
|
+
/**
|
|
286
|
+
* Update read access for an item.
|
|
287
|
+
**/
|
|
288
|
+
updateReadAccess: AugmentedSubmittable<
|
|
289
|
+
(
|
|
290
|
+
bucket: H256 | string | Uint8Array,
|
|
291
|
+
itemId: u32 | AnyNumber | Uint8Array,
|
|
292
|
+
readAccessRegex: Option<Bytes> | null | Uint8Array | Bytes | string
|
|
293
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
294
|
+
[H256, u32, Option<Bytes>]
|
|
295
|
+
>;
|
|
296
|
+
/**
|
|
297
|
+
* Generic tx
|
|
298
|
+
**/
|
|
299
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
300
|
+
};
|
|
301
|
+
collatorSelection: {
|
|
302
|
+
/**
|
|
303
|
+
* Add a new account `who` to the list of `Invulnerables` collators. `who` must have
|
|
304
|
+
* registered session keys. If `who` is a candidate, they will be removed.
|
|
305
|
+
*
|
|
306
|
+
* The origin for this call must be the `UpdateOrigin`.
|
|
307
|
+
**/
|
|
308
|
+
addInvulnerable: AugmentedSubmittable<
|
|
309
|
+
(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
310
|
+
[AccountId32]
|
|
311
|
+
>;
|
|
312
|
+
/**
|
|
313
|
+
* Deregister `origin` as a collator candidate. Note that the collator can only leave on
|
|
314
|
+
* session change. The `CandidacyBond` will be unreserved immediately.
|
|
315
|
+
*
|
|
316
|
+
* This call will fail if the total number of candidates would drop below
|
|
317
|
+
* `MinEligibleCollators`.
|
|
318
|
+
**/
|
|
319
|
+
leaveIntent: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
320
|
+
/**
|
|
321
|
+
* Register this account as a collator candidate. The account must (a) already have
|
|
322
|
+
* registered session keys and (b) be able to reserve the `CandidacyBond`.
|
|
323
|
+
*
|
|
324
|
+
* This call is not available to `Invulnerable` collators.
|
|
325
|
+
**/
|
|
326
|
+
registerAsCandidate: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
327
|
+
/**
|
|
328
|
+
* Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must
|
|
329
|
+
* be sorted.
|
|
330
|
+
*
|
|
331
|
+
* The origin for this call must be the `UpdateOrigin`.
|
|
332
|
+
**/
|
|
333
|
+
removeInvulnerable: AugmentedSubmittable<
|
|
334
|
+
(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
335
|
+
[AccountId32]
|
|
336
|
+
>;
|
|
337
|
+
/**
|
|
338
|
+
* Set the candidacy bond amount.
|
|
339
|
+
*
|
|
340
|
+
* If the candidacy bond is increased by this call, all current candidates which have a
|
|
341
|
+
* deposit lower than the new bond will be kicked from the list and get their deposits
|
|
342
|
+
* back.
|
|
343
|
+
*
|
|
344
|
+
* The origin for this call must be the `UpdateOrigin`.
|
|
345
|
+
**/
|
|
346
|
+
setCandidacyBond: AugmentedSubmittable<
|
|
347
|
+
(bond: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
348
|
+
[u128]
|
|
349
|
+
>;
|
|
350
|
+
/**
|
|
351
|
+
* Set the ideal number of non-invulnerable collators. If lowering this number, then the
|
|
352
|
+
* number of running collators could be higher than this figure. Aside from that edge case,
|
|
353
|
+
* there should be no other way to have more candidates than the desired number.
|
|
354
|
+
*
|
|
355
|
+
* The origin for this call must be the `UpdateOrigin`.
|
|
356
|
+
**/
|
|
357
|
+
setDesiredCandidates: AugmentedSubmittable<
|
|
358
|
+
(max: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
359
|
+
[u32]
|
|
360
|
+
>;
|
|
361
|
+
/**
|
|
362
|
+
* Set the list of invulnerable (fixed) collators. These collators must do some
|
|
363
|
+
* preparation, namely to have registered session keys.
|
|
364
|
+
*
|
|
365
|
+
* The call will remove any accounts that have not registered keys from the set. That is,
|
|
366
|
+
* it is non-atomic; the caller accepts all `AccountId`s passed in `new` _individually_ as
|
|
367
|
+
* acceptable Invulnerables, and is not proposing a _set_ of new Invulnerables.
|
|
368
|
+
*
|
|
369
|
+
* This call does not maintain mutual exclusivity of `Invulnerables` and `Candidates`. It
|
|
370
|
+
* is recommended to use a batch of `add_invulnerable` and `remove_invulnerable` instead. A
|
|
371
|
+
* `batch_all` can also be used to enforce atomicity. If any candidates are included in
|
|
372
|
+
* `new`, they should be removed with `remove_invulnerable_candidate` after execution.
|
|
373
|
+
*
|
|
374
|
+
* Must be called by the `UpdateOrigin`.
|
|
375
|
+
**/
|
|
376
|
+
setInvulnerables: AugmentedSubmittable<
|
|
377
|
+
(
|
|
378
|
+
updated: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]
|
|
379
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
380
|
+
[Vec<AccountId32>]
|
|
381
|
+
>;
|
|
382
|
+
/**
|
|
383
|
+
* The caller `origin` replaces a candidate `target` in the collator candidate list by
|
|
384
|
+
* reserving `deposit`. The amount `deposit` reserved by the caller must be greater than
|
|
385
|
+
* the existing bond of the target it is trying to replace.
|
|
386
|
+
*
|
|
387
|
+
* This call will fail if the caller is already a collator candidate or invulnerable, the
|
|
388
|
+
* caller does not have registered session keys, the target is not a collator candidate,
|
|
389
|
+
* and/or the `deposit` amount cannot be reserved.
|
|
390
|
+
**/
|
|
391
|
+
takeCandidateSlot: AugmentedSubmittable<
|
|
392
|
+
(
|
|
393
|
+
deposit: u128 | AnyNumber | Uint8Array,
|
|
394
|
+
target: AccountId32 | string | Uint8Array
|
|
395
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
396
|
+
[u128, AccountId32]
|
|
397
|
+
>;
|
|
398
|
+
/**
|
|
399
|
+
* Update the candidacy bond of collator candidate `origin` to a new amount `new_deposit`.
|
|
400
|
+
*
|
|
401
|
+
* Setting a `new_deposit` that is lower than the current deposit while `origin` is
|
|
402
|
+
* occupying a top-`DesiredCandidates` slot is not allowed.
|
|
403
|
+
*
|
|
404
|
+
* This call will fail if `origin` is not a collator candidate, the updated bond is lower
|
|
405
|
+
* than the minimum candidacy bond, and/or the amount cannot be reserved.
|
|
406
|
+
**/
|
|
407
|
+
updateBond: AugmentedSubmittable<
|
|
408
|
+
(newDeposit: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
409
|
+
[u128]
|
|
410
|
+
>;
|
|
411
|
+
/**
|
|
412
|
+
* Generic tx
|
|
413
|
+
**/
|
|
414
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
415
|
+
};
|
|
416
|
+
cumulusXcm: {
|
|
417
|
+
/**
|
|
418
|
+
* Generic tx
|
|
419
|
+
**/
|
|
420
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
421
|
+
};
|
|
422
|
+
fileSystem: {
|
|
423
|
+
/**
|
|
424
|
+
* Add yourself as a data server for providing the files of the bucket requested to be moved.
|
|
425
|
+
**/
|
|
426
|
+
bspAddDataServerForMoveBucketRequest: AugmentedSubmittable<
|
|
427
|
+
(bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
428
|
+
[H256]
|
|
429
|
+
>;
|
|
430
|
+
/**
|
|
431
|
+
* Executed by a BSP to confirm to stop storing a file.
|
|
432
|
+
*
|
|
433
|
+
* It has to have previously opened a pending stop storing request using the `bsp_request_stop_storing` extrinsic.
|
|
434
|
+
* The minimum amount of blocks between the request and the confirmation is defined by the runtime, such that the
|
|
435
|
+
* BSP can't immediately stop storing a file it has previously lost when receiving a challenge for it.
|
|
436
|
+
**/
|
|
437
|
+
bspConfirmStopStoring: AugmentedSubmittable<
|
|
438
|
+
(
|
|
439
|
+
fileKey: H256 | string | Uint8Array,
|
|
440
|
+
inclusionForestProof:
|
|
441
|
+
| SpTrieStorageProofCompactProof
|
|
442
|
+
| { encodedNodes?: any }
|
|
443
|
+
| string
|
|
444
|
+
| Uint8Array
|
|
445
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
446
|
+
[H256, SpTrieStorageProofCompactProof]
|
|
447
|
+
>;
|
|
448
|
+
/**
|
|
449
|
+
* Used by a BSP to confirm they are storing data of a storage request.
|
|
450
|
+
**/
|
|
451
|
+
bspConfirmStoring: AugmentedSubmittable<
|
|
452
|
+
(
|
|
453
|
+
nonInclusionForestProof:
|
|
454
|
+
| SpTrieStorageProofCompactProof
|
|
455
|
+
| { encodedNodes?: any }
|
|
456
|
+
| string
|
|
457
|
+
| Uint8Array,
|
|
458
|
+
fileKeysAndProofs:
|
|
459
|
+
| Vec<ITuple<[H256, ShpFileKeyVerifierFileKeyProof]>>
|
|
460
|
+
| [
|
|
461
|
+
H256 | string | Uint8Array,
|
|
462
|
+
(
|
|
463
|
+
| ShpFileKeyVerifierFileKeyProof
|
|
464
|
+
| { fileMetadata?: any; proof?: any }
|
|
465
|
+
| string
|
|
466
|
+
| Uint8Array
|
|
467
|
+
)
|
|
468
|
+
][]
|
|
469
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
470
|
+
[SpTrieStorageProofCompactProof, Vec<ITuple<[H256, ShpFileKeyVerifierFileKeyProof]>>]
|
|
471
|
+
>;
|
|
472
|
+
/**
|
|
473
|
+
* Executed by a BSP to request to stop storing a file.
|
|
474
|
+
*
|
|
475
|
+
* In the event when a storage request no longer exists for the data the BSP no longer stores,
|
|
476
|
+
* it is required that the BSP still has access to the metadata of the initial storage request.
|
|
477
|
+
* If they do not, they will at least need that metadata to reconstruct the File ID and from wherever
|
|
478
|
+
* the BSP gets that data is up to it. One example could be from the assigned MSP.
|
|
479
|
+
* This metadata is necessary since it is needed to reconstruct the leaf node key in the storage
|
|
480
|
+
* provider's Merkle Forest.
|
|
481
|
+
**/
|
|
482
|
+
bspRequestStopStoring: AugmentedSubmittable<
|
|
483
|
+
(
|
|
484
|
+
fileKey: H256 | string | Uint8Array,
|
|
485
|
+
bucketId: H256 | string | Uint8Array,
|
|
486
|
+
location: Bytes | string | Uint8Array,
|
|
487
|
+
owner: AccountId32 | string | Uint8Array,
|
|
488
|
+
fingerprint: H256 | string | Uint8Array,
|
|
489
|
+
size: u64 | AnyNumber | Uint8Array,
|
|
490
|
+
canServe: bool | boolean | Uint8Array,
|
|
491
|
+
inclusionForestProof:
|
|
492
|
+
| SpTrieStorageProofCompactProof
|
|
493
|
+
| { encodedNodes?: any }
|
|
494
|
+
| string
|
|
495
|
+
| Uint8Array
|
|
496
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
497
|
+
[H256, H256, Bytes, AccountId32, H256, u64, bool, SpTrieStorageProofCompactProof]
|
|
498
|
+
>;
|
|
499
|
+
/**
|
|
500
|
+
* Used by a BSP to volunteer for storing a file.
|
|
501
|
+
*
|
|
502
|
+
* The transaction will fail if the XOR between the file ID and the BSP ID is not below the threshold,
|
|
503
|
+
* so a BSP is strongly advised to check beforehand. Another reason for failure is
|
|
504
|
+
* if the maximum number of BSPs has been reached. A successful assignment as BSP means
|
|
505
|
+
* that some of the collateral tokens of that MSP are frozen.
|
|
506
|
+
**/
|
|
507
|
+
bspVolunteer: AugmentedSubmittable<
|
|
508
|
+
(fileKey: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
509
|
+
[H256]
|
|
510
|
+
>;
|
|
511
|
+
/**
|
|
512
|
+
* Create and associate a collection with a bucket.
|
|
513
|
+
**/
|
|
514
|
+
createAndAssociateCollectionWithBucket: AugmentedSubmittable<
|
|
515
|
+
(bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
516
|
+
[H256]
|
|
517
|
+
>;
|
|
518
|
+
createBucket: AugmentedSubmittable<
|
|
519
|
+
(
|
|
520
|
+
mspId: H256 | string | Uint8Array,
|
|
521
|
+
name: Bytes | string | Uint8Array,
|
|
522
|
+
private: bool | boolean | Uint8Array
|
|
523
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
524
|
+
[H256, Bytes, bool]
|
|
525
|
+
>;
|
|
526
|
+
deleteFile: AugmentedSubmittable<
|
|
527
|
+
(
|
|
528
|
+
bucketId: H256 | string | Uint8Array,
|
|
529
|
+
fileKey: H256 | string | Uint8Array,
|
|
530
|
+
location: Bytes | string | Uint8Array,
|
|
531
|
+
size: u64 | AnyNumber | Uint8Array,
|
|
532
|
+
fingerprint: H256 | string | Uint8Array,
|
|
533
|
+
maybeInclusionForestProof:
|
|
534
|
+
| Option<SpTrieStorageProofCompactProof>
|
|
535
|
+
| null
|
|
536
|
+
| Uint8Array
|
|
537
|
+
| SpTrieStorageProofCompactProof
|
|
538
|
+
| { encodedNodes?: any }
|
|
539
|
+
| string
|
|
540
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
541
|
+
[H256, H256, Bytes, u64, H256, Option<SpTrieStorageProofCompactProof>]
|
|
542
|
+
>;
|
|
543
|
+
/**
|
|
544
|
+
* Issue a new storage request for a file
|
|
545
|
+
**/
|
|
546
|
+
issueStorageRequest: AugmentedSubmittable<
|
|
547
|
+
(
|
|
548
|
+
bucketId: H256 | string | Uint8Array,
|
|
549
|
+
location: Bytes | string | Uint8Array,
|
|
550
|
+
fingerprint: H256 | string | Uint8Array,
|
|
551
|
+
size: u64 | AnyNumber | Uint8Array,
|
|
552
|
+
mspId: H256 | string | Uint8Array,
|
|
553
|
+
peerIds: Vec<Bytes> | (Bytes | string | Uint8Array)[]
|
|
554
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
555
|
+
[H256, Bytes, H256, u64, H256, Vec<Bytes>]
|
|
556
|
+
>;
|
|
557
|
+
mspRespondMoveBucketRequest: AugmentedSubmittable<
|
|
558
|
+
(
|
|
559
|
+
bucketId: H256 | string | Uint8Array,
|
|
560
|
+
response:
|
|
561
|
+
| PalletFileSystemBucketMoveRequestResponse
|
|
562
|
+
| "Accepted"
|
|
563
|
+
| "Rejected"
|
|
564
|
+
| number
|
|
565
|
+
| Uint8Array
|
|
566
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
567
|
+
[H256, PalletFileSystemBucketMoveRequestResponse]
|
|
568
|
+
>;
|
|
569
|
+
/**
|
|
570
|
+
* Used by a MSP to accept or decline storage requests in batches, grouped by bucket.
|
|
571
|
+
*
|
|
572
|
+
* This follows a best-effort strategy, meaning that all file keys will be processed and declared to have successfully be
|
|
573
|
+
* accepted, rejected or have failed to be processed in the results of the event emitted.
|
|
574
|
+
*
|
|
575
|
+
* The MSP has to provide a file proof for all the file keys that are being accepted and a non-inclusion proof for the file keys
|
|
576
|
+
* in the bucket's Merkle Patricia Forest. The file proofs for the file keys is necessary to verify that
|
|
577
|
+
* the MSP actually has the files, while the non-inclusion proof is necessary to verify that the MSP
|
|
578
|
+
* wasn't storing it before.
|
|
579
|
+
**/
|
|
580
|
+
mspRespondStorageRequestsMultipleBuckets: AugmentedSubmittable<
|
|
581
|
+
(
|
|
582
|
+
fileKeyResponsesInput:
|
|
583
|
+
| Vec<ITuple<[H256, PalletFileSystemMspStorageRequestResponse]>>
|
|
584
|
+
| [
|
|
585
|
+
H256 | string | Uint8Array,
|
|
586
|
+
(
|
|
587
|
+
| PalletFileSystemMspStorageRequestResponse
|
|
588
|
+
| { accept?: any; reject?: any }
|
|
589
|
+
| string
|
|
590
|
+
| Uint8Array
|
|
591
|
+
)
|
|
592
|
+
][]
|
|
593
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
594
|
+
[Vec<ITuple<[H256, PalletFileSystemMspStorageRequestResponse]>>]
|
|
595
|
+
>;
|
|
596
|
+
pendingFileDeletionRequestSubmitProof: AugmentedSubmittable<
|
|
597
|
+
(
|
|
598
|
+
user: AccountId32 | string | Uint8Array,
|
|
599
|
+
fileKey: H256 | string | Uint8Array,
|
|
600
|
+
bucketId: H256 | string | Uint8Array,
|
|
601
|
+
forestProof: SpTrieStorageProofCompactProof | { encodedNodes?: any } | string | Uint8Array
|
|
602
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
603
|
+
[AccountId32, H256, H256, SpTrieStorageProofCompactProof]
|
|
604
|
+
>;
|
|
605
|
+
requestMoveBucket: AugmentedSubmittable<
|
|
606
|
+
(
|
|
607
|
+
bucketId: H256 | string | Uint8Array,
|
|
608
|
+
newMspId: H256 | string | Uint8Array
|
|
609
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
610
|
+
[H256, H256]
|
|
611
|
+
>;
|
|
612
|
+
/**
|
|
613
|
+
* Revoke storage request
|
|
614
|
+
**/
|
|
615
|
+
revokeStorageRequest: AugmentedSubmittable<
|
|
616
|
+
(fileKey: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
617
|
+
[H256]
|
|
618
|
+
>;
|
|
619
|
+
setGlobalParameters: AugmentedSubmittable<
|
|
620
|
+
(
|
|
621
|
+
replicationTarget: Option<u32> | null | Uint8Array | u32 | AnyNumber,
|
|
622
|
+
tickRangeToMaximumThreshold: Option<u32> | null | Uint8Array | u32 | AnyNumber
|
|
623
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
624
|
+
[Option<u32>, Option<u32>]
|
|
625
|
+
>;
|
|
626
|
+
/**
|
|
627
|
+
* Executed by a SP to stop storing a file from an insolvent user.
|
|
628
|
+
*
|
|
629
|
+
* This is used when a user has become insolvent and the SP needs to stop storing the files of that user, since
|
|
630
|
+
* it won't be getting paid for it anymore.
|
|
631
|
+
* The validations are similar to the ones in the `bsp_request_stop_storing` and `bsp_confirm_stop_storing` extrinsics, but the SP doesn't need to
|
|
632
|
+
* wait for a minimum amount of blocks to confirm to stop storing the file nor it has to be a BSP.
|
|
633
|
+
**/
|
|
634
|
+
stopStoringForInsolventUser: AugmentedSubmittable<
|
|
635
|
+
(
|
|
636
|
+
fileKey: H256 | string | Uint8Array,
|
|
637
|
+
bucketId: H256 | string | Uint8Array,
|
|
638
|
+
location: Bytes | string | Uint8Array,
|
|
639
|
+
owner: AccountId32 | string | Uint8Array,
|
|
640
|
+
fingerprint: H256 | string | Uint8Array,
|
|
641
|
+
size: u64 | AnyNumber | Uint8Array,
|
|
642
|
+
inclusionForestProof:
|
|
643
|
+
| SpTrieStorageProofCompactProof
|
|
644
|
+
| { encodedNodes?: any }
|
|
645
|
+
| string
|
|
646
|
+
| Uint8Array
|
|
647
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
648
|
+
[H256, H256, Bytes, AccountId32, H256, u64, SpTrieStorageProofCompactProof]
|
|
649
|
+
>;
|
|
650
|
+
updateBucketPrivacy: AugmentedSubmittable<
|
|
651
|
+
(
|
|
652
|
+
bucketId: H256 | string | Uint8Array,
|
|
653
|
+
private: bool | boolean | Uint8Array
|
|
654
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
655
|
+
[H256, bool]
|
|
656
|
+
>;
|
|
657
|
+
/**
|
|
658
|
+
* Generic tx
|
|
659
|
+
**/
|
|
660
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
661
|
+
};
|
|
662
|
+
messageQueue: {
|
|
663
|
+
/**
|
|
664
|
+
* Execute an overweight message.
|
|
665
|
+
*
|
|
666
|
+
* Temporary processing errors will be propagated whereas permanent errors are treated
|
|
667
|
+
* as success condition.
|
|
668
|
+
*
|
|
669
|
+
* - `origin`: Must be `Signed`.
|
|
670
|
+
* - `message_origin`: The origin from which the message to be executed arrived.
|
|
671
|
+
* - `page`: The page in the queue in which the message to be executed is sitting.
|
|
672
|
+
* - `index`: The index into the queue of the message to be executed.
|
|
673
|
+
* - `weight_limit`: The maximum amount of weight allowed to be consumed in the execution
|
|
674
|
+
* of the message.
|
|
675
|
+
*
|
|
676
|
+
* Benchmark complexity considerations: O(index + weight_limit).
|
|
677
|
+
**/
|
|
678
|
+
executeOverweight: AugmentedSubmittable<
|
|
679
|
+
(
|
|
680
|
+
messageOrigin:
|
|
681
|
+
| CumulusPrimitivesCoreAggregateMessageOrigin
|
|
682
|
+
| { Here: any }
|
|
683
|
+
| { Parent: any }
|
|
684
|
+
| { Sibling: any }
|
|
685
|
+
| string
|
|
686
|
+
| Uint8Array,
|
|
687
|
+
page: u32 | AnyNumber | Uint8Array,
|
|
688
|
+
index: u32 | AnyNumber | Uint8Array,
|
|
689
|
+
weightLimit:
|
|
690
|
+
| SpWeightsWeightV2Weight
|
|
691
|
+
| { refTime?: any; proofSize?: any }
|
|
692
|
+
| string
|
|
693
|
+
| Uint8Array
|
|
694
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
695
|
+
[CumulusPrimitivesCoreAggregateMessageOrigin, u32, u32, SpWeightsWeightV2Weight]
|
|
696
|
+
>;
|
|
697
|
+
/**
|
|
698
|
+
* Remove a page which has no more messages remaining to be processed or is stale.
|
|
699
|
+
**/
|
|
700
|
+
reapPage: AugmentedSubmittable<
|
|
701
|
+
(
|
|
702
|
+
messageOrigin:
|
|
703
|
+
| CumulusPrimitivesCoreAggregateMessageOrigin
|
|
704
|
+
| { Here: any }
|
|
705
|
+
| { Parent: any }
|
|
706
|
+
| { Sibling: any }
|
|
707
|
+
| string
|
|
708
|
+
| Uint8Array,
|
|
709
|
+
pageIndex: u32 | AnyNumber | Uint8Array
|
|
710
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
711
|
+
[CumulusPrimitivesCoreAggregateMessageOrigin, u32]
|
|
712
|
+
>;
|
|
713
|
+
/**
|
|
714
|
+
* Generic tx
|
|
715
|
+
**/
|
|
716
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
717
|
+
};
|
|
718
|
+
nfts: {
|
|
719
|
+
/**
|
|
720
|
+
* Approve item's attributes to be changed by a delegated third-party account.
|
|
721
|
+
*
|
|
722
|
+
* Origin must be Signed and must be an owner of the `item`.
|
|
723
|
+
*
|
|
724
|
+
* - `collection`: A collection of the item.
|
|
725
|
+
* - `item`: The item that holds attributes.
|
|
726
|
+
* - `delegate`: The account to delegate permission to change attributes of the item.
|
|
727
|
+
*
|
|
728
|
+
* Emits `ItemAttributesApprovalAdded` on success.
|
|
729
|
+
**/
|
|
730
|
+
approveItemAttributes: AugmentedSubmittable<
|
|
731
|
+
(
|
|
732
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
733
|
+
item: u32 | AnyNumber | Uint8Array,
|
|
734
|
+
delegate:
|
|
735
|
+
| MultiAddress
|
|
736
|
+
| { Id: any }
|
|
737
|
+
| { Index: any }
|
|
738
|
+
| { Raw: any }
|
|
739
|
+
| { Address32: any }
|
|
740
|
+
| { Address20: any }
|
|
741
|
+
| string
|
|
742
|
+
| Uint8Array
|
|
743
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
744
|
+
[u32, u32, MultiAddress]
|
|
745
|
+
>;
|
|
746
|
+
/**
|
|
747
|
+
* Approve an item to be transferred by a delegated third-party account.
|
|
748
|
+
*
|
|
749
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the
|
|
750
|
+
* `item`.
|
|
751
|
+
*
|
|
752
|
+
* - `collection`: The collection of the item to be approved for delegated transfer.
|
|
753
|
+
* - `item`: The item to be approved for delegated transfer.
|
|
754
|
+
* - `delegate`: The account to delegate permission to transfer the item.
|
|
755
|
+
* - `maybe_deadline`: Optional deadline for the approval. Specified by providing the
|
|
756
|
+
* number of blocks after which the approval will expire
|
|
757
|
+
*
|
|
758
|
+
* Emits `TransferApproved` on success.
|
|
759
|
+
*
|
|
760
|
+
* Weight: `O(1)`
|
|
761
|
+
**/
|
|
762
|
+
approveTransfer: AugmentedSubmittable<
|
|
763
|
+
(
|
|
764
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
765
|
+
item: u32 | AnyNumber | Uint8Array,
|
|
766
|
+
delegate:
|
|
767
|
+
| MultiAddress
|
|
768
|
+
| { Id: any }
|
|
769
|
+
| { Index: any }
|
|
770
|
+
| { Raw: any }
|
|
771
|
+
| { Address32: any }
|
|
772
|
+
| { Address20: any }
|
|
773
|
+
| string
|
|
774
|
+
| Uint8Array,
|
|
775
|
+
maybeDeadline: Option<u32> | null | Uint8Array | u32 | AnyNumber
|
|
776
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
777
|
+
[u32, u32, MultiAddress, Option<u32>]
|
|
778
|
+
>;
|
|
779
|
+
/**
|
|
780
|
+
* Destroy a single item.
|
|
781
|
+
*
|
|
782
|
+
* The origin must conform to `ForceOrigin` or must be Signed and the signing account must
|
|
783
|
+
* be the owner of the `item`.
|
|
784
|
+
*
|
|
785
|
+
* - `collection`: The collection of the item to be burned.
|
|
786
|
+
* - `item`: The item to be burned.
|
|
787
|
+
*
|
|
788
|
+
* Emits `Burned`.
|
|
789
|
+
*
|
|
790
|
+
* Weight: `O(1)`
|
|
791
|
+
**/
|
|
792
|
+
burn: AugmentedSubmittable<
|
|
793
|
+
(
|
|
794
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
795
|
+
item: u32 | AnyNumber | Uint8Array
|
|
796
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
797
|
+
[u32, u32]
|
|
798
|
+
>;
|
|
799
|
+
/**
|
|
800
|
+
* Allows to buy an item if it's up for sale.
|
|
801
|
+
*
|
|
802
|
+
* Origin must be Signed and must not be the owner of the `item`.
|
|
803
|
+
*
|
|
804
|
+
* - `collection`: The collection of the item.
|
|
805
|
+
* - `item`: The item the sender wants to buy.
|
|
806
|
+
* - `bid_price`: The price the sender is willing to pay.
|
|
807
|
+
*
|
|
808
|
+
* Emits `ItemBought` on success.
|
|
809
|
+
**/
|
|
810
|
+
buyItem: AugmentedSubmittable<
|
|
811
|
+
(
|
|
812
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
813
|
+
item: u32 | AnyNumber | Uint8Array,
|
|
814
|
+
bidPrice: u128 | AnyNumber | Uint8Array
|
|
815
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
816
|
+
[u32, u32, u128]
|
|
817
|
+
>;
|
|
818
|
+
/**
|
|
819
|
+
* Cancel one of the transfer approvals for a specific item.
|
|
820
|
+
*
|
|
821
|
+
* Origin must be either:
|
|
822
|
+
* - the `Force` origin;
|
|
823
|
+
* - `Signed` with the signer being the Owner of the `item`;
|
|
824
|
+
*
|
|
825
|
+
* Arguments:
|
|
826
|
+
* - `collection`: The collection of the item of whose approval will be cancelled.
|
|
827
|
+
* - `item`: The item of the collection of whose approval will be cancelled.
|
|
828
|
+
* - `delegate`: The account that is going to loose their approval.
|
|
829
|
+
*
|
|
830
|
+
* Emits `ApprovalCancelled` on success.
|
|
831
|
+
*
|
|
832
|
+
* Weight: `O(1)`
|
|
833
|
+
**/
|
|
834
|
+
cancelApproval: AugmentedSubmittable<
|
|
835
|
+
(
|
|
836
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
837
|
+
item: u32 | AnyNumber | Uint8Array,
|
|
838
|
+
delegate:
|
|
839
|
+
| MultiAddress
|
|
840
|
+
| { Id: any }
|
|
841
|
+
| { Index: any }
|
|
842
|
+
| { Raw: any }
|
|
843
|
+
| { Address32: any }
|
|
844
|
+
| { Address20: any }
|
|
845
|
+
| string
|
|
846
|
+
| Uint8Array
|
|
847
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
848
|
+
[u32, u32, MultiAddress]
|
|
849
|
+
>;
|
|
850
|
+
/**
|
|
851
|
+
* Cancel the previously provided approval to change item's attributes.
|
|
852
|
+
* All the previously set attributes by the `delegate` will be removed.
|
|
853
|
+
*
|
|
854
|
+
* Origin must be Signed and must be an owner of the `item`.
|
|
855
|
+
*
|
|
856
|
+
* - `collection`: Collection that the item is contained within.
|
|
857
|
+
* - `item`: The item that holds attributes.
|
|
858
|
+
* - `delegate`: The previously approved account to remove.
|
|
859
|
+
*
|
|
860
|
+
* Emits `ItemAttributesApprovalRemoved` on success.
|
|
861
|
+
**/
|
|
862
|
+
cancelItemAttributesApproval: AugmentedSubmittable<
|
|
863
|
+
(
|
|
864
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
865
|
+
item: u32 | AnyNumber | Uint8Array,
|
|
866
|
+
delegate:
|
|
867
|
+
| MultiAddress
|
|
868
|
+
| { Id: any }
|
|
869
|
+
| { Index: any }
|
|
870
|
+
| { Raw: any }
|
|
871
|
+
| { Address32: any }
|
|
872
|
+
| { Address20: any }
|
|
873
|
+
| string
|
|
874
|
+
| Uint8Array,
|
|
875
|
+
witness:
|
|
876
|
+
| PalletNftsCancelAttributesApprovalWitness
|
|
877
|
+
| { accountAttributes?: any }
|
|
878
|
+
| string
|
|
879
|
+
| Uint8Array
|
|
880
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
881
|
+
[u32, u32, MultiAddress, PalletNftsCancelAttributesApprovalWitness]
|
|
882
|
+
>;
|
|
883
|
+
/**
|
|
884
|
+
* Cancel an atomic swap.
|
|
885
|
+
*
|
|
886
|
+
* Origin must be Signed.
|
|
887
|
+
* Origin must be an owner of the `item` if the deadline hasn't expired.
|
|
888
|
+
*
|
|
889
|
+
* - `collection`: The collection of the item.
|
|
890
|
+
* - `item`: The item an owner wants to give.
|
|
891
|
+
*
|
|
892
|
+
* Emits `SwapCancelled` on success.
|
|
893
|
+
**/
|
|
894
|
+
cancelSwap: AugmentedSubmittable<
|
|
895
|
+
(
|
|
896
|
+
offeredCollection: u32 | AnyNumber | Uint8Array,
|
|
897
|
+
offeredItem: u32 | AnyNumber | Uint8Array
|
|
898
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
899
|
+
[u32, u32]
|
|
900
|
+
>;
|
|
901
|
+
/**
|
|
902
|
+
* Claim an atomic swap.
|
|
903
|
+
* This method executes a pending swap, that was created by a counterpart before.
|
|
904
|
+
*
|
|
905
|
+
* Origin must be Signed and must be an owner of the `item`.
|
|
906
|
+
*
|
|
907
|
+
* - `send_collection`: The collection of the item to be sent.
|
|
908
|
+
* - `send_item`: The item to be sent.
|
|
909
|
+
* - `receive_collection`: The collection of the item to be received.
|
|
910
|
+
* - `receive_item`: The item to be received.
|
|
911
|
+
* - `witness_price`: A price that was previously agreed on.
|
|
912
|
+
*
|
|
913
|
+
* Emits `SwapClaimed` on success.
|
|
914
|
+
**/
|
|
915
|
+
claimSwap: AugmentedSubmittable<
|
|
916
|
+
(
|
|
917
|
+
sendCollection: u32 | AnyNumber | Uint8Array,
|
|
918
|
+
sendItem: u32 | AnyNumber | Uint8Array,
|
|
919
|
+
receiveCollection: u32 | AnyNumber | Uint8Array,
|
|
920
|
+
receiveItem: u32 | AnyNumber | Uint8Array,
|
|
921
|
+
witnessPrice:
|
|
922
|
+
| Option<PalletNftsPriceWithDirection>
|
|
923
|
+
| null
|
|
924
|
+
| Uint8Array
|
|
925
|
+
| PalletNftsPriceWithDirection
|
|
926
|
+
| { amount?: any; direction?: any }
|
|
927
|
+
| string
|
|
928
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
929
|
+
[u32, u32, u32, u32, Option<PalletNftsPriceWithDirection>]
|
|
930
|
+
>;
|
|
931
|
+
/**
|
|
932
|
+
* Cancel all the approvals of a specific item.
|
|
933
|
+
*
|
|
934
|
+
* Origin must be either:
|
|
935
|
+
* - the `Force` origin;
|
|
936
|
+
* - `Signed` with the signer being the Owner of the `item`;
|
|
937
|
+
*
|
|
938
|
+
* Arguments:
|
|
939
|
+
* - `collection`: The collection of the item of whose approvals will be cleared.
|
|
940
|
+
* - `item`: The item of the collection of whose approvals will be cleared.
|
|
941
|
+
*
|
|
942
|
+
* Emits `AllApprovalsCancelled` on success.
|
|
943
|
+
*
|
|
944
|
+
* Weight: `O(1)`
|
|
945
|
+
**/
|
|
946
|
+
clearAllTransferApprovals: AugmentedSubmittable<
|
|
947
|
+
(
|
|
948
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
949
|
+
item: u32 | AnyNumber | Uint8Array
|
|
950
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
951
|
+
[u32, u32]
|
|
952
|
+
>;
|
|
953
|
+
/**
|
|
954
|
+
* Clear an attribute for a collection or item.
|
|
955
|
+
*
|
|
956
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the
|
|
957
|
+
* attribute.
|
|
958
|
+
*
|
|
959
|
+
* Any deposit is freed for the collection's owner.
|
|
960
|
+
*
|
|
961
|
+
* - `collection`: The identifier of the collection whose item's metadata to clear.
|
|
962
|
+
* - `maybe_item`: The identifier of the item whose metadata to clear.
|
|
963
|
+
* - `namespace`: Attribute's namespace.
|
|
964
|
+
* - `key`: The key of the attribute.
|
|
965
|
+
*
|
|
966
|
+
* Emits `AttributeCleared`.
|
|
967
|
+
*
|
|
968
|
+
* Weight: `O(1)`
|
|
969
|
+
**/
|
|
970
|
+
clearAttribute: AugmentedSubmittable<
|
|
971
|
+
(
|
|
972
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
973
|
+
maybeItem: Option<u32> | null | Uint8Array | u32 | AnyNumber,
|
|
974
|
+
namespace:
|
|
975
|
+
| PalletNftsAttributeNamespace
|
|
976
|
+
| { Pallet: any }
|
|
977
|
+
| { CollectionOwner: any }
|
|
978
|
+
| { ItemOwner: any }
|
|
979
|
+
| { Account: any }
|
|
980
|
+
| string
|
|
981
|
+
| Uint8Array,
|
|
982
|
+
key: Bytes | string | Uint8Array
|
|
983
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
984
|
+
[u32, Option<u32>, PalletNftsAttributeNamespace, Bytes]
|
|
985
|
+
>;
|
|
986
|
+
/**
|
|
987
|
+
* Clear the metadata for a collection.
|
|
988
|
+
*
|
|
989
|
+
* Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of
|
|
990
|
+
* the `collection`.
|
|
991
|
+
*
|
|
992
|
+
* Any deposit is freed for the collection's owner.
|
|
993
|
+
*
|
|
994
|
+
* - `collection`: The identifier of the collection whose metadata to clear.
|
|
995
|
+
*
|
|
996
|
+
* Emits `CollectionMetadataCleared`.
|
|
997
|
+
*
|
|
998
|
+
* Weight: `O(1)`
|
|
999
|
+
**/
|
|
1000
|
+
clearCollectionMetadata: AugmentedSubmittable<
|
|
1001
|
+
(collection: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
1002
|
+
[u32]
|
|
1003
|
+
>;
|
|
1004
|
+
/**
|
|
1005
|
+
* Clear the metadata for an item.
|
|
1006
|
+
*
|
|
1007
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the
|
|
1008
|
+
* `collection`.
|
|
1009
|
+
*
|
|
1010
|
+
* Any deposit is freed for the collection's owner.
|
|
1011
|
+
*
|
|
1012
|
+
* - `collection`: The identifier of the collection whose item's metadata to clear.
|
|
1013
|
+
* - `item`: The identifier of the item whose metadata to clear.
|
|
1014
|
+
*
|
|
1015
|
+
* Emits `ItemMetadataCleared`.
|
|
1016
|
+
*
|
|
1017
|
+
* Weight: `O(1)`
|
|
1018
|
+
**/
|
|
1019
|
+
clearMetadata: AugmentedSubmittable<
|
|
1020
|
+
(
|
|
1021
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1022
|
+
item: u32 | AnyNumber | Uint8Array
|
|
1023
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1024
|
+
[u32, u32]
|
|
1025
|
+
>;
|
|
1026
|
+
/**
|
|
1027
|
+
* Issue a new collection of non-fungible items from a public origin.
|
|
1028
|
+
*
|
|
1029
|
+
* This new collection has no items initially and its owner is the origin.
|
|
1030
|
+
*
|
|
1031
|
+
* The origin must be Signed and the sender must have sufficient funds free.
|
|
1032
|
+
*
|
|
1033
|
+
* `CollectionDeposit` funds of sender are reserved.
|
|
1034
|
+
*
|
|
1035
|
+
* Parameters:
|
|
1036
|
+
* - `admin`: The admin of this collection. The admin is the initial address of each
|
|
1037
|
+
* member of the collection's admin team.
|
|
1038
|
+
*
|
|
1039
|
+
* Emits `Created` event when successful.
|
|
1040
|
+
*
|
|
1041
|
+
* Weight: `O(1)`
|
|
1042
|
+
**/
|
|
1043
|
+
create: AugmentedSubmittable<
|
|
1044
|
+
(
|
|
1045
|
+
admin:
|
|
1046
|
+
| MultiAddress
|
|
1047
|
+
| { Id: any }
|
|
1048
|
+
| { Index: any }
|
|
1049
|
+
| { Raw: any }
|
|
1050
|
+
| { Address32: any }
|
|
1051
|
+
| { Address20: any }
|
|
1052
|
+
| string
|
|
1053
|
+
| Uint8Array,
|
|
1054
|
+
config:
|
|
1055
|
+
| PalletNftsCollectionConfig
|
|
1056
|
+
| { settings?: any; maxSupply?: any; mintSettings?: any }
|
|
1057
|
+
| string
|
|
1058
|
+
| Uint8Array
|
|
1059
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1060
|
+
[MultiAddress, PalletNftsCollectionConfig]
|
|
1061
|
+
>;
|
|
1062
|
+
/**
|
|
1063
|
+
* Register a new atomic swap, declaring an intention to send an `item` in exchange for
|
|
1064
|
+
* `desired_item` from origin to target on the current blockchain.
|
|
1065
|
+
* The target can execute the swap during the specified `duration` of blocks (if set).
|
|
1066
|
+
* Additionally, the price could be set for the desired `item`.
|
|
1067
|
+
*
|
|
1068
|
+
* Origin must be Signed and must be an owner of the `item`.
|
|
1069
|
+
*
|
|
1070
|
+
* - `collection`: The collection of the item.
|
|
1071
|
+
* - `item`: The item an owner wants to give.
|
|
1072
|
+
* - `desired_collection`: The collection of the desired item.
|
|
1073
|
+
* - `desired_item`: The desired item an owner wants to receive.
|
|
1074
|
+
* - `maybe_price`: The price an owner is willing to pay or receive for the desired `item`.
|
|
1075
|
+
* - `duration`: A deadline for the swap. Specified by providing the number of blocks
|
|
1076
|
+
* after which the swap will expire.
|
|
1077
|
+
*
|
|
1078
|
+
* Emits `SwapCreated` on success.
|
|
1079
|
+
**/
|
|
1080
|
+
createSwap: AugmentedSubmittable<
|
|
1081
|
+
(
|
|
1082
|
+
offeredCollection: u32 | AnyNumber | Uint8Array,
|
|
1083
|
+
offeredItem: u32 | AnyNumber | Uint8Array,
|
|
1084
|
+
desiredCollection: u32 | AnyNumber | Uint8Array,
|
|
1085
|
+
maybeDesiredItem: Option<u32> | null | Uint8Array | u32 | AnyNumber,
|
|
1086
|
+
maybePrice:
|
|
1087
|
+
| Option<PalletNftsPriceWithDirection>
|
|
1088
|
+
| null
|
|
1089
|
+
| Uint8Array
|
|
1090
|
+
| PalletNftsPriceWithDirection
|
|
1091
|
+
| { amount?: any; direction?: any }
|
|
1092
|
+
| string,
|
|
1093
|
+
duration: u32 | AnyNumber | Uint8Array
|
|
1094
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1095
|
+
[u32, u32, u32, Option<u32>, Option<PalletNftsPriceWithDirection>, u32]
|
|
1096
|
+
>;
|
|
1097
|
+
/**
|
|
1098
|
+
* Destroy a collection of fungible items.
|
|
1099
|
+
*
|
|
1100
|
+
* The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the
|
|
1101
|
+
* owner of the `collection`.
|
|
1102
|
+
*
|
|
1103
|
+
* NOTE: The collection must have 0 items to be destroyed.
|
|
1104
|
+
*
|
|
1105
|
+
* - `collection`: The identifier of the collection to be destroyed.
|
|
1106
|
+
* - `witness`: Information on the items minted in the collection. This must be
|
|
1107
|
+
* correct.
|
|
1108
|
+
*
|
|
1109
|
+
* Emits `Destroyed` event when successful.
|
|
1110
|
+
*
|
|
1111
|
+
* Weight: `O(m + c + a)` where:
|
|
1112
|
+
* - `m = witness.item_metadatas`
|
|
1113
|
+
* - `c = witness.item_configs`
|
|
1114
|
+
* - `a = witness.attributes`
|
|
1115
|
+
**/
|
|
1116
|
+
destroy: AugmentedSubmittable<
|
|
1117
|
+
(
|
|
1118
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1119
|
+
witness:
|
|
1120
|
+
| PalletNftsDestroyWitness
|
|
1121
|
+
| { itemMetadatas?: any; itemConfigs?: any; attributes?: any }
|
|
1122
|
+
| string
|
|
1123
|
+
| Uint8Array
|
|
1124
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1125
|
+
[u32, PalletNftsDestroyWitness]
|
|
1126
|
+
>;
|
|
1127
|
+
/**
|
|
1128
|
+
* Change the config of a collection.
|
|
1129
|
+
*
|
|
1130
|
+
* Origin must be `ForceOrigin`.
|
|
1131
|
+
*
|
|
1132
|
+
* - `collection`: The identifier of the collection.
|
|
1133
|
+
* - `config`: The new config of this collection.
|
|
1134
|
+
*
|
|
1135
|
+
* Emits `CollectionConfigChanged`.
|
|
1136
|
+
*
|
|
1137
|
+
* Weight: `O(1)`
|
|
1138
|
+
**/
|
|
1139
|
+
forceCollectionConfig: AugmentedSubmittable<
|
|
1140
|
+
(
|
|
1141
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1142
|
+
config:
|
|
1143
|
+
| PalletNftsCollectionConfig
|
|
1144
|
+
| { settings?: any; maxSupply?: any; mintSettings?: any }
|
|
1145
|
+
| string
|
|
1146
|
+
| Uint8Array
|
|
1147
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1148
|
+
[u32, PalletNftsCollectionConfig]
|
|
1149
|
+
>;
|
|
1150
|
+
/**
|
|
1151
|
+
* Change the Owner of a collection.
|
|
1152
|
+
*
|
|
1153
|
+
* Origin must be `ForceOrigin`.
|
|
1154
|
+
*
|
|
1155
|
+
* - `collection`: The identifier of the collection.
|
|
1156
|
+
* - `owner`: The new Owner of this collection.
|
|
1157
|
+
*
|
|
1158
|
+
* Emits `OwnerChanged`.
|
|
1159
|
+
*
|
|
1160
|
+
* Weight: `O(1)`
|
|
1161
|
+
**/
|
|
1162
|
+
forceCollectionOwner: AugmentedSubmittable<
|
|
1163
|
+
(
|
|
1164
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1165
|
+
owner:
|
|
1166
|
+
| MultiAddress
|
|
1167
|
+
| { Id: any }
|
|
1168
|
+
| { Index: any }
|
|
1169
|
+
| { Raw: any }
|
|
1170
|
+
| { Address32: any }
|
|
1171
|
+
| { Address20: any }
|
|
1172
|
+
| string
|
|
1173
|
+
| Uint8Array
|
|
1174
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1175
|
+
[u32, MultiAddress]
|
|
1176
|
+
>;
|
|
1177
|
+
/**
|
|
1178
|
+
* Issue a new collection of non-fungible items from a privileged origin.
|
|
1179
|
+
*
|
|
1180
|
+
* This new collection has no items initially.
|
|
1181
|
+
*
|
|
1182
|
+
* The origin must conform to `ForceOrigin`.
|
|
1183
|
+
*
|
|
1184
|
+
* Unlike `create`, no funds are reserved.
|
|
1185
|
+
*
|
|
1186
|
+
* - `owner`: The owner of this collection of items. The owner has full superuser
|
|
1187
|
+
* permissions over this item, but may later change and configure the permissions using
|
|
1188
|
+
* `transfer_ownership` and `set_team`.
|
|
1189
|
+
*
|
|
1190
|
+
* Emits `ForceCreated` event when successful.
|
|
1191
|
+
*
|
|
1192
|
+
* Weight: `O(1)`
|
|
1193
|
+
**/
|
|
1194
|
+
forceCreate: AugmentedSubmittable<
|
|
1195
|
+
(
|
|
1196
|
+
owner:
|
|
1197
|
+
| MultiAddress
|
|
1198
|
+
| { Id: any }
|
|
1199
|
+
| { Index: any }
|
|
1200
|
+
| { Raw: any }
|
|
1201
|
+
| { Address32: any }
|
|
1202
|
+
| { Address20: any }
|
|
1203
|
+
| string
|
|
1204
|
+
| Uint8Array,
|
|
1205
|
+
config:
|
|
1206
|
+
| PalletNftsCollectionConfig
|
|
1207
|
+
| { settings?: any; maxSupply?: any; mintSettings?: any }
|
|
1208
|
+
| string
|
|
1209
|
+
| Uint8Array
|
|
1210
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1211
|
+
[MultiAddress, PalletNftsCollectionConfig]
|
|
1212
|
+
>;
|
|
1213
|
+
/**
|
|
1214
|
+
* Mint an item of a particular collection from a privileged origin.
|
|
1215
|
+
*
|
|
1216
|
+
* The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the
|
|
1217
|
+
* Issuer of the `collection`.
|
|
1218
|
+
*
|
|
1219
|
+
* - `collection`: The collection of the item to be minted.
|
|
1220
|
+
* - `item`: An identifier of the new item.
|
|
1221
|
+
* - `mint_to`: Account into which the item will be minted.
|
|
1222
|
+
* - `item_config`: A config of the new item.
|
|
1223
|
+
*
|
|
1224
|
+
* Emits `Issued` event when successful.
|
|
1225
|
+
*
|
|
1226
|
+
* Weight: `O(1)`
|
|
1227
|
+
**/
|
|
1228
|
+
forceMint: AugmentedSubmittable<
|
|
1229
|
+
(
|
|
1230
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1231
|
+
item: u32 | AnyNumber | Uint8Array,
|
|
1232
|
+
mintTo:
|
|
1233
|
+
| MultiAddress
|
|
1234
|
+
| { Id: any }
|
|
1235
|
+
| { Index: any }
|
|
1236
|
+
| { Raw: any }
|
|
1237
|
+
| { Address32: any }
|
|
1238
|
+
| { Address20: any }
|
|
1239
|
+
| string
|
|
1240
|
+
| Uint8Array,
|
|
1241
|
+
itemConfig: PalletNftsItemConfig | { settings?: any } | string | Uint8Array
|
|
1242
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1243
|
+
[u32, u32, MultiAddress, PalletNftsItemConfig]
|
|
1244
|
+
>;
|
|
1245
|
+
/**
|
|
1246
|
+
* Force-set an attribute for a collection or item.
|
|
1247
|
+
*
|
|
1248
|
+
* Origin must be `ForceOrigin`.
|
|
1249
|
+
*
|
|
1250
|
+
* If the attribute already exists and it was set by another account, the deposit
|
|
1251
|
+
* will be returned to the previous owner.
|
|
1252
|
+
*
|
|
1253
|
+
* - `set_as`: An optional owner of the attribute.
|
|
1254
|
+
* - `collection`: The identifier of the collection whose item's metadata to set.
|
|
1255
|
+
* - `maybe_item`: The identifier of the item whose metadata to set.
|
|
1256
|
+
* - `namespace`: Attribute's namespace.
|
|
1257
|
+
* - `key`: The key of the attribute.
|
|
1258
|
+
* - `value`: The value to which to set the attribute.
|
|
1259
|
+
*
|
|
1260
|
+
* Emits `AttributeSet`.
|
|
1261
|
+
*
|
|
1262
|
+
* Weight: `O(1)`
|
|
1263
|
+
**/
|
|
1264
|
+
forceSetAttribute: AugmentedSubmittable<
|
|
1265
|
+
(
|
|
1266
|
+
setAs: Option<AccountId32> | null | Uint8Array | AccountId32 | string,
|
|
1267
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1268
|
+
maybeItem: Option<u32> | null | Uint8Array | u32 | AnyNumber,
|
|
1269
|
+
namespace:
|
|
1270
|
+
| PalletNftsAttributeNamespace
|
|
1271
|
+
| { Pallet: any }
|
|
1272
|
+
| { CollectionOwner: any }
|
|
1273
|
+
| { ItemOwner: any }
|
|
1274
|
+
| { Account: any }
|
|
1275
|
+
| string
|
|
1276
|
+
| Uint8Array,
|
|
1277
|
+
key: Bytes | string | Uint8Array,
|
|
1278
|
+
value: Bytes | string | Uint8Array
|
|
1279
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1280
|
+
[Option<AccountId32>, u32, Option<u32>, PalletNftsAttributeNamespace, Bytes, Bytes]
|
|
1281
|
+
>;
|
|
1282
|
+
/**
|
|
1283
|
+
* Disallows specified settings for the whole collection.
|
|
1284
|
+
*
|
|
1285
|
+
* Origin must be Signed and the sender should be the Owner of the `collection`.
|
|
1286
|
+
*
|
|
1287
|
+
* - `collection`: The collection to be locked.
|
|
1288
|
+
* - `lock_settings`: The settings to be locked.
|
|
1289
|
+
*
|
|
1290
|
+
* Note: it's possible to only lock(set) the setting, but not to unset it.
|
|
1291
|
+
*
|
|
1292
|
+
* Emits `CollectionLocked`.
|
|
1293
|
+
*
|
|
1294
|
+
* Weight: `O(1)`
|
|
1295
|
+
**/
|
|
1296
|
+
lockCollection: AugmentedSubmittable<
|
|
1297
|
+
(
|
|
1298
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1299
|
+
lockSettings: u64 | AnyNumber | Uint8Array
|
|
1300
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1301
|
+
[u32, u64]
|
|
1302
|
+
>;
|
|
1303
|
+
/**
|
|
1304
|
+
* Disallows changing the metadata or attributes of the item.
|
|
1305
|
+
*
|
|
1306
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Admin
|
|
1307
|
+
* of the `collection`.
|
|
1308
|
+
*
|
|
1309
|
+
* - `collection`: The collection if the `item`.
|
|
1310
|
+
* - `item`: An item to be locked.
|
|
1311
|
+
* - `lock_metadata`: Specifies whether the metadata should be locked.
|
|
1312
|
+
* - `lock_attributes`: Specifies whether the attributes in the `CollectionOwner` namespace
|
|
1313
|
+
* should be locked.
|
|
1314
|
+
*
|
|
1315
|
+
* Note: `lock_attributes` affects the attributes in the `CollectionOwner` namespace only.
|
|
1316
|
+
* When the metadata or attributes are locked, it won't be possible the unlock them.
|
|
1317
|
+
*
|
|
1318
|
+
* Emits `ItemPropertiesLocked`.
|
|
1319
|
+
*
|
|
1320
|
+
* Weight: `O(1)`
|
|
1321
|
+
**/
|
|
1322
|
+
lockItemProperties: AugmentedSubmittable<
|
|
1323
|
+
(
|
|
1324
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1325
|
+
item: u32 | AnyNumber | Uint8Array,
|
|
1326
|
+
lockMetadata: bool | boolean | Uint8Array,
|
|
1327
|
+
lockAttributes: bool | boolean | Uint8Array
|
|
1328
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1329
|
+
[u32, u32, bool, bool]
|
|
1330
|
+
>;
|
|
1331
|
+
/**
|
|
1332
|
+
* Disallow further unprivileged transfer of an item.
|
|
1333
|
+
*
|
|
1334
|
+
* Origin must be Signed and the sender should be the Freezer of the `collection`.
|
|
1335
|
+
*
|
|
1336
|
+
* - `collection`: The collection of the item to be changed.
|
|
1337
|
+
* - `item`: The item to become non-transferable.
|
|
1338
|
+
*
|
|
1339
|
+
* Emits `ItemTransferLocked`.
|
|
1340
|
+
*
|
|
1341
|
+
* Weight: `O(1)`
|
|
1342
|
+
**/
|
|
1343
|
+
lockItemTransfer: AugmentedSubmittable<
|
|
1344
|
+
(
|
|
1345
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1346
|
+
item: u32 | AnyNumber | Uint8Array
|
|
1347
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1348
|
+
[u32, u32]
|
|
1349
|
+
>;
|
|
1350
|
+
/**
|
|
1351
|
+
* Mint an item of a particular collection.
|
|
1352
|
+
*
|
|
1353
|
+
* The origin must be Signed and the sender must comply with the `mint_settings` rules.
|
|
1354
|
+
*
|
|
1355
|
+
* - `collection`: The collection of the item to be minted.
|
|
1356
|
+
* - `item`: An identifier of the new item.
|
|
1357
|
+
* - `mint_to`: Account into which the item will be minted.
|
|
1358
|
+
* - `witness_data`: When the mint type is `HolderOf(collection_id)`, then the owned
|
|
1359
|
+
* item_id from that collection needs to be provided within the witness data object. If
|
|
1360
|
+
* the mint price is set, then it should be additionally confirmed in the `witness_data`.
|
|
1361
|
+
*
|
|
1362
|
+
* Note: the deposit will be taken from the `origin` and not the `owner` of the `item`.
|
|
1363
|
+
*
|
|
1364
|
+
* Emits `Issued` event when successful.
|
|
1365
|
+
*
|
|
1366
|
+
* Weight: `O(1)`
|
|
1367
|
+
**/
|
|
1368
|
+
mint: AugmentedSubmittable<
|
|
1369
|
+
(
|
|
1370
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1371
|
+
item: u32 | AnyNumber | Uint8Array,
|
|
1372
|
+
mintTo:
|
|
1373
|
+
| MultiAddress
|
|
1374
|
+
| { Id: any }
|
|
1375
|
+
| { Index: any }
|
|
1376
|
+
| { Raw: any }
|
|
1377
|
+
| { Address32: any }
|
|
1378
|
+
| { Address20: any }
|
|
1379
|
+
| string
|
|
1380
|
+
| Uint8Array,
|
|
1381
|
+
witnessData:
|
|
1382
|
+
| Option<PalletNftsMintWitness>
|
|
1383
|
+
| null
|
|
1384
|
+
| Uint8Array
|
|
1385
|
+
| PalletNftsMintWitness
|
|
1386
|
+
| { ownedItem?: any; mintPrice?: any }
|
|
1387
|
+
| string
|
|
1388
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1389
|
+
[u32, u32, MultiAddress, Option<PalletNftsMintWitness>]
|
|
1390
|
+
>;
|
|
1391
|
+
/**
|
|
1392
|
+
* Mint an item by providing the pre-signed approval.
|
|
1393
|
+
*
|
|
1394
|
+
* Origin must be Signed.
|
|
1395
|
+
*
|
|
1396
|
+
* - `mint_data`: The pre-signed approval that consists of the information about the item,
|
|
1397
|
+
* its metadata, attributes, who can mint it (`None` for anyone) and until what block
|
|
1398
|
+
* number.
|
|
1399
|
+
* - `signature`: The signature of the `data` object.
|
|
1400
|
+
* - `signer`: The `data` object's signer. Should be an Issuer of the collection.
|
|
1401
|
+
*
|
|
1402
|
+
* Emits `Issued` on success.
|
|
1403
|
+
* Emits `AttributeSet` if the attributes were provided.
|
|
1404
|
+
* Emits `ItemMetadataSet` if the metadata was not empty.
|
|
1405
|
+
**/
|
|
1406
|
+
mintPreSigned: AugmentedSubmittable<
|
|
1407
|
+
(
|
|
1408
|
+
mintData:
|
|
1409
|
+
| PalletNftsPreSignedMint
|
|
1410
|
+
| {
|
|
1411
|
+
collection?: any;
|
|
1412
|
+
item?: any;
|
|
1413
|
+
attributes?: any;
|
|
1414
|
+
metadata?: any;
|
|
1415
|
+
onlyAccount?: any;
|
|
1416
|
+
deadline?: any;
|
|
1417
|
+
mintPrice?: any;
|
|
1418
|
+
}
|
|
1419
|
+
| string
|
|
1420
|
+
| Uint8Array,
|
|
1421
|
+
signature:
|
|
1422
|
+
| SpRuntimeMultiSignature
|
|
1423
|
+
| { Ed25519: any }
|
|
1424
|
+
| { Sr25519: any }
|
|
1425
|
+
| { Ecdsa: any }
|
|
1426
|
+
| string
|
|
1427
|
+
| Uint8Array,
|
|
1428
|
+
signer: AccountId32 | string | Uint8Array
|
|
1429
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1430
|
+
[PalletNftsPreSignedMint, SpRuntimeMultiSignature, AccountId32]
|
|
1431
|
+
>;
|
|
1432
|
+
/**
|
|
1433
|
+
* Allows to pay the tips.
|
|
1434
|
+
*
|
|
1435
|
+
* Origin must be Signed.
|
|
1436
|
+
*
|
|
1437
|
+
* - `tips`: Tips array.
|
|
1438
|
+
*
|
|
1439
|
+
* Emits `TipSent` on every tip transfer.
|
|
1440
|
+
**/
|
|
1441
|
+
payTips: AugmentedSubmittable<
|
|
1442
|
+
(
|
|
1443
|
+
tips:
|
|
1444
|
+
| Vec<PalletNftsItemTip>
|
|
1445
|
+
| (
|
|
1446
|
+
| PalletNftsItemTip
|
|
1447
|
+
| { collection?: any; item?: any; receiver?: any; amount?: any }
|
|
1448
|
+
| string
|
|
1449
|
+
| Uint8Array
|
|
1450
|
+
)[]
|
|
1451
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1452
|
+
[Vec<PalletNftsItemTip>]
|
|
1453
|
+
>;
|
|
1454
|
+
/**
|
|
1455
|
+
* Re-evaluate the deposits on some items.
|
|
1456
|
+
*
|
|
1457
|
+
* Origin must be Signed and the sender should be the Owner of the `collection`.
|
|
1458
|
+
*
|
|
1459
|
+
* - `collection`: The collection of the items to be reevaluated.
|
|
1460
|
+
* - `items`: The items of the collection whose deposits will be reevaluated.
|
|
1461
|
+
*
|
|
1462
|
+
* NOTE: This exists as a best-effort function. Any items which are unknown or
|
|
1463
|
+
* in the case that the owner account does not have reservable funds to pay for a
|
|
1464
|
+
* deposit increase are ignored. Generally the owner isn't going to call this on items
|
|
1465
|
+
* whose existing deposit is less than the refreshed deposit as it would only cost them,
|
|
1466
|
+
* so it's of little consequence.
|
|
1467
|
+
*
|
|
1468
|
+
* It will still return an error in the case that the collection is unknown or the signer
|
|
1469
|
+
* is not permitted to call it.
|
|
1470
|
+
*
|
|
1471
|
+
* Weight: `O(items.len())`
|
|
1472
|
+
**/
|
|
1473
|
+
redeposit: AugmentedSubmittable<
|
|
1474
|
+
(
|
|
1475
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1476
|
+
items: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]
|
|
1477
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1478
|
+
[u32, Vec<u32>]
|
|
1479
|
+
>;
|
|
1480
|
+
/**
|
|
1481
|
+
* Set (or reset) the acceptance of ownership for a particular account.
|
|
1482
|
+
*
|
|
1483
|
+
* Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a
|
|
1484
|
+
* provider reference.
|
|
1485
|
+
*
|
|
1486
|
+
* - `maybe_collection`: The identifier of the collection whose ownership the signer is
|
|
1487
|
+
* willing to accept, or if `None`, an indication that the signer is willing to accept no
|
|
1488
|
+
* ownership transferal.
|
|
1489
|
+
*
|
|
1490
|
+
* Emits `OwnershipAcceptanceChanged`.
|
|
1491
|
+
**/
|
|
1492
|
+
setAcceptOwnership: AugmentedSubmittable<
|
|
1493
|
+
(
|
|
1494
|
+
maybeCollection: Option<u32> | null | Uint8Array | u32 | AnyNumber
|
|
1495
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1496
|
+
[Option<u32>]
|
|
1497
|
+
>;
|
|
1498
|
+
/**
|
|
1499
|
+
* Set an attribute for a collection or item.
|
|
1500
|
+
*
|
|
1501
|
+
* Origin must be Signed and must conform to the namespace ruleset:
|
|
1502
|
+
* - `CollectionOwner` namespace could be modified by the `collection` Admin only;
|
|
1503
|
+
* - `ItemOwner` namespace could be modified by the `maybe_item` owner only. `maybe_item`
|
|
1504
|
+
* should be set in that case;
|
|
1505
|
+
* - `Account(AccountId)` namespace could be modified only when the `origin` was given a
|
|
1506
|
+
* permission to do so;
|
|
1507
|
+
*
|
|
1508
|
+
* The funds of `origin` are reserved according to the formula:
|
|
1509
|
+
* `AttributeDepositBase + DepositPerByte * (key.len + value.len)` taking into
|
|
1510
|
+
* account any already reserved funds.
|
|
1511
|
+
*
|
|
1512
|
+
* - `collection`: The identifier of the collection whose item's metadata to set.
|
|
1513
|
+
* - `maybe_item`: The identifier of the item whose metadata to set.
|
|
1514
|
+
* - `namespace`: Attribute's namespace.
|
|
1515
|
+
* - `key`: The key of the attribute.
|
|
1516
|
+
* - `value`: The value to which to set the attribute.
|
|
1517
|
+
*
|
|
1518
|
+
* Emits `AttributeSet`.
|
|
1519
|
+
*
|
|
1520
|
+
* Weight: `O(1)`
|
|
1521
|
+
**/
|
|
1522
|
+
setAttribute: AugmentedSubmittable<
|
|
1523
|
+
(
|
|
1524
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1525
|
+
maybeItem: Option<u32> | null | Uint8Array | u32 | AnyNumber,
|
|
1526
|
+
namespace:
|
|
1527
|
+
| PalletNftsAttributeNamespace
|
|
1528
|
+
| { Pallet: any }
|
|
1529
|
+
| { CollectionOwner: any }
|
|
1530
|
+
| { ItemOwner: any }
|
|
1531
|
+
| { Account: any }
|
|
1532
|
+
| string
|
|
1533
|
+
| Uint8Array,
|
|
1534
|
+
key: Bytes | string | Uint8Array,
|
|
1535
|
+
value: Bytes | string | Uint8Array
|
|
1536
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1537
|
+
[u32, Option<u32>, PalletNftsAttributeNamespace, Bytes, Bytes]
|
|
1538
|
+
>;
|
|
1539
|
+
/**
|
|
1540
|
+
* Set attributes for an item by providing the pre-signed approval.
|
|
1541
|
+
*
|
|
1542
|
+
* Origin must be Signed and must be an owner of the `data.item`.
|
|
1543
|
+
*
|
|
1544
|
+
* - `data`: The pre-signed approval that consists of the information about the item,
|
|
1545
|
+
* attributes to update and until what block number.
|
|
1546
|
+
* - `signature`: The signature of the `data` object.
|
|
1547
|
+
* - `signer`: The `data` object's signer. Should be an Admin of the collection for the
|
|
1548
|
+
* `CollectionOwner` namespace.
|
|
1549
|
+
*
|
|
1550
|
+
* Emits `AttributeSet` for each provided attribute.
|
|
1551
|
+
* Emits `ItemAttributesApprovalAdded` if the approval wasn't set before.
|
|
1552
|
+
* Emits `PreSignedAttributesSet` on success.
|
|
1553
|
+
**/
|
|
1554
|
+
setAttributesPreSigned: AugmentedSubmittable<
|
|
1555
|
+
(
|
|
1556
|
+
data:
|
|
1557
|
+
| PalletNftsPreSignedAttributes
|
|
1558
|
+
| { collection?: any; item?: any; attributes?: any; namespace?: any; deadline?: any }
|
|
1559
|
+
| string
|
|
1560
|
+
| Uint8Array,
|
|
1561
|
+
signature:
|
|
1562
|
+
| SpRuntimeMultiSignature
|
|
1563
|
+
| { Ed25519: any }
|
|
1564
|
+
| { Sr25519: any }
|
|
1565
|
+
| { Ecdsa: any }
|
|
1566
|
+
| string
|
|
1567
|
+
| Uint8Array,
|
|
1568
|
+
signer: AccountId32 | string | Uint8Array
|
|
1569
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1570
|
+
[PalletNftsPreSignedAttributes, SpRuntimeMultiSignature, AccountId32]
|
|
1571
|
+
>;
|
|
1572
|
+
/**
|
|
1573
|
+
* Set the maximum number of items a collection could have.
|
|
1574
|
+
*
|
|
1575
|
+
* Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of
|
|
1576
|
+
* the `collection`.
|
|
1577
|
+
*
|
|
1578
|
+
* - `collection`: The identifier of the collection to change.
|
|
1579
|
+
* - `max_supply`: The maximum number of items a collection could have.
|
|
1580
|
+
*
|
|
1581
|
+
* Emits `CollectionMaxSupplySet` event when successful.
|
|
1582
|
+
**/
|
|
1583
|
+
setCollectionMaxSupply: AugmentedSubmittable<
|
|
1584
|
+
(
|
|
1585
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1586
|
+
maxSupply: u32 | AnyNumber | Uint8Array
|
|
1587
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1588
|
+
[u32, u32]
|
|
1589
|
+
>;
|
|
1590
|
+
/**
|
|
1591
|
+
* Set the metadata for a collection.
|
|
1592
|
+
*
|
|
1593
|
+
* Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of
|
|
1594
|
+
* the `collection`.
|
|
1595
|
+
*
|
|
1596
|
+
* If the origin is `Signed`, then funds of signer are reserved according to the formula:
|
|
1597
|
+
* `MetadataDepositBase + DepositPerByte * data.len` taking into
|
|
1598
|
+
* account any already reserved funds.
|
|
1599
|
+
*
|
|
1600
|
+
* - `collection`: The identifier of the item whose metadata to update.
|
|
1601
|
+
* - `data`: The general information of this item. Limited in length by `StringLimit`.
|
|
1602
|
+
*
|
|
1603
|
+
* Emits `CollectionMetadataSet`.
|
|
1604
|
+
*
|
|
1605
|
+
* Weight: `O(1)`
|
|
1606
|
+
**/
|
|
1607
|
+
setCollectionMetadata: AugmentedSubmittable<
|
|
1608
|
+
(
|
|
1609
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1610
|
+
data: Bytes | string | Uint8Array
|
|
1611
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1612
|
+
[u32, Bytes]
|
|
1613
|
+
>;
|
|
1614
|
+
/**
|
|
1615
|
+
* Set the metadata for an item.
|
|
1616
|
+
*
|
|
1617
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the
|
|
1618
|
+
* `collection`.
|
|
1619
|
+
*
|
|
1620
|
+
* If the origin is Signed, then funds of signer are reserved according to the formula:
|
|
1621
|
+
* `MetadataDepositBase + DepositPerByte * data.len` taking into
|
|
1622
|
+
* account any already reserved funds.
|
|
1623
|
+
*
|
|
1624
|
+
* - `collection`: The identifier of the collection whose item's metadata to set.
|
|
1625
|
+
* - `item`: The identifier of the item whose metadata to set.
|
|
1626
|
+
* - `data`: The general information of this item. Limited in length by `StringLimit`.
|
|
1627
|
+
*
|
|
1628
|
+
* Emits `ItemMetadataSet`.
|
|
1629
|
+
*
|
|
1630
|
+
* Weight: `O(1)`
|
|
1631
|
+
**/
|
|
1632
|
+
setMetadata: AugmentedSubmittable<
|
|
1633
|
+
(
|
|
1634
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1635
|
+
item: u32 | AnyNumber | Uint8Array,
|
|
1636
|
+
data: Bytes | string | Uint8Array
|
|
1637
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1638
|
+
[u32, u32, Bytes]
|
|
1639
|
+
>;
|
|
1640
|
+
/**
|
|
1641
|
+
* Set (or reset) the price for an item.
|
|
1642
|
+
*
|
|
1643
|
+
* Origin must be Signed and must be the owner of the `item`.
|
|
1644
|
+
*
|
|
1645
|
+
* - `collection`: The collection of the item.
|
|
1646
|
+
* - `item`: The item to set the price for.
|
|
1647
|
+
* - `price`: The price for the item. Pass `None`, to reset the price.
|
|
1648
|
+
* - `buyer`: Restricts the buy operation to a specific account.
|
|
1649
|
+
*
|
|
1650
|
+
* Emits `ItemPriceSet` on success if the price is not `None`.
|
|
1651
|
+
* Emits `ItemPriceRemoved` on success if the price is `None`.
|
|
1652
|
+
**/
|
|
1653
|
+
setPrice: AugmentedSubmittable<
|
|
1654
|
+
(
|
|
1655
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1656
|
+
item: u32 | AnyNumber | Uint8Array,
|
|
1657
|
+
price: Option<u128> | null | Uint8Array | u128 | AnyNumber,
|
|
1658
|
+
whitelistedBuyer:
|
|
1659
|
+
| Option<MultiAddress>
|
|
1660
|
+
| null
|
|
1661
|
+
| Uint8Array
|
|
1662
|
+
| MultiAddress
|
|
1663
|
+
| { Id: any }
|
|
1664
|
+
| { Index: any }
|
|
1665
|
+
| { Raw: any }
|
|
1666
|
+
| { Address32: any }
|
|
1667
|
+
| { Address20: any }
|
|
1668
|
+
| string
|
|
1669
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1670
|
+
[u32, u32, Option<u128>, Option<MultiAddress>]
|
|
1671
|
+
>;
|
|
1672
|
+
/**
|
|
1673
|
+
* Change the Issuer, Admin and Freezer of a collection.
|
|
1674
|
+
*
|
|
1675
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the
|
|
1676
|
+
* `collection`.
|
|
1677
|
+
*
|
|
1678
|
+
* Note: by setting the role to `None` only the `ForceOrigin` will be able to change it
|
|
1679
|
+
* after to `Some(account)`.
|
|
1680
|
+
*
|
|
1681
|
+
* - `collection`: The collection whose team should be changed.
|
|
1682
|
+
* - `issuer`: The new Issuer of this collection.
|
|
1683
|
+
* - `admin`: The new Admin of this collection.
|
|
1684
|
+
* - `freezer`: The new Freezer of this collection.
|
|
1685
|
+
*
|
|
1686
|
+
* Emits `TeamChanged`.
|
|
1687
|
+
*
|
|
1688
|
+
* Weight: `O(1)`
|
|
1689
|
+
**/
|
|
1690
|
+
setTeam: AugmentedSubmittable<
|
|
1691
|
+
(
|
|
1692
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1693
|
+
issuer:
|
|
1694
|
+
| Option<MultiAddress>
|
|
1695
|
+
| null
|
|
1696
|
+
| Uint8Array
|
|
1697
|
+
| MultiAddress
|
|
1698
|
+
| { Id: any }
|
|
1699
|
+
| { Index: any }
|
|
1700
|
+
| { Raw: any }
|
|
1701
|
+
| { Address32: any }
|
|
1702
|
+
| { Address20: any }
|
|
1703
|
+
| string,
|
|
1704
|
+
admin:
|
|
1705
|
+
| Option<MultiAddress>
|
|
1706
|
+
| null
|
|
1707
|
+
| Uint8Array
|
|
1708
|
+
| MultiAddress
|
|
1709
|
+
| { Id: any }
|
|
1710
|
+
| { Index: any }
|
|
1711
|
+
| { Raw: any }
|
|
1712
|
+
| { Address32: any }
|
|
1713
|
+
| { Address20: any }
|
|
1714
|
+
| string,
|
|
1715
|
+
freezer:
|
|
1716
|
+
| Option<MultiAddress>
|
|
1717
|
+
| null
|
|
1718
|
+
| Uint8Array
|
|
1719
|
+
| MultiAddress
|
|
1720
|
+
| { Id: any }
|
|
1721
|
+
| { Index: any }
|
|
1722
|
+
| { Raw: any }
|
|
1723
|
+
| { Address32: any }
|
|
1724
|
+
| { Address20: any }
|
|
1725
|
+
| string
|
|
1726
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1727
|
+
[u32, Option<MultiAddress>, Option<MultiAddress>, Option<MultiAddress>]
|
|
1728
|
+
>;
|
|
1729
|
+
/**
|
|
1730
|
+
* Move an item from the sender account to another.
|
|
1731
|
+
*
|
|
1732
|
+
* Origin must be Signed and the signing account must be either:
|
|
1733
|
+
* - the Owner of the `item`;
|
|
1734
|
+
* - the approved delegate for the `item` (in this case, the approval is reset).
|
|
1735
|
+
*
|
|
1736
|
+
* Arguments:
|
|
1737
|
+
* - `collection`: The collection of the item to be transferred.
|
|
1738
|
+
* - `item`: The item to be transferred.
|
|
1739
|
+
* - `dest`: The account to receive ownership of the item.
|
|
1740
|
+
*
|
|
1741
|
+
* Emits `Transferred`.
|
|
1742
|
+
*
|
|
1743
|
+
* Weight: `O(1)`
|
|
1744
|
+
**/
|
|
1745
|
+
transfer: AugmentedSubmittable<
|
|
1746
|
+
(
|
|
1747
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1748
|
+
item: u32 | AnyNumber | Uint8Array,
|
|
1749
|
+
dest:
|
|
1750
|
+
| MultiAddress
|
|
1751
|
+
| { Id: any }
|
|
1752
|
+
| { Index: any }
|
|
1753
|
+
| { Raw: any }
|
|
1754
|
+
| { Address32: any }
|
|
1755
|
+
| { Address20: any }
|
|
1756
|
+
| string
|
|
1757
|
+
| Uint8Array
|
|
1758
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1759
|
+
[u32, u32, MultiAddress]
|
|
1760
|
+
>;
|
|
1761
|
+
/**
|
|
1762
|
+
* Change the Owner of a collection.
|
|
1763
|
+
*
|
|
1764
|
+
* Origin must be Signed and the sender should be the Owner of the `collection`.
|
|
1765
|
+
*
|
|
1766
|
+
* - `collection`: The collection whose owner should be changed.
|
|
1767
|
+
* - `owner`: The new Owner of this collection. They must have called
|
|
1768
|
+
* `set_accept_ownership` with `collection` in order for this operation to succeed.
|
|
1769
|
+
*
|
|
1770
|
+
* Emits `OwnerChanged`.
|
|
1771
|
+
*
|
|
1772
|
+
* Weight: `O(1)`
|
|
1773
|
+
**/
|
|
1774
|
+
transferOwnership: AugmentedSubmittable<
|
|
1775
|
+
(
|
|
1776
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1777
|
+
newOwner:
|
|
1778
|
+
| MultiAddress
|
|
1779
|
+
| { Id: any }
|
|
1780
|
+
| { Index: any }
|
|
1781
|
+
| { Raw: any }
|
|
1782
|
+
| { Address32: any }
|
|
1783
|
+
| { Address20: any }
|
|
1784
|
+
| string
|
|
1785
|
+
| Uint8Array
|
|
1786
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1787
|
+
[u32, MultiAddress]
|
|
1788
|
+
>;
|
|
1789
|
+
/**
|
|
1790
|
+
* Re-allow unprivileged transfer of an item.
|
|
1791
|
+
*
|
|
1792
|
+
* Origin must be Signed and the sender should be the Freezer of the `collection`.
|
|
1793
|
+
*
|
|
1794
|
+
* - `collection`: The collection of the item to be changed.
|
|
1795
|
+
* - `item`: The item to become transferable.
|
|
1796
|
+
*
|
|
1797
|
+
* Emits `ItemTransferUnlocked`.
|
|
1798
|
+
*
|
|
1799
|
+
* Weight: `O(1)`
|
|
1800
|
+
**/
|
|
1801
|
+
unlockItemTransfer: AugmentedSubmittable<
|
|
1802
|
+
(
|
|
1803
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1804
|
+
item: u32 | AnyNumber | Uint8Array
|
|
1805
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1806
|
+
[u32, u32]
|
|
1807
|
+
>;
|
|
1808
|
+
/**
|
|
1809
|
+
* Update mint settings.
|
|
1810
|
+
*
|
|
1811
|
+
* Origin must be either `ForceOrigin` or `Signed` and the sender should be the Issuer
|
|
1812
|
+
* of the `collection`.
|
|
1813
|
+
*
|
|
1814
|
+
* - `collection`: The identifier of the collection to change.
|
|
1815
|
+
* - `mint_settings`: The new mint settings.
|
|
1816
|
+
*
|
|
1817
|
+
* Emits `CollectionMintSettingsUpdated` event when successful.
|
|
1818
|
+
**/
|
|
1819
|
+
updateMintSettings: AugmentedSubmittable<
|
|
1820
|
+
(
|
|
1821
|
+
collection: u32 | AnyNumber | Uint8Array,
|
|
1822
|
+
mintSettings:
|
|
1823
|
+
| PalletNftsMintSettings
|
|
1824
|
+
| {
|
|
1825
|
+
mintType?: any;
|
|
1826
|
+
price?: any;
|
|
1827
|
+
startBlock?: any;
|
|
1828
|
+
endBlock?: any;
|
|
1829
|
+
defaultItemSettings?: any;
|
|
1830
|
+
}
|
|
1831
|
+
| string
|
|
1832
|
+
| Uint8Array
|
|
1833
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1834
|
+
[u32, PalletNftsMintSettings]
|
|
1835
|
+
>;
|
|
1836
|
+
/**
|
|
1837
|
+
* Generic tx
|
|
1838
|
+
**/
|
|
1839
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
1840
|
+
};
|
|
1841
|
+
parachainInfo: {
|
|
1842
|
+
/**
|
|
1843
|
+
* Generic tx
|
|
1844
|
+
**/
|
|
1845
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
1846
|
+
};
|
|
1847
|
+
parachainSystem: {
|
|
1848
|
+
/**
|
|
1849
|
+
* Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied
|
|
1850
|
+
* later.
|
|
1851
|
+
*
|
|
1852
|
+
* The `check_version` parameter sets a boolean flag for whether or not the runtime's spec
|
|
1853
|
+
* version and name should be verified on upgrade. Since the authorization only has a hash,
|
|
1854
|
+
* it cannot actually perform the verification.
|
|
1855
|
+
*
|
|
1856
|
+
* This call requires Root origin.
|
|
1857
|
+
**/
|
|
1858
|
+
authorizeUpgrade: AugmentedSubmittable<
|
|
1859
|
+
(
|
|
1860
|
+
codeHash: H256 | string | Uint8Array,
|
|
1861
|
+
checkVersion: bool | boolean | Uint8Array
|
|
1862
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1863
|
+
[H256, bool]
|
|
1864
|
+
>;
|
|
1865
|
+
/**
|
|
1866
|
+
* Provide the preimage (runtime binary) `code` for an upgrade that has been authorized.
|
|
1867
|
+
*
|
|
1868
|
+
* If the authorization required a version check, this call will ensure the spec name
|
|
1869
|
+
* remains unchanged and that the spec version has increased.
|
|
1870
|
+
*
|
|
1871
|
+
* Note that this function will not apply the new `code`, but only attempt to schedule the
|
|
1872
|
+
* upgrade with the Relay Chain.
|
|
1873
|
+
*
|
|
1874
|
+
* All origins are allowed.
|
|
1875
|
+
**/
|
|
1876
|
+
enactAuthorizedUpgrade: AugmentedSubmittable<
|
|
1877
|
+
(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
1878
|
+
[Bytes]
|
|
1879
|
+
>;
|
|
1880
|
+
/**
|
|
1881
|
+
* Set the current validation data.
|
|
1882
|
+
*
|
|
1883
|
+
* This should be invoked exactly once per block. It will panic at the finalization
|
|
1884
|
+
* phase if the call was not invoked.
|
|
1885
|
+
*
|
|
1886
|
+
* The dispatch origin for this call must be `Inherent`
|
|
1887
|
+
*
|
|
1888
|
+
* As a side effect, this function upgrades the current validation function
|
|
1889
|
+
* if the appropriate time has come.
|
|
1890
|
+
**/
|
|
1891
|
+
setValidationData: AugmentedSubmittable<
|
|
1892
|
+
(
|
|
1893
|
+
data:
|
|
1894
|
+
| CumulusPrimitivesParachainInherentParachainInherentData
|
|
1895
|
+
| {
|
|
1896
|
+
validationData?: any;
|
|
1897
|
+
relayChainState?: any;
|
|
1898
|
+
downwardMessages?: any;
|
|
1899
|
+
horizontalMessages?: any;
|
|
1900
|
+
}
|
|
1901
|
+
| string
|
|
1902
|
+
| Uint8Array
|
|
1903
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1904
|
+
[CumulusPrimitivesParachainInherentParachainInherentData]
|
|
1905
|
+
>;
|
|
1906
|
+
sudoSendUpwardMessage: AugmentedSubmittable<
|
|
1907
|
+
(message: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
1908
|
+
[Bytes]
|
|
1909
|
+
>;
|
|
1910
|
+
/**
|
|
1911
|
+
* Generic tx
|
|
1912
|
+
**/
|
|
1913
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
1914
|
+
};
|
|
1915
|
+
parameters: {
|
|
1916
|
+
/**
|
|
1917
|
+
* Set the value of a parameter.
|
|
1918
|
+
*
|
|
1919
|
+
* The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be
|
|
1920
|
+
* deleted by setting them to `None`.
|
|
1921
|
+
**/
|
|
1922
|
+
setParameter: AugmentedSubmittable<
|
|
1923
|
+
(
|
|
1924
|
+
keyValue:
|
|
1925
|
+
| StorageHubRuntimeConfigsRuntimeParamsRuntimeParameters
|
|
1926
|
+
| { RuntimeConfig: any }
|
|
1927
|
+
| string
|
|
1928
|
+
| Uint8Array
|
|
1929
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
1930
|
+
[StorageHubRuntimeConfigsRuntimeParamsRuntimeParameters]
|
|
1931
|
+
>;
|
|
1932
|
+
/**
|
|
1933
|
+
* Generic tx
|
|
1934
|
+
**/
|
|
1935
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
1936
|
+
};
|
|
1937
|
+
paymentStreams: {
|
|
1938
|
+
/**
|
|
1939
|
+
* Dispatchable extrinsic that allows Providers to charge a payment stream from a User.
|
|
1940
|
+
*
|
|
1941
|
+
* The dispatch origin for this call must be Signed.
|
|
1942
|
+
* The origin must be the Provider that has at least one type of payment stream with the User.
|
|
1943
|
+
*
|
|
1944
|
+
* Parameters:
|
|
1945
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
1946
|
+
*
|
|
1947
|
+
* This extrinsic will perform the following checks and logic:
|
|
1948
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
1949
|
+
* 2. Check that a payment stream between the signer (Provider) and the User exists
|
|
1950
|
+
* 3. If there is a fixed-rate payment stream:
|
|
1951
|
+
* 1. Get the rate of the payment stream
|
|
1952
|
+
* 2. Get the difference between the last charged tick number and the last chargeable tick number of the stream
|
|
1953
|
+
* 3. Calculate the amount to charge doing `rate * difference`
|
|
1954
|
+
* 4. Charge the user (if the user does not have enough funds, it gets flagged and a `UserWithoutFunds` event is emitted)
|
|
1955
|
+
* 5. Update the last charged tick number of the payment stream
|
|
1956
|
+
* 4. If there is a dynamic-rate payment stream:
|
|
1957
|
+
* 1. Get the amount provided by the Provider
|
|
1958
|
+
* 2. Get the difference between price index when the stream was last charged and the price index at the last chargeable tick
|
|
1959
|
+
* 3. Calculate the amount to charge doing `amount_provided * difference`
|
|
1960
|
+
* 4. Charge the user (if the user does not have enough funds, it gets flagged and a `UserWithoutFunds` event is emitted)
|
|
1961
|
+
* 5. Update the price index when the stream was last charged of the payment stream
|
|
1962
|
+
*
|
|
1963
|
+
* Emits a `PaymentStreamCharged` event when successful.
|
|
1964
|
+
*
|
|
1965
|
+
* Notes: a Provider could have both a fixed-rate and a dynamic-rate payment stream with a User. If that's the case, this extrinsic
|
|
1966
|
+
* will try to charge both and the amount charged will be the sum of the amounts charged for each payment stream.
|
|
1967
|
+
**/
|
|
1968
|
+
chargePaymentStreams: AugmentedSubmittable<
|
|
1969
|
+
(userAccount: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
1970
|
+
[AccountId32]
|
|
1971
|
+
>;
|
|
1972
|
+
/**
|
|
1973
|
+
* Dispatchable extrinsic that allows a user flagged as without funds long ago enough to clear this flag from its account,
|
|
1974
|
+
* allowing it to begin contracting and paying for services again. If there's any outstanding debt, it will be charged and cleared.
|
|
1975
|
+
*
|
|
1976
|
+
* The dispatch origin for this call must be Signed.
|
|
1977
|
+
* The origin must be the User that has been flagged as without funds.
|
|
1978
|
+
*
|
|
1979
|
+
* This extrinsic will perform the following checks and logic:
|
|
1980
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
1981
|
+
* 2. Check that the user has been flagged as without funds.
|
|
1982
|
+
* 3. Check that the cooldown period has passed since the user was flagged as without funds.
|
|
1983
|
+
* 4. Check if there's any outstanding debt and charge it. This is done by:
|
|
1984
|
+
* a. Releasing any remaining funds held as a deposit for each payment stream.
|
|
1985
|
+
* b. Getting all payment streams of the user and charging them, paying the Providers for the services.
|
|
1986
|
+
* c. Returning the User any remaining funds.
|
|
1987
|
+
* d. Deleting all payment streams of the user.
|
|
1988
|
+
* 5. Unflag the user as without funds.
|
|
1989
|
+
*
|
|
1990
|
+
* Emits a 'UserSolvent' event when successful.
|
|
1991
|
+
*
|
|
1992
|
+
* Notes: this extrinsic iterates over all remaining payment streams of the user and charges them, so it can be expensive in terms of weight.
|
|
1993
|
+
* The fee to execute it should be high enough to compensate for the weight of the extrinsic, without being too high that the user
|
|
1994
|
+
* finds more convenient to wait for Providers to get its deposits one by one instead.
|
|
1995
|
+
**/
|
|
1996
|
+
clearInsolventFlag: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
1997
|
+
/**
|
|
1998
|
+
* Dispatchable extrinsic that allows root to add a dynamic-rate payment stream from a User to a Provider.
|
|
1999
|
+
*
|
|
2000
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
2001
|
+
* this extrinsic is for manual testing).
|
|
2002
|
+
*
|
|
2003
|
+
* Parameters:
|
|
2004
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
2005
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
2006
|
+
* - `amount_provided`: The initial amount provided by the Provider.
|
|
2007
|
+
*
|
|
2008
|
+
* This extrinsic will perform the following checks and logic:
|
|
2009
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
2010
|
+
* 2. Check that the payment stream does not already exist
|
|
2011
|
+
* 3. Check that the User has enough funds to pay the deposit
|
|
2012
|
+
* 4. Hold the deposit from the User
|
|
2013
|
+
* 5. Update the Payment Streams storage to add the new payment stream
|
|
2014
|
+
*
|
|
2015
|
+
* Emits `DynamicRatePaymentStreamCreated` event when successful.
|
|
2016
|
+
**/
|
|
2017
|
+
createDynamicRatePaymentStream: AugmentedSubmittable<
|
|
2018
|
+
(
|
|
2019
|
+
providerId: H256 | string | Uint8Array,
|
|
2020
|
+
userAccount: AccountId32 | string | Uint8Array,
|
|
2021
|
+
amountProvided: u64 | AnyNumber | Uint8Array
|
|
2022
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2023
|
+
[H256, AccountId32, u64]
|
|
2024
|
+
>;
|
|
2025
|
+
/**
|
|
2026
|
+
* Dispatchable extrinsic that allows root to add a fixed-rate payment stream from a User to a Provider.
|
|
2027
|
+
*
|
|
2028
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
2029
|
+
* this extrinsic is for manual testing).
|
|
2030
|
+
*
|
|
2031
|
+
* Parameters:
|
|
2032
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
2033
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
2034
|
+
* - `rate`: The initial rate of the payment stream.
|
|
2035
|
+
*
|
|
2036
|
+
* This extrinsic will perform the following checks and logic:
|
|
2037
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
2038
|
+
* 2. Check that the payment stream does not already exist
|
|
2039
|
+
* 3. Check that the User has enough funds to pay the deposit
|
|
2040
|
+
* 4. Hold the deposit from the User
|
|
2041
|
+
* 5. Update the Payment Streams storage to add the new payment stream
|
|
2042
|
+
*
|
|
2043
|
+
* Emits `FixedRatePaymentStreamCreated` event when successful.
|
|
2044
|
+
**/
|
|
2045
|
+
createFixedRatePaymentStream: AugmentedSubmittable<
|
|
2046
|
+
(
|
|
2047
|
+
providerId: H256 | string | Uint8Array,
|
|
2048
|
+
userAccount: AccountId32 | string | Uint8Array,
|
|
2049
|
+
rate: u128 | AnyNumber | Uint8Array
|
|
2050
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2051
|
+
[H256, AccountId32, u128]
|
|
2052
|
+
>;
|
|
2053
|
+
/**
|
|
2054
|
+
* Dispatchable extrinsic that allows root to delete an existing dynamic-rate payment stream between a User and a Provider.
|
|
2055
|
+
*
|
|
2056
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
2057
|
+
* this extrinsic is for manual testing).
|
|
2058
|
+
*
|
|
2059
|
+
* Parameters:
|
|
2060
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
2061
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
2062
|
+
*
|
|
2063
|
+
* This extrinsic will perform the following checks and logic:
|
|
2064
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
2065
|
+
* 2. Check that the payment stream exists
|
|
2066
|
+
* 3. Update the Payment Streams storage to remove the payment stream
|
|
2067
|
+
*
|
|
2068
|
+
* Emits `DynamicRatePaymentStreamDeleted` event when successful.
|
|
2069
|
+
**/
|
|
2070
|
+
deleteDynamicRatePaymentStream: AugmentedSubmittable<
|
|
2071
|
+
(
|
|
2072
|
+
providerId: H256 | string | Uint8Array,
|
|
2073
|
+
userAccount: AccountId32 | string | Uint8Array
|
|
2074
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2075
|
+
[H256, AccountId32]
|
|
2076
|
+
>;
|
|
2077
|
+
/**
|
|
2078
|
+
* Dispatchable extrinsic that allows root to delete an existing fixed-rate payment stream between a User and a Provider.
|
|
2079
|
+
*
|
|
2080
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
2081
|
+
* this extrinsic is for manual testing).
|
|
2082
|
+
*
|
|
2083
|
+
* Parameters:
|
|
2084
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
2085
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
2086
|
+
*
|
|
2087
|
+
* This extrinsic will perform the following checks and logic:
|
|
2088
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
2089
|
+
* 2. Check that the payment stream exists
|
|
2090
|
+
* 3. Update the Payment Streams storage to remove the payment stream
|
|
2091
|
+
*
|
|
2092
|
+
* Emits `FixedRatePaymentStreamDeleted` event when successful.
|
|
2093
|
+
**/
|
|
2094
|
+
deleteFixedRatePaymentStream: AugmentedSubmittable<
|
|
2095
|
+
(
|
|
2096
|
+
providerId: H256 | string | Uint8Array,
|
|
2097
|
+
userAccount: AccountId32 | string | Uint8Array
|
|
2098
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2099
|
+
[H256, AccountId32]
|
|
2100
|
+
>;
|
|
2101
|
+
/**
|
|
2102
|
+
* Dispatchable extrinsic that allows a user flagged as without funds to pay all remaining payment streams to be able to recover
|
|
2103
|
+
* its deposits.
|
|
2104
|
+
*
|
|
2105
|
+
* The dispatch origin for this call must be Signed.
|
|
2106
|
+
* The origin must be the User that has been flagged as without funds.
|
|
2107
|
+
*
|
|
2108
|
+
* This extrinsic will perform the following checks and logic:
|
|
2109
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
2110
|
+
* 2. Check that the user has been flagged as without funds.
|
|
2111
|
+
* 3. Release the user's funds that were held as a deposit for each payment stream.
|
|
2112
|
+
* 4. Get all payment streams of the user and charge them, paying the Providers for the services.
|
|
2113
|
+
* 5. Delete all payment streams of the user.
|
|
2114
|
+
*
|
|
2115
|
+
* Emits a 'UserPaidDebts' event when successful.
|
|
2116
|
+
*
|
|
2117
|
+
* Notes: this extrinsic iterates over all payment streams of the user and charges them, so it can be expensive in terms of weight.
|
|
2118
|
+
* The fee to execute it should be high enough to compensate for the weight of the extrinsic, without being too high that the user
|
|
2119
|
+
* finds more convenient to wait for Providers to get its deposits one by one instead.
|
|
2120
|
+
**/
|
|
2121
|
+
payOutstandingDebt: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
2122
|
+
/**
|
|
2123
|
+
* Dispatchable extrinsic that allows root to update an existing dynamic-rate payment stream between a User and a Provider.
|
|
2124
|
+
*
|
|
2125
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
2126
|
+
* this extrinsic is for manual testing).
|
|
2127
|
+
*
|
|
2128
|
+
* Parameters:
|
|
2129
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
2130
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
2131
|
+
* - `new_amount_provided`: The new amount provided by the Provider.
|
|
2132
|
+
*
|
|
2133
|
+
* This extrinsic will perform the following checks and logic:
|
|
2134
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
2135
|
+
* 2. Check that the payment stream exists
|
|
2136
|
+
* 3. Update the Payment Streams storage to update the payment stream
|
|
2137
|
+
*
|
|
2138
|
+
* Emits `DynamicRatePaymentStreamUpdated` event when successful.
|
|
2139
|
+
**/
|
|
2140
|
+
updateDynamicRatePaymentStream: AugmentedSubmittable<
|
|
2141
|
+
(
|
|
2142
|
+
providerId: H256 | string | Uint8Array,
|
|
2143
|
+
userAccount: AccountId32 | string | Uint8Array,
|
|
2144
|
+
newAmountProvided: u64 | AnyNumber | Uint8Array
|
|
2145
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2146
|
+
[H256, AccountId32, u64]
|
|
2147
|
+
>;
|
|
2148
|
+
/**
|
|
2149
|
+
* Dispatchable extrinsic that allows root to update an existing fixed-rate payment stream between a User and a Provider.
|
|
2150
|
+
*
|
|
2151
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
2152
|
+
* this extrinsic is for manual testing).
|
|
2153
|
+
*
|
|
2154
|
+
* Parameters:
|
|
2155
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
2156
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
2157
|
+
* - `new_rate`: The new rate of the payment stream.
|
|
2158
|
+
*
|
|
2159
|
+
* This extrinsic will perform the following checks and logic:
|
|
2160
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
2161
|
+
* 2. Check that the payment stream exists
|
|
2162
|
+
* 3. Update the Payment Streams storage to update the payment stream
|
|
2163
|
+
*
|
|
2164
|
+
* Emits `FixedRatePaymentStreamUpdated` event when successful.
|
|
2165
|
+
**/
|
|
2166
|
+
updateFixedRatePaymentStream: AugmentedSubmittable<
|
|
2167
|
+
(
|
|
2168
|
+
providerId: H256 | string | Uint8Array,
|
|
2169
|
+
userAccount: AccountId32 | string | Uint8Array,
|
|
2170
|
+
newRate: u128 | AnyNumber | Uint8Array
|
|
2171
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2172
|
+
[H256, AccountId32, u128]
|
|
2173
|
+
>;
|
|
2174
|
+
/**
|
|
2175
|
+
* Generic tx
|
|
2176
|
+
**/
|
|
2177
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
2178
|
+
};
|
|
2179
|
+
polkadotXcm: {
|
|
2180
|
+
/**
|
|
2181
|
+
* Claims assets trapped on this pallet because of leftover assets during XCM execution.
|
|
2182
|
+
*
|
|
2183
|
+
* - `origin`: Anyone can call this extrinsic.
|
|
2184
|
+
* - `assets`: The exact assets that were trapped. Use the version to specify what version
|
|
2185
|
+
* was the latest when they were trapped.
|
|
2186
|
+
* - `beneficiary`: The location/account where the claimed assets will be deposited.
|
|
2187
|
+
**/
|
|
2188
|
+
claimAssets: AugmentedSubmittable<
|
|
2189
|
+
(
|
|
2190
|
+
assets:
|
|
2191
|
+
| XcmVersionedAssets
|
|
2192
|
+
| { V2: any }
|
|
2193
|
+
| { V3: any }
|
|
2194
|
+
| { V4: any }
|
|
2195
|
+
| string
|
|
2196
|
+
| Uint8Array,
|
|
2197
|
+
beneficiary:
|
|
2198
|
+
| XcmVersionedLocation
|
|
2199
|
+
| { V2: any }
|
|
2200
|
+
| { V3: any }
|
|
2201
|
+
| { V4: any }
|
|
2202
|
+
| string
|
|
2203
|
+
| Uint8Array
|
|
2204
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2205
|
+
[XcmVersionedAssets, XcmVersionedLocation]
|
|
2206
|
+
>;
|
|
2207
|
+
/**
|
|
2208
|
+
* Execute an XCM message from a local, signed, origin.
|
|
2209
|
+
*
|
|
2210
|
+
* An event is deposited indicating whether `msg` could be executed completely or only
|
|
2211
|
+
* partially.
|
|
2212
|
+
*
|
|
2213
|
+
* No more than `max_weight` will be used in its attempted execution. If this is less than
|
|
2214
|
+
* the maximum amount of weight that the message could take to be executed, then no
|
|
2215
|
+
* execution attempt will be made.
|
|
2216
|
+
**/
|
|
2217
|
+
execute: AugmentedSubmittable<
|
|
2218
|
+
(
|
|
2219
|
+
message: XcmVersionedXcm | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array,
|
|
2220
|
+
maxWeight:
|
|
2221
|
+
| SpWeightsWeightV2Weight
|
|
2222
|
+
| { refTime?: any; proofSize?: any }
|
|
2223
|
+
| string
|
|
2224
|
+
| Uint8Array
|
|
2225
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2226
|
+
[XcmVersionedXcm, SpWeightsWeightV2Weight]
|
|
2227
|
+
>;
|
|
2228
|
+
/**
|
|
2229
|
+
* Set a safe XCM version (the version that XCM should be encoded with if the most recent
|
|
2230
|
+
* version a destination can accept is unknown).
|
|
2231
|
+
*
|
|
2232
|
+
* - `origin`: Must be an origin specified by AdminOrigin.
|
|
2233
|
+
* - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable.
|
|
2234
|
+
**/
|
|
2235
|
+
forceDefaultXcmVersion: AugmentedSubmittable<
|
|
2236
|
+
(
|
|
2237
|
+
maybeXcmVersion: Option<u32> | null | Uint8Array | u32 | AnyNumber
|
|
2238
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2239
|
+
[Option<u32>]
|
|
2240
|
+
>;
|
|
2241
|
+
/**
|
|
2242
|
+
* Ask a location to notify us regarding their XCM version and any changes to it.
|
|
2243
|
+
*
|
|
2244
|
+
* - `origin`: Must be an origin specified by AdminOrigin.
|
|
2245
|
+
* - `location`: The location to which we should subscribe for XCM version notifications.
|
|
2246
|
+
**/
|
|
2247
|
+
forceSubscribeVersionNotify: AugmentedSubmittable<
|
|
2248
|
+
(
|
|
2249
|
+
location:
|
|
2250
|
+
| XcmVersionedLocation
|
|
2251
|
+
| { V2: any }
|
|
2252
|
+
| { V3: any }
|
|
2253
|
+
| { V4: any }
|
|
2254
|
+
| string
|
|
2255
|
+
| Uint8Array
|
|
2256
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2257
|
+
[XcmVersionedLocation]
|
|
2258
|
+
>;
|
|
2259
|
+
/**
|
|
2260
|
+
* Set or unset the global suspension state of the XCM executor.
|
|
2261
|
+
*
|
|
2262
|
+
* - `origin`: Must be an origin specified by AdminOrigin.
|
|
2263
|
+
* - `suspended`: `true` to suspend, `false` to resume.
|
|
2264
|
+
**/
|
|
2265
|
+
forceSuspension: AugmentedSubmittable<
|
|
2266
|
+
(suspended: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
2267
|
+
[bool]
|
|
2268
|
+
>;
|
|
2269
|
+
/**
|
|
2270
|
+
* Require that a particular destination should no longer notify us regarding any XCM
|
|
2271
|
+
* version changes.
|
|
2272
|
+
*
|
|
2273
|
+
* - `origin`: Must be an origin specified by AdminOrigin.
|
|
2274
|
+
* - `location`: The location to which we are currently subscribed for XCM version
|
|
2275
|
+
* notifications which we no longer desire.
|
|
2276
|
+
**/
|
|
2277
|
+
forceUnsubscribeVersionNotify: AugmentedSubmittable<
|
|
2278
|
+
(
|
|
2279
|
+
location:
|
|
2280
|
+
| XcmVersionedLocation
|
|
2281
|
+
| { V2: any }
|
|
2282
|
+
| { V3: any }
|
|
2283
|
+
| { V4: any }
|
|
2284
|
+
| string
|
|
2285
|
+
| Uint8Array
|
|
2286
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2287
|
+
[XcmVersionedLocation]
|
|
2288
|
+
>;
|
|
2289
|
+
/**
|
|
2290
|
+
* Extoll that a particular destination can be communicated with through a particular
|
|
2291
|
+
* version of XCM.
|
|
2292
|
+
*
|
|
2293
|
+
* - `origin`: Must be an origin specified by AdminOrigin.
|
|
2294
|
+
* - `location`: The destination that is being described.
|
|
2295
|
+
* - `xcm_version`: The latest version of XCM that `location` supports.
|
|
2296
|
+
**/
|
|
2297
|
+
forceXcmVersion: AugmentedSubmittable<
|
|
2298
|
+
(
|
|
2299
|
+
location: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array,
|
|
2300
|
+
version: u32 | AnyNumber | Uint8Array
|
|
2301
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2302
|
+
[StagingXcmV4Location, u32]
|
|
2303
|
+
>;
|
|
2304
|
+
/**
|
|
2305
|
+
* Transfer some assets from the local chain to the destination chain through their local,
|
|
2306
|
+
* destination or remote reserve.
|
|
2307
|
+
*
|
|
2308
|
+
* `assets` must have same reserve location and may not be teleportable to `dest`.
|
|
2309
|
+
* - `assets` have local reserve: transfer assets to sovereign account of destination
|
|
2310
|
+
* chain and forward a notification XCM to `dest` to mint and deposit reserve-based
|
|
2311
|
+
* assets to `beneficiary`.
|
|
2312
|
+
* - `assets` have destination reserve: burn local assets and forward a notification to
|
|
2313
|
+
* `dest` chain to withdraw the reserve assets from this chain's sovereign account and
|
|
2314
|
+
* deposit them to `beneficiary`.
|
|
2315
|
+
* - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move
|
|
2316
|
+
* reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest`
|
|
2317
|
+
* to mint and deposit reserve-based assets to `beneficiary`.
|
|
2318
|
+
*
|
|
2319
|
+
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
|
2320
|
+
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
|
2321
|
+
* is needed than `weight_limit`, then the operation will fail and the sent assets may be
|
|
2322
|
+
* at risk.
|
|
2323
|
+
*
|
|
2324
|
+
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
2325
|
+
* - `dest`: Destination context for the assets. Will typically be `[Parent,
|
|
2326
|
+
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
|
|
2327
|
+
* relay to parachain.
|
|
2328
|
+
* - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will
|
|
2329
|
+
* generally be an `AccountId32` value.
|
|
2330
|
+
* - `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
2331
|
+
* fee on the `dest` (and possibly reserve) chains.
|
|
2332
|
+
* - `fee_asset_item`: The index into `assets` of the item which should be used to pay
|
|
2333
|
+
* fees.
|
|
2334
|
+
* - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
|
|
2335
|
+
**/
|
|
2336
|
+
limitedReserveTransferAssets: AugmentedSubmittable<
|
|
2337
|
+
(
|
|
2338
|
+
dest:
|
|
2339
|
+
| XcmVersionedLocation
|
|
2340
|
+
| { V2: any }
|
|
2341
|
+
| { V3: any }
|
|
2342
|
+
| { V4: any }
|
|
2343
|
+
| string
|
|
2344
|
+
| Uint8Array,
|
|
2345
|
+
beneficiary:
|
|
2346
|
+
| XcmVersionedLocation
|
|
2347
|
+
| { V2: any }
|
|
2348
|
+
| { V3: any }
|
|
2349
|
+
| { V4: any }
|
|
2350
|
+
| string
|
|
2351
|
+
| Uint8Array,
|
|
2352
|
+
assets:
|
|
2353
|
+
| XcmVersionedAssets
|
|
2354
|
+
| { V2: any }
|
|
2355
|
+
| { V3: any }
|
|
2356
|
+
| { V4: any }
|
|
2357
|
+
| string
|
|
2358
|
+
| Uint8Array,
|
|
2359
|
+
feeAssetItem: u32 | AnyNumber | Uint8Array,
|
|
2360
|
+
weightLimit:
|
|
2361
|
+
| XcmV3WeightLimit
|
|
2362
|
+
| { Unlimited: any }
|
|
2363
|
+
| { Limited: any }
|
|
2364
|
+
| string
|
|
2365
|
+
| Uint8Array
|
|
2366
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2367
|
+
[XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32, XcmV3WeightLimit]
|
|
2368
|
+
>;
|
|
2369
|
+
/**
|
|
2370
|
+
* Teleport some assets from the local chain to some destination chain.
|
|
2371
|
+
*
|
|
2372
|
+
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
|
2373
|
+
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
|
2374
|
+
* is needed than `weight_limit`, then the operation will fail and the sent assets may be
|
|
2375
|
+
* at risk.
|
|
2376
|
+
*
|
|
2377
|
+
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
2378
|
+
* - `dest`: Destination context for the assets. Will typically be `[Parent,
|
|
2379
|
+
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
|
|
2380
|
+
* relay to parachain.
|
|
2381
|
+
* - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will
|
|
2382
|
+
* generally be an `AccountId32` value.
|
|
2383
|
+
* - `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
2384
|
+
* fee on the `dest` chain.
|
|
2385
|
+
* - `fee_asset_item`: The index into `assets` of the item which should be used to pay
|
|
2386
|
+
* fees.
|
|
2387
|
+
* - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
|
|
2388
|
+
**/
|
|
2389
|
+
limitedTeleportAssets: AugmentedSubmittable<
|
|
2390
|
+
(
|
|
2391
|
+
dest:
|
|
2392
|
+
| XcmVersionedLocation
|
|
2393
|
+
| { V2: any }
|
|
2394
|
+
| { V3: any }
|
|
2395
|
+
| { V4: any }
|
|
2396
|
+
| string
|
|
2397
|
+
| Uint8Array,
|
|
2398
|
+
beneficiary:
|
|
2399
|
+
| XcmVersionedLocation
|
|
2400
|
+
| { V2: any }
|
|
2401
|
+
| { V3: any }
|
|
2402
|
+
| { V4: any }
|
|
2403
|
+
| string
|
|
2404
|
+
| Uint8Array,
|
|
2405
|
+
assets:
|
|
2406
|
+
| XcmVersionedAssets
|
|
2407
|
+
| { V2: any }
|
|
2408
|
+
| { V3: any }
|
|
2409
|
+
| { V4: any }
|
|
2410
|
+
| string
|
|
2411
|
+
| Uint8Array,
|
|
2412
|
+
feeAssetItem: u32 | AnyNumber | Uint8Array,
|
|
2413
|
+
weightLimit:
|
|
2414
|
+
| XcmV3WeightLimit
|
|
2415
|
+
| { Unlimited: any }
|
|
2416
|
+
| { Limited: any }
|
|
2417
|
+
| string
|
|
2418
|
+
| Uint8Array
|
|
2419
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2420
|
+
[XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32, XcmV3WeightLimit]
|
|
2421
|
+
>;
|
|
2422
|
+
/**
|
|
2423
|
+
* Transfer some assets from the local chain to the destination chain through their local,
|
|
2424
|
+
* destination or remote reserve.
|
|
2425
|
+
*
|
|
2426
|
+
* `assets` must have same reserve location and may not be teleportable to `dest`.
|
|
2427
|
+
* - `assets` have local reserve: transfer assets to sovereign account of destination
|
|
2428
|
+
* chain and forward a notification XCM to `dest` to mint and deposit reserve-based
|
|
2429
|
+
* assets to `beneficiary`.
|
|
2430
|
+
* - `assets` have destination reserve: burn local assets and forward a notification to
|
|
2431
|
+
* `dest` chain to withdraw the reserve assets from this chain's sovereign account and
|
|
2432
|
+
* deposit them to `beneficiary`.
|
|
2433
|
+
* - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move
|
|
2434
|
+
* reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest`
|
|
2435
|
+
* to mint and deposit reserve-based assets to `beneficiary`.
|
|
2436
|
+
*
|
|
2437
|
+
* **This function is deprecated: Use `limited_reserve_transfer_assets` instead.**
|
|
2438
|
+
*
|
|
2439
|
+
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
|
2440
|
+
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
|
2441
|
+
* with all fees taken as needed from the asset.
|
|
2442
|
+
*
|
|
2443
|
+
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
2444
|
+
* - `dest`: Destination context for the assets. Will typically be `[Parent,
|
|
2445
|
+
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
|
|
2446
|
+
* relay to parachain.
|
|
2447
|
+
* - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will
|
|
2448
|
+
* generally be an `AccountId32` value.
|
|
2449
|
+
* - `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
2450
|
+
* fee on the `dest` (and possibly reserve) chains.
|
|
2451
|
+
* - `fee_asset_item`: The index into `assets` of the item which should be used to pay
|
|
2452
|
+
* fees.
|
|
2453
|
+
**/
|
|
2454
|
+
reserveTransferAssets: AugmentedSubmittable<
|
|
2455
|
+
(
|
|
2456
|
+
dest:
|
|
2457
|
+
| XcmVersionedLocation
|
|
2458
|
+
| { V2: any }
|
|
2459
|
+
| { V3: any }
|
|
2460
|
+
| { V4: any }
|
|
2461
|
+
| string
|
|
2462
|
+
| Uint8Array,
|
|
2463
|
+
beneficiary:
|
|
2464
|
+
| XcmVersionedLocation
|
|
2465
|
+
| { V2: any }
|
|
2466
|
+
| { V3: any }
|
|
2467
|
+
| { V4: any }
|
|
2468
|
+
| string
|
|
2469
|
+
| Uint8Array,
|
|
2470
|
+
assets:
|
|
2471
|
+
| XcmVersionedAssets
|
|
2472
|
+
| { V2: any }
|
|
2473
|
+
| { V3: any }
|
|
2474
|
+
| { V4: any }
|
|
2475
|
+
| string
|
|
2476
|
+
| Uint8Array,
|
|
2477
|
+
feeAssetItem: u32 | AnyNumber | Uint8Array
|
|
2478
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2479
|
+
[XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32]
|
|
2480
|
+
>;
|
|
2481
|
+
send: AugmentedSubmittable<
|
|
2482
|
+
(
|
|
2483
|
+
dest:
|
|
2484
|
+
| XcmVersionedLocation
|
|
2485
|
+
| { V2: any }
|
|
2486
|
+
| { V3: any }
|
|
2487
|
+
| { V4: any }
|
|
2488
|
+
| string
|
|
2489
|
+
| Uint8Array,
|
|
2490
|
+
message: XcmVersionedXcm | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array
|
|
2491
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2492
|
+
[XcmVersionedLocation, XcmVersionedXcm]
|
|
2493
|
+
>;
|
|
2494
|
+
/**
|
|
2495
|
+
* Teleport some assets from the local chain to some destination chain.
|
|
2496
|
+
*
|
|
2497
|
+
* **This function is deprecated: Use `limited_teleport_assets` instead.**
|
|
2498
|
+
*
|
|
2499
|
+
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
|
2500
|
+
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
|
2501
|
+
* with all fees taken as needed from the asset.
|
|
2502
|
+
*
|
|
2503
|
+
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
2504
|
+
* - `dest`: Destination context for the assets. Will typically be `[Parent,
|
|
2505
|
+
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
|
|
2506
|
+
* relay to parachain.
|
|
2507
|
+
* - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will
|
|
2508
|
+
* generally be an `AccountId32` value.
|
|
2509
|
+
* - `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
2510
|
+
* fee on the `dest` chain.
|
|
2511
|
+
* - `fee_asset_item`: The index into `assets` of the item which should be used to pay
|
|
2512
|
+
* fees.
|
|
2513
|
+
**/
|
|
2514
|
+
teleportAssets: AugmentedSubmittable<
|
|
2515
|
+
(
|
|
2516
|
+
dest:
|
|
2517
|
+
| XcmVersionedLocation
|
|
2518
|
+
| { V2: any }
|
|
2519
|
+
| { V3: any }
|
|
2520
|
+
| { V4: any }
|
|
2521
|
+
| string
|
|
2522
|
+
| Uint8Array,
|
|
2523
|
+
beneficiary:
|
|
2524
|
+
| XcmVersionedLocation
|
|
2525
|
+
| { V2: any }
|
|
2526
|
+
| { V3: any }
|
|
2527
|
+
| { V4: any }
|
|
2528
|
+
| string
|
|
2529
|
+
| Uint8Array,
|
|
2530
|
+
assets:
|
|
2531
|
+
| XcmVersionedAssets
|
|
2532
|
+
| { V2: any }
|
|
2533
|
+
| { V3: any }
|
|
2534
|
+
| { V4: any }
|
|
2535
|
+
| string
|
|
2536
|
+
| Uint8Array,
|
|
2537
|
+
feeAssetItem: u32 | AnyNumber | Uint8Array
|
|
2538
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2539
|
+
[XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32]
|
|
2540
|
+
>;
|
|
2541
|
+
/**
|
|
2542
|
+
* Transfer some assets from the local chain to the destination chain through their local,
|
|
2543
|
+
* destination or remote reserve, or through teleports.
|
|
2544
|
+
*
|
|
2545
|
+
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
|
2546
|
+
* index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for
|
|
2547
|
+
* `weight_limit` of weight. If more weight is needed than `weight_limit`, then the
|
|
2548
|
+
* operation will fail and the sent assets may be at risk.
|
|
2549
|
+
*
|
|
2550
|
+
* `assets` (excluding `fees`) must have same reserve location or otherwise be teleportable
|
|
2551
|
+
* to `dest`, no limitations imposed on `fees`.
|
|
2552
|
+
* - for local reserve: transfer assets to sovereign account of destination chain and
|
|
2553
|
+
* forward a notification XCM to `dest` to mint and deposit reserve-based assets to
|
|
2554
|
+
* `beneficiary`.
|
|
2555
|
+
* - for destination reserve: burn local assets and forward a notification to `dest` chain
|
|
2556
|
+
* to withdraw the reserve assets from this chain's sovereign account and deposit them
|
|
2557
|
+
* to `beneficiary`.
|
|
2558
|
+
* - for remote reserve: burn local assets, forward XCM to reserve chain to move reserves
|
|
2559
|
+
* from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint
|
|
2560
|
+
* and deposit reserve-based assets to `beneficiary`.
|
|
2561
|
+
* - for teleports: burn local assets and forward XCM to `dest` chain to mint/teleport
|
|
2562
|
+
* assets and deposit them to `beneficiary`.
|
|
2563
|
+
*
|
|
2564
|
+
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
2565
|
+
* - `dest`: Destination context for the assets. Will typically be `X2(Parent,
|
|
2566
|
+
* Parachain(..))` to send from parachain to parachain, or `X1(Parachain(..))` to send
|
|
2567
|
+
* from relay to parachain.
|
|
2568
|
+
* - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will
|
|
2569
|
+
* generally be an `AccountId32` value.
|
|
2570
|
+
* - `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
2571
|
+
* fee on the `dest` (and possibly reserve) chains.
|
|
2572
|
+
* - `fee_asset_item`: The index into `assets` of the item which should be used to pay
|
|
2573
|
+
* fees.
|
|
2574
|
+
* - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
|
|
2575
|
+
**/
|
|
2576
|
+
transferAssets: AugmentedSubmittable<
|
|
2577
|
+
(
|
|
2578
|
+
dest:
|
|
2579
|
+
| XcmVersionedLocation
|
|
2580
|
+
| { V2: any }
|
|
2581
|
+
| { V3: any }
|
|
2582
|
+
| { V4: any }
|
|
2583
|
+
| string
|
|
2584
|
+
| Uint8Array,
|
|
2585
|
+
beneficiary:
|
|
2586
|
+
| XcmVersionedLocation
|
|
2587
|
+
| { V2: any }
|
|
2588
|
+
| { V3: any }
|
|
2589
|
+
| { V4: any }
|
|
2590
|
+
| string
|
|
2591
|
+
| Uint8Array,
|
|
2592
|
+
assets:
|
|
2593
|
+
| XcmVersionedAssets
|
|
2594
|
+
| { V2: any }
|
|
2595
|
+
| { V3: any }
|
|
2596
|
+
| { V4: any }
|
|
2597
|
+
| string
|
|
2598
|
+
| Uint8Array,
|
|
2599
|
+
feeAssetItem: u32 | AnyNumber | Uint8Array,
|
|
2600
|
+
weightLimit:
|
|
2601
|
+
| XcmV3WeightLimit
|
|
2602
|
+
| { Unlimited: any }
|
|
2603
|
+
| { Limited: any }
|
|
2604
|
+
| string
|
|
2605
|
+
| Uint8Array
|
|
2606
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2607
|
+
[XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32, XcmV3WeightLimit]
|
|
2608
|
+
>;
|
|
2609
|
+
/**
|
|
2610
|
+
* Transfer assets from the local chain to the destination chain using explicit transfer
|
|
2611
|
+
* types for assets and fees.
|
|
2612
|
+
*
|
|
2613
|
+
* `assets` must have same reserve location or may be teleportable to `dest`. Caller must
|
|
2614
|
+
* provide the `assets_transfer_type` to be used for `assets`:
|
|
2615
|
+
* - `TransferType::LocalReserve`: transfer assets to sovereign account of destination
|
|
2616
|
+
* chain and forward a notification XCM to `dest` to mint and deposit reserve-based
|
|
2617
|
+
* assets to `beneficiary`.
|
|
2618
|
+
* - `TransferType::DestinationReserve`: burn local assets and forward a notification to
|
|
2619
|
+
* `dest` chain to withdraw the reserve assets from this chain's sovereign account and
|
|
2620
|
+
* deposit them to `beneficiary`.
|
|
2621
|
+
* - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve`
|
|
2622
|
+
* chain to move reserves from this chain's SA to `dest` chain's SA, and forward another
|
|
2623
|
+
* XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically
|
|
2624
|
+
* the remote `reserve` is Asset Hub.
|
|
2625
|
+
* - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to
|
|
2626
|
+
* mint/teleport assets and deposit them to `beneficiary`.
|
|
2627
|
+
*
|
|
2628
|
+
* On the destination chain, as well as any intermediary hops, `BuyExecution` is used to
|
|
2629
|
+
* buy execution using transferred `assets` identified by `remote_fees_id`.
|
|
2630
|
+
* Make sure enough of the specified `remote_fees_id` asset is included in the given list
|
|
2631
|
+
* of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight
|
|
2632
|
+
* is needed than `weight_limit`, then the operation will fail and the sent assets may be
|
|
2633
|
+
* at risk.
|
|
2634
|
+
*
|
|
2635
|
+
* `remote_fees_id` may use different transfer type than rest of `assets` and can be
|
|
2636
|
+
* specified through `fees_transfer_type`.
|
|
2637
|
+
*
|
|
2638
|
+
* The caller needs to specify what should happen to the transferred assets once they reach
|
|
2639
|
+
* the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which
|
|
2640
|
+
* contains the instructions to execute on `dest` as a final step.
|
|
2641
|
+
* This is usually as simple as:
|
|
2642
|
+
* `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`,
|
|
2643
|
+
* but could be something more exotic like sending the `assets` even further.
|
|
2644
|
+
*
|
|
2645
|
+
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
|
2646
|
+
* - `dest`: Destination context for the assets. Will typically be `[Parent,
|
|
2647
|
+
* Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
|
|
2648
|
+
* relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from
|
|
2649
|
+
* parachain across a bridge to another ecosystem destination.
|
|
2650
|
+
* - `assets`: The assets to be withdrawn. This should include the assets used to pay the
|
|
2651
|
+
* fee on the `dest` (and possibly reserve) chains.
|
|
2652
|
+
* - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`.
|
|
2653
|
+
* - `remote_fees_id`: One of the included `assets` to be used to pay fees.
|
|
2654
|
+
* - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets.
|
|
2655
|
+
* - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the
|
|
2656
|
+
* transfer, which also determines what happens to the assets on the destination chain.
|
|
2657
|
+
* - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
|
|
2658
|
+
**/
|
|
2659
|
+
transferAssetsUsingTypeAndThen: AugmentedSubmittable<
|
|
2660
|
+
(
|
|
2661
|
+
dest:
|
|
2662
|
+
| XcmVersionedLocation
|
|
2663
|
+
| { V2: any }
|
|
2664
|
+
| { V3: any }
|
|
2665
|
+
| { V4: any }
|
|
2666
|
+
| string
|
|
2667
|
+
| Uint8Array,
|
|
2668
|
+
assets:
|
|
2669
|
+
| XcmVersionedAssets
|
|
2670
|
+
| { V2: any }
|
|
2671
|
+
| { V3: any }
|
|
2672
|
+
| { V4: any }
|
|
2673
|
+
| string
|
|
2674
|
+
| Uint8Array,
|
|
2675
|
+
assetsTransferType:
|
|
2676
|
+
| StagingXcmExecutorAssetTransferTransferType
|
|
2677
|
+
| { Teleport: any }
|
|
2678
|
+
| { LocalReserve: any }
|
|
2679
|
+
| { DestinationReserve: any }
|
|
2680
|
+
| { RemoteReserve: any }
|
|
2681
|
+
| string
|
|
2682
|
+
| Uint8Array,
|
|
2683
|
+
remoteFeesId: XcmVersionedAssetId | { V3: any } | { V4: any } | string | Uint8Array,
|
|
2684
|
+
feesTransferType:
|
|
2685
|
+
| StagingXcmExecutorAssetTransferTransferType
|
|
2686
|
+
| { Teleport: any }
|
|
2687
|
+
| { LocalReserve: any }
|
|
2688
|
+
| { DestinationReserve: any }
|
|
2689
|
+
| { RemoteReserve: any }
|
|
2690
|
+
| string
|
|
2691
|
+
| Uint8Array,
|
|
2692
|
+
customXcmOnDest:
|
|
2693
|
+
| XcmVersionedXcm
|
|
2694
|
+
| { V2: any }
|
|
2695
|
+
| { V3: any }
|
|
2696
|
+
| { V4: any }
|
|
2697
|
+
| string
|
|
2698
|
+
| Uint8Array,
|
|
2699
|
+
weightLimit:
|
|
2700
|
+
| XcmV3WeightLimit
|
|
2701
|
+
| { Unlimited: any }
|
|
2702
|
+
| { Limited: any }
|
|
2703
|
+
| string
|
|
2704
|
+
| Uint8Array
|
|
2705
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2706
|
+
[
|
|
2707
|
+
XcmVersionedLocation,
|
|
2708
|
+
XcmVersionedAssets,
|
|
2709
|
+
StagingXcmExecutorAssetTransferTransferType,
|
|
2710
|
+
XcmVersionedAssetId,
|
|
2711
|
+
StagingXcmExecutorAssetTransferTransferType,
|
|
2712
|
+
XcmVersionedXcm,
|
|
2713
|
+
XcmV3WeightLimit
|
|
2714
|
+
]
|
|
2715
|
+
>;
|
|
2716
|
+
/**
|
|
2717
|
+
* Generic tx
|
|
2718
|
+
**/
|
|
2719
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
2720
|
+
};
|
|
2721
|
+
proofsDealer: {
|
|
2722
|
+
/**
|
|
2723
|
+
* Introduce a new challenge.
|
|
2724
|
+
*
|
|
2725
|
+
* This function allows anyone to add a new challenge to the `ChallengesQueue`.
|
|
2726
|
+
* The challenge will be dispatched in the coming blocks.
|
|
2727
|
+
* Users are charged a small fee for submitting a challenge, which
|
|
2728
|
+
* goes to the Treasury.
|
|
2729
|
+
**/
|
|
2730
|
+
challenge: AugmentedSubmittable<
|
|
2731
|
+
(key: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
2732
|
+
[H256]
|
|
2733
|
+
>;
|
|
2734
|
+
/**
|
|
2735
|
+
* Initialise a Provider's challenge cycle.
|
|
2736
|
+
*
|
|
2737
|
+
* Only callable by sudo.
|
|
2738
|
+
*
|
|
2739
|
+
* Sets the last tick the Provider submitted a proof for to the current tick, and sets the
|
|
2740
|
+
* deadline for submitting a proof to the current tick + the Provider's period + the tolerance.
|
|
2741
|
+
**/
|
|
2742
|
+
forceInitialiseChallengeCycle: AugmentedSubmittable<
|
|
2743
|
+
(provider: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
2744
|
+
[H256]
|
|
2745
|
+
>;
|
|
2746
|
+
/**
|
|
2747
|
+
* Set the [`ChallengesTickerPaused`] to `true` or `false`.
|
|
2748
|
+
*
|
|
2749
|
+
* Only callable by sudo.
|
|
2750
|
+
**/
|
|
2751
|
+
setPaused: AugmentedSubmittable<
|
|
2752
|
+
(paused: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
2753
|
+
[bool]
|
|
2754
|
+
>;
|
|
2755
|
+
/**
|
|
2756
|
+
* For a Provider to submit a proof.
|
|
2757
|
+
*
|
|
2758
|
+
* Checks that `provider` is a registered Provider. If none
|
|
2759
|
+
* is provided, the proof submitter is considered to be the Provider.
|
|
2760
|
+
* Relies on a Providers pallet to get the root for the Provider.
|
|
2761
|
+
* Validates that the proof corresponds to a challenge that was made in the past,
|
|
2762
|
+
* by checking the `TickToChallengesSeed` StorageMap. The challenge tick that the
|
|
2763
|
+
* Provider should have submitted a proof is calculated based on the last tick they
|
|
2764
|
+
* submitted a proof for ([`LastTickProviderSubmittedAProofFor`]), and the proving period for
|
|
2765
|
+
* that Provider, which is a function of their stake.
|
|
2766
|
+
* This extrinsic also checks that there hasn't been a checkpoint challenge round
|
|
2767
|
+
* in between the last time the Provider submitted a proof for and the tick
|
|
2768
|
+
* for which the proof is being submitted. If there has been, the Provider is
|
|
2769
|
+
* subject to slashing.
|
|
2770
|
+
*
|
|
2771
|
+
* If valid:
|
|
2772
|
+
* - Pushes forward the Provider in the [`TickToProvidersDeadlines`] StorageMap a number
|
|
2773
|
+
* of ticks corresponding to the stake of the Provider.
|
|
2774
|
+
* - Registers this tick as the last tick in which the Provider submitted a proof.
|
|
2775
|
+
*
|
|
2776
|
+
* Execution of this extrinsic should be refunded if the proof is valid.
|
|
2777
|
+
**/
|
|
2778
|
+
submitProof: AugmentedSubmittable<
|
|
2779
|
+
(
|
|
2780
|
+
proof:
|
|
2781
|
+
| PalletProofsDealerProof
|
|
2782
|
+
| { forestProof?: any; keyProofs?: any }
|
|
2783
|
+
| string
|
|
2784
|
+
| Uint8Array,
|
|
2785
|
+
provider: Option<H256> | null | Uint8Array | H256 | string
|
|
2786
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2787
|
+
[PalletProofsDealerProof, Option<H256>]
|
|
2788
|
+
>;
|
|
2789
|
+
/**
|
|
2790
|
+
* Generic tx
|
|
2791
|
+
**/
|
|
2792
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
2793
|
+
};
|
|
2794
|
+
providers: {
|
|
2795
|
+
/**
|
|
2796
|
+
* Dispatchable extrinsic only callable by an MSP that allows it to add a value proposition to its service
|
|
2797
|
+
*
|
|
2798
|
+
* The dispatch origin for this call must be Signed.
|
|
2799
|
+
* The origin must be the account that wants to add a value proposition.
|
|
2800
|
+
*
|
|
2801
|
+
* Parameters:
|
|
2802
|
+
* - `new_value_prop`: The value proposition that the MSP wants to add to its service.
|
|
2803
|
+
*
|
|
2804
|
+
* This extrinsic will perform the following checks and logic:
|
|
2805
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
2806
|
+
* 2. Check that the signer is registered as a MSP
|
|
2807
|
+
* 3. Check that the MSP has not reached the maximum amount of value propositions
|
|
2808
|
+
* 4. Check that the value proposition is valid (size and any other relevant checks)
|
|
2809
|
+
* 5. Update the MSPs storage to add the value proposition (with its identifier)
|
|
2810
|
+
*
|
|
2811
|
+
* Emits `ValuePropAdded` event when successful.
|
|
2812
|
+
**/
|
|
2813
|
+
addValueProp: AugmentedSubmittable<
|
|
2814
|
+
(
|
|
2815
|
+
newValueProp:
|
|
2816
|
+
| PalletStorageProvidersValueProposition
|
|
2817
|
+
| { identifier?: any; dataLimit?: any; protocols?: any }
|
|
2818
|
+
| string
|
|
2819
|
+
| Uint8Array
|
|
2820
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2821
|
+
[PalletStorageProvidersValueProposition]
|
|
2822
|
+
>;
|
|
2823
|
+
/**
|
|
2824
|
+
* Dispatchable extrinsic that allows users to sign off as a Backup Storage Provider.
|
|
2825
|
+
*
|
|
2826
|
+
* The dispatch origin for this call must be Signed.
|
|
2827
|
+
* The origin must be the account that wants to sign off as a Backup Storage Provider.
|
|
2828
|
+
*
|
|
2829
|
+
* This extrinsic will perform the following checks and logic:
|
|
2830
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
2831
|
+
* 2. Check that the signer is registered as a BSP
|
|
2832
|
+
* 3. Check that the BSP has no storage assigned to it
|
|
2833
|
+
* 4. Update the BSPs storage, removing the signer as an BSP
|
|
2834
|
+
* 5. Update the total capacity of all BSPs, removing the capacity of the signer
|
|
2835
|
+
* 6. Return the deposit to the signer
|
|
2836
|
+
* 7. Decrement the storage that holds total amount of BSPs currently in the system
|
|
2837
|
+
*
|
|
2838
|
+
* Emits `BspSignOffSuccess` event when successful.
|
|
2839
|
+
**/
|
|
2840
|
+
bspSignOff: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
2841
|
+
/**
|
|
2842
|
+
* Dispatchable extrinsic that allows a user with a pending Sign Up Request to cancel it, getting the deposit back.
|
|
2843
|
+
*
|
|
2844
|
+
* The dispatch origin for this call must be Signed.
|
|
2845
|
+
* The origin must be the account that requested to sign up as a Storage Provider.
|
|
2846
|
+
*
|
|
2847
|
+
* This extrinsic will perform the following checks and logic:
|
|
2848
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
2849
|
+
* 2. Check that the signer has requested to sign up as a SP
|
|
2850
|
+
* 3. Delete the request from the Sign Up Requests storage
|
|
2851
|
+
* 4. Return the deposit to the signer
|
|
2852
|
+
*
|
|
2853
|
+
* Emits `SignUpRequestCanceled` event when successful.
|
|
2854
|
+
**/
|
|
2855
|
+
cancelSignUp: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
2856
|
+
/**
|
|
2857
|
+
* Dispatchable extrinsic that allows users to change their amount of stored data
|
|
2858
|
+
*
|
|
2859
|
+
* The dispatch origin for this call must be Signed.
|
|
2860
|
+
* The origin must be the account that wants to change its capacity.
|
|
2861
|
+
*
|
|
2862
|
+
* Parameters:
|
|
2863
|
+
* - `new_capacity`: The new total amount of data that the Storage Provider wants to be able to store.
|
|
2864
|
+
*
|
|
2865
|
+
* This extrinsic will perform the following checks and logic:
|
|
2866
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
2867
|
+
* 2. Check that the signer is registered as a SP
|
|
2868
|
+
* 3. Check that enough time has passed since the last time the SP changed its capacity
|
|
2869
|
+
* 4. Check that the new capacity is greater than the minimum required by the runtime
|
|
2870
|
+
* 5. Check that the new capacity is greater than the data used by this SP
|
|
2871
|
+
* 6. Calculate the new deposit needed for this new capacity
|
|
2872
|
+
* 7. Check to see if the new deposit needed is greater or less than the current deposit
|
|
2873
|
+
* a. If the new deposit is greater than the current deposit:
|
|
2874
|
+
* i. Check that the signer has enough funds to pay this extra deposit
|
|
2875
|
+
* ii. Hold the extra deposit from the signer
|
|
2876
|
+
* b. If the new deposit is less than the current deposit, return the held difference to the signer
|
|
2877
|
+
* 7. Update the SPs storage to change the total data
|
|
2878
|
+
* 8. If user is a BSP, update the total capacity of the network (sum of all capacities of BSPs)
|
|
2879
|
+
*
|
|
2880
|
+
* Emits `CapacityChanged` event when successful.
|
|
2881
|
+
**/
|
|
2882
|
+
changeCapacity: AugmentedSubmittable<
|
|
2883
|
+
(newCapacity: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
2884
|
+
[u64]
|
|
2885
|
+
>;
|
|
2886
|
+
/**
|
|
2887
|
+
* Dispatchable extrinsic that allows users to confirm their sign up as a Storage Provider, either MSP or BSP.
|
|
2888
|
+
*
|
|
2889
|
+
* The dispatch origin for this call must be Signed.
|
|
2890
|
+
* The origin must be the account that requested to sign up as a Storage Provider, except when providing a
|
|
2891
|
+
* `provider_account` parameter, in which case the origin can be any account.
|
|
2892
|
+
*
|
|
2893
|
+
* Parameters:
|
|
2894
|
+
* - `provider_account`: The account that requested to sign up as a Storage Provider. If not provided, the signer
|
|
2895
|
+
* will be considered the account that requested to sign up.
|
|
2896
|
+
*
|
|
2897
|
+
* This extrinsic will perform the following checks and logic:
|
|
2898
|
+
* 1. Check that the extrinsic was signed
|
|
2899
|
+
* 2. Check that the account received has requested to register as a SP
|
|
2900
|
+
* 3. Check that the current randomness is sufficiently fresh to be used as a salt for that request
|
|
2901
|
+
* 4. Check that the request has not expired
|
|
2902
|
+
* 5. Register the signer as a MSP or BSP with the data provided in the request
|
|
2903
|
+
*
|
|
2904
|
+
* Emits `MspSignUpSuccess` or `BspSignUpSuccess` event when successful, depending on the type of sign up.
|
|
2905
|
+
*
|
|
2906
|
+
* Notes:
|
|
2907
|
+
* - This extrinsic could be called by the user itself or by a third party
|
|
2908
|
+
* - The deposit that the user has to pay to register as a SP is held when the user requests to register as a SP
|
|
2909
|
+
* - If this extrinsic is successful, it will be free for the caller, to incentive state debloating
|
|
2910
|
+
**/
|
|
2911
|
+
confirmSignUp: AugmentedSubmittable<
|
|
2912
|
+
(
|
|
2913
|
+
providerAccount: Option<AccountId32> | null | Uint8Array | AccountId32 | string
|
|
2914
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2915
|
+
[Option<AccountId32>]
|
|
2916
|
+
>;
|
|
2917
|
+
/**
|
|
2918
|
+
* Dispatchable extrinsic that allows to forcefully and automatically sing up a Backup Storage Provider.
|
|
2919
|
+
*
|
|
2920
|
+
* The dispatch origin for this call must be Root.
|
|
2921
|
+
* The `who` parameter is the account that wants to sign up as a Backup Storage Provider.
|
|
2922
|
+
*
|
|
2923
|
+
* Funds proportional to the capacity requested are reserved (held) from the account passed as the `who` parameter.
|
|
2924
|
+
*
|
|
2925
|
+
* Parameters:
|
|
2926
|
+
* - `who`: The account that wants to sign up as a Backup Storage Provider.
|
|
2927
|
+
* - `bsp_id`: The Backup Storage Provider ID that the account passed as the `who` parameter is requesting to sign up as.
|
|
2928
|
+
* - `capacity`: The total amount of data that the Backup Storage Provider will be able to store.
|
|
2929
|
+
* - `multiaddresses`: The vector of multiaddresses that the signer wants to register (according to the
|
|
2930
|
+
* [Multiaddr spec](https://github.com/multiformats/multiaddr))
|
|
2931
|
+
*
|
|
2932
|
+
* This extrinsic will perform the steps of:
|
|
2933
|
+
* 1. [request_bsp_sign_up](crate::dispatchables::request_bsp_sign_up)
|
|
2934
|
+
* 2. [confirm_sign_up](crate::dispatchables::confirm_sign_up)
|
|
2935
|
+
*
|
|
2936
|
+
* Emits `BspRequestSignUpSuccess` and `BspSignUpSuccess` events when successful.
|
|
2937
|
+
**/
|
|
2938
|
+
forceBspSignUp: AugmentedSubmittable<
|
|
2939
|
+
(
|
|
2940
|
+
who: AccountId32 | string | Uint8Array,
|
|
2941
|
+
bspId: H256 | string | Uint8Array,
|
|
2942
|
+
capacity: u64 | AnyNumber | Uint8Array,
|
|
2943
|
+
multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[],
|
|
2944
|
+
paymentAccount: AccountId32 | string | Uint8Array,
|
|
2945
|
+
weight: Option<u32> | null | Uint8Array | u32 | AnyNumber
|
|
2946
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2947
|
+
[AccountId32, H256, u64, Vec<Bytes>, AccountId32, Option<u32>]
|
|
2948
|
+
>;
|
|
2949
|
+
/**
|
|
2950
|
+
* Dispatchable extrinsic that allows to forcefully and automatically sing up a Main Storage Provider.
|
|
2951
|
+
*
|
|
2952
|
+
* The dispatch origin for this call must be Root.
|
|
2953
|
+
* The `who` parameter is the account that wants to sign up as a Main Storage Provider.
|
|
2954
|
+
*
|
|
2955
|
+
* Funds proportional to the capacity requested are reserved (held) from the account passed as the `who` parameter.
|
|
2956
|
+
*
|
|
2957
|
+
* Parameters:
|
|
2958
|
+
* - `who`: The account that wants to sign up as a Main Storage Provider.
|
|
2959
|
+
* - `msp_id`: The Main Storage Provider ID that the account passed as the `who` parameter is requesting to sign up as.
|
|
2960
|
+
* - `capacity`: The total amount of data that the Main Storage Provider will be able to store.
|
|
2961
|
+
* - `multiaddresses`: The vector of multiaddresses that the signer wants to register (according to the
|
|
2962
|
+
* [Multiaddr spec](https://github.com/multiformats/multiaddr))
|
|
2963
|
+
* - `value_prop`: The value proposition that the signer will provide as a Main Storage Provider to
|
|
2964
|
+
* users and wants to register on-chain. It could be data limits, communication protocols to access the user's
|
|
2965
|
+
* data, and more.
|
|
2966
|
+
*
|
|
2967
|
+
* This extrinsic will perform the steps of:
|
|
2968
|
+
* 1. [request_msp_sign_up](crate::dispatchables::request_msp_sign_up)
|
|
2969
|
+
* 2. [confirm_sign_up](crate::dispatchables::confirm_sign_up)
|
|
2970
|
+
*
|
|
2971
|
+
* Emits `MspRequestSignUpSuccess` and `MspSignUpSuccess` events when successful.
|
|
2972
|
+
**/
|
|
2973
|
+
forceMspSignUp: AugmentedSubmittable<
|
|
2974
|
+
(
|
|
2975
|
+
who: AccountId32 | string | Uint8Array,
|
|
2976
|
+
mspId: H256 | string | Uint8Array,
|
|
2977
|
+
capacity: u64 | AnyNumber | Uint8Array,
|
|
2978
|
+
multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[],
|
|
2979
|
+
valueProp:
|
|
2980
|
+
| PalletStorageProvidersValueProposition
|
|
2981
|
+
| { identifier?: any; dataLimit?: any; protocols?: any }
|
|
2982
|
+
| string
|
|
2983
|
+
| Uint8Array,
|
|
2984
|
+
paymentAccount: AccountId32 | string | Uint8Array
|
|
2985
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
2986
|
+
[AccountId32, H256, u64, Vec<Bytes>, PalletStorageProvidersValueProposition, AccountId32]
|
|
2987
|
+
>;
|
|
2988
|
+
/**
|
|
2989
|
+
* Dispatchable extrinsic that allows users to sign off as a Main Storage Provider.
|
|
2990
|
+
*
|
|
2991
|
+
* The dispatch origin for this call must be Signed.
|
|
2992
|
+
* The origin must be the account that wants to sign off as a Main Storage Provider.
|
|
2993
|
+
*
|
|
2994
|
+
* This extrinsic will perform the following checks and logic:
|
|
2995
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
2996
|
+
* 2. Check that the signer is registered as a MSP
|
|
2997
|
+
* 3. Check that the MSP has no storage assigned to it (no buckets or data used by it)
|
|
2998
|
+
* 4. Update the MSPs storage, removing the signer as an MSP
|
|
2999
|
+
* 5. Return the deposit to the signer
|
|
3000
|
+
* 6. Decrement the storage that holds total amount of MSPs currently in the system
|
|
3001
|
+
*
|
|
3002
|
+
* Emits `MspSignOffSuccess` event when successful.
|
|
3003
|
+
**/
|
|
3004
|
+
mspSignOff: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
3005
|
+
/**
|
|
3006
|
+
* Dispatchable extrinsic that allows users to sign up as a Backup Storage Provider.
|
|
3007
|
+
*
|
|
3008
|
+
* The dispatch origin for this call must be Signed.
|
|
3009
|
+
* The origin must be the account that wants to sign up as a Backup Storage Provider.
|
|
3010
|
+
*
|
|
3011
|
+
* Funds proportional to the capacity requested are reserved (held) from the account.
|
|
3012
|
+
*
|
|
3013
|
+
* Parameters:
|
|
3014
|
+
* - `capacity`: The total amount of data that the Backup Storage Provider will be able to store.
|
|
3015
|
+
* - `multiaddresses`: The vector of multiaddresses that the signer wants to register (according to the
|
|
3016
|
+
* [Multiaddr spec](https://github.com/multiformats/multiaddr))
|
|
3017
|
+
*
|
|
3018
|
+
* This extrinsic will perform the following checks and logic:
|
|
3019
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
3020
|
+
* 2. Check that the signer is not already registered as either a MSP or BSP
|
|
3021
|
+
* 3. Check that the multiaddress is valid
|
|
3022
|
+
* 4. Check that the data to be stored is greater than the minimum required by the runtime
|
|
3023
|
+
* 5. Calculate how much deposit will the signer have to pay using the amount of data it wants to store
|
|
3024
|
+
* 6. Check that the signer has enough funds to pay the deposit
|
|
3025
|
+
* 7. Hold the deposit from the signer
|
|
3026
|
+
* 8. Update the Sign Up Requests storage to add the signer as requesting to sign up as a BSP
|
|
3027
|
+
*
|
|
3028
|
+
* Emits `BspRequestSignUpSuccess` event when successful.
|
|
3029
|
+
**/
|
|
3030
|
+
requestBspSignUp: AugmentedSubmittable<
|
|
3031
|
+
(
|
|
3032
|
+
capacity: u64 | AnyNumber | Uint8Array,
|
|
3033
|
+
multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[],
|
|
3034
|
+
paymentAccount: AccountId32 | string | Uint8Array
|
|
3035
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
3036
|
+
[u64, Vec<Bytes>, AccountId32]
|
|
3037
|
+
>;
|
|
3038
|
+
/**
|
|
3039
|
+
* Dispatchable extrinsic that allows users to request to sign up as a Main Storage Provider.
|
|
3040
|
+
*
|
|
3041
|
+
* The dispatch origin for this call must be Signed.
|
|
3042
|
+
* The origin must be the account that wants to sign up as a Main Storage Provider.
|
|
3043
|
+
*
|
|
3044
|
+
* Funds proportional to the capacity requested are reserved (held) from the account.
|
|
3045
|
+
*
|
|
3046
|
+
* Parameters:
|
|
3047
|
+
* - `capacity`: The total amount of data that the Main Storage Provider will be able to store.
|
|
3048
|
+
* - `multiaddresses`: The vector of multiaddresses that the signer wants to register (according to the
|
|
3049
|
+
* [Multiaddr spec](https://github.com/multiformats/multiaddr))
|
|
3050
|
+
* - `value_prop`: The value proposition that the signer will provide as a Main Storage Provider to
|
|
3051
|
+
* users and wants to register on-chain. It could be data limits, communication protocols to access the user's
|
|
3052
|
+
* data, and more.
|
|
3053
|
+
*
|
|
3054
|
+
* This extrinsic will perform the following checks and logic:
|
|
3055
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
3056
|
+
* 2. Check that the signer is not already registered as either a MSP or BSP
|
|
3057
|
+
* 3. Check that the multiaddress is valid
|
|
3058
|
+
* 4. Check that the data to be stored is greater than the minimum required by the runtime.
|
|
3059
|
+
* 5. Calculate how much deposit will the signer have to pay using the amount of data it wants to store
|
|
3060
|
+
* 6. Check that the signer has enough funds to pay the deposit
|
|
3061
|
+
* 7. Hold the deposit from the signer
|
|
3062
|
+
* 8. Update the Sign Up Requests storage to add the signer as requesting to sign up as a MSP
|
|
3063
|
+
*
|
|
3064
|
+
* Emits `MspRequestSignUpSuccess` event when successful.
|
|
3065
|
+
**/
|
|
3066
|
+
requestMspSignUp: AugmentedSubmittable<
|
|
3067
|
+
(
|
|
3068
|
+
capacity: u64 | AnyNumber | Uint8Array,
|
|
3069
|
+
multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[],
|
|
3070
|
+
valueProp:
|
|
3071
|
+
| PalletStorageProvidersValueProposition
|
|
3072
|
+
| { identifier?: any; dataLimit?: any; protocols?: any }
|
|
3073
|
+
| string
|
|
3074
|
+
| Uint8Array,
|
|
3075
|
+
paymentAccount: AccountId32 | string | Uint8Array
|
|
3076
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
3077
|
+
[u64, Vec<Bytes>, PalletStorageProvidersValueProposition, AccountId32]
|
|
3078
|
+
>;
|
|
3079
|
+
/**
|
|
3080
|
+
* Dispatchable extrinsic to slash a _slashable_ Storage Provider.
|
|
3081
|
+
*
|
|
3082
|
+
* A Storage Provider is _slashable_ iff it has failed to respond to challenges for providing proofs of storage.
|
|
3083
|
+
* In the context of the StorageHub protocol, the proofs-dealer pallet marks a Storage Provider as _slashable_ when it fails to respond to challenges.
|
|
3084
|
+
**/
|
|
3085
|
+
slash: AugmentedSubmittable<
|
|
3086
|
+
(providerId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3087
|
+
[H256]
|
|
3088
|
+
>;
|
|
3089
|
+
/**
|
|
3090
|
+
* Generic tx
|
|
3091
|
+
**/
|
|
3092
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
3093
|
+
};
|
|
3094
|
+
randomness: {
|
|
3095
|
+
/**
|
|
3096
|
+
* This inherent that must be included (DispatchClass::Mandatory) at each block saves the latest randomness available from the
|
|
3097
|
+
* relay chain into a variable that can then be used as a seed for commitments that happened during
|
|
3098
|
+
* the previous relay chain epoch
|
|
3099
|
+
**/
|
|
3100
|
+
setBabeRandomness: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
3101
|
+
/**
|
|
3102
|
+
* Generic tx
|
|
3103
|
+
**/
|
|
3104
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
3105
|
+
};
|
|
3106
|
+
session: {
|
|
3107
|
+
/**
|
|
3108
|
+
* Removes any session key(s) of the function caller.
|
|
3109
|
+
*
|
|
3110
|
+
* This doesn't take effect until the next session.
|
|
3111
|
+
*
|
|
3112
|
+
* The dispatch origin of this function must be Signed and the account must be either be
|
|
3113
|
+
* convertible to a validator ID using the chain's typical addressing system (this usually
|
|
3114
|
+
* means being a controller account) or directly convertible into a validator ID (which
|
|
3115
|
+
* usually means being a stash account).
|
|
3116
|
+
*
|
|
3117
|
+
* ## Complexity
|
|
3118
|
+
* - `O(1)` in number of key types. Actual cost depends on the number of length of
|
|
3119
|
+
* `T::Keys::key_ids()` which is fixed.
|
|
3120
|
+
**/
|
|
3121
|
+
purgeKeys: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
3122
|
+
/**
|
|
3123
|
+
* Sets the session key(s) of the function caller to `keys`.
|
|
3124
|
+
* Allows an account to set its session key prior to becoming a validator.
|
|
3125
|
+
* This doesn't take effect until the next session.
|
|
3126
|
+
*
|
|
3127
|
+
* The dispatch origin of this function must be signed.
|
|
3128
|
+
*
|
|
3129
|
+
* ## Complexity
|
|
3130
|
+
* - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is
|
|
3131
|
+
* fixed.
|
|
3132
|
+
**/
|
|
3133
|
+
setKeys: AugmentedSubmittable<
|
|
3134
|
+
(
|
|
3135
|
+
keys: StorageHubRuntimeSessionKeys | { aura?: any } | string | Uint8Array,
|
|
3136
|
+
proof: Bytes | string | Uint8Array
|
|
3137
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
3138
|
+
[StorageHubRuntimeSessionKeys, Bytes]
|
|
3139
|
+
>;
|
|
3140
|
+
/**
|
|
3141
|
+
* Generic tx
|
|
3142
|
+
**/
|
|
3143
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
3144
|
+
};
|
|
3145
|
+
sudo: {
|
|
3146
|
+
/**
|
|
3147
|
+
* Permanently removes the sudo key.
|
|
3148
|
+
*
|
|
3149
|
+
* **This cannot be un-done.**
|
|
3150
|
+
**/
|
|
3151
|
+
removeKey: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
3152
|
+
/**
|
|
3153
|
+
* Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo
|
|
3154
|
+
* key.
|
|
3155
|
+
**/
|
|
3156
|
+
setKey: AugmentedSubmittable<
|
|
3157
|
+
(
|
|
3158
|
+
updated:
|
|
3159
|
+
| MultiAddress
|
|
3160
|
+
| { Id: any }
|
|
3161
|
+
| { Index: any }
|
|
3162
|
+
| { Raw: any }
|
|
3163
|
+
| { Address32: any }
|
|
3164
|
+
| { Address20: any }
|
|
3165
|
+
| string
|
|
3166
|
+
| Uint8Array
|
|
3167
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
3168
|
+
[MultiAddress]
|
|
3169
|
+
>;
|
|
3170
|
+
/**
|
|
3171
|
+
* Authenticates the sudo key and dispatches a function call with `Root` origin.
|
|
3172
|
+
**/
|
|
3173
|
+
sudo: AugmentedSubmittable<
|
|
3174
|
+
(call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3175
|
+
[Call]
|
|
3176
|
+
>;
|
|
3177
|
+
/**
|
|
3178
|
+
* Authenticates the sudo key and dispatches a function call with `Signed` origin from
|
|
3179
|
+
* a given account.
|
|
3180
|
+
*
|
|
3181
|
+
* The dispatch origin for this call must be _Signed_.
|
|
3182
|
+
**/
|
|
3183
|
+
sudoAs: AugmentedSubmittable<
|
|
3184
|
+
(
|
|
3185
|
+
who:
|
|
3186
|
+
| MultiAddress
|
|
3187
|
+
| { Id: any }
|
|
3188
|
+
| { Index: any }
|
|
3189
|
+
| { Raw: any }
|
|
3190
|
+
| { Address32: any }
|
|
3191
|
+
| { Address20: any }
|
|
3192
|
+
| string
|
|
3193
|
+
| Uint8Array,
|
|
3194
|
+
call: Call | IMethod | string | Uint8Array
|
|
3195
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
3196
|
+
[MultiAddress, Call]
|
|
3197
|
+
>;
|
|
3198
|
+
/**
|
|
3199
|
+
* Authenticates the sudo key and dispatches a function call with `Root` origin.
|
|
3200
|
+
* This function does not check the weight of the call, and instead allows the
|
|
3201
|
+
* Sudo user to specify the weight of the call.
|
|
3202
|
+
*
|
|
3203
|
+
* The dispatch origin for this call must be _Signed_.
|
|
3204
|
+
**/
|
|
3205
|
+
sudoUncheckedWeight: AugmentedSubmittable<
|
|
3206
|
+
(
|
|
3207
|
+
call: Call | IMethod | string | Uint8Array,
|
|
3208
|
+
weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array
|
|
3209
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
3210
|
+
[Call, SpWeightsWeightV2Weight]
|
|
3211
|
+
>;
|
|
3212
|
+
/**
|
|
3213
|
+
* Generic tx
|
|
3214
|
+
**/
|
|
3215
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
3216
|
+
};
|
|
3217
|
+
system: {
|
|
3218
|
+
/**
|
|
3219
|
+
* Provide the preimage (runtime binary) `code` for an upgrade that has been authorized.
|
|
3220
|
+
*
|
|
3221
|
+
* If the authorization required a version check, this call will ensure the spec name
|
|
3222
|
+
* remains unchanged and that the spec version has increased.
|
|
3223
|
+
*
|
|
3224
|
+
* Depending on the runtime's `OnSetCode` configuration, this function may directly apply
|
|
3225
|
+
* the new `code` in the same block or attempt to schedule the upgrade.
|
|
3226
|
+
*
|
|
3227
|
+
* All origins are allowed.
|
|
3228
|
+
**/
|
|
3229
|
+
applyAuthorizedUpgrade: AugmentedSubmittable<
|
|
3230
|
+
(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3231
|
+
[Bytes]
|
|
3232
|
+
>;
|
|
3233
|
+
/**
|
|
3234
|
+
* Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied
|
|
3235
|
+
* later.
|
|
3236
|
+
*
|
|
3237
|
+
* This call requires Root origin.
|
|
3238
|
+
**/
|
|
3239
|
+
authorizeUpgrade: AugmentedSubmittable<
|
|
3240
|
+
(codeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3241
|
+
[H256]
|
|
3242
|
+
>;
|
|
3243
|
+
/**
|
|
3244
|
+
* Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied
|
|
3245
|
+
* later.
|
|
3246
|
+
*
|
|
3247
|
+
* WARNING: This authorizes an upgrade that will take place without any safety checks, for
|
|
3248
|
+
* example that the spec name remains the same and that the version number increases. Not
|
|
3249
|
+
* recommended for normal use. Use `authorize_upgrade` instead.
|
|
3250
|
+
*
|
|
3251
|
+
* This call requires Root origin.
|
|
3252
|
+
**/
|
|
3253
|
+
authorizeUpgradeWithoutChecks: AugmentedSubmittable<
|
|
3254
|
+
(codeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3255
|
+
[H256]
|
|
3256
|
+
>;
|
|
3257
|
+
/**
|
|
3258
|
+
* Kill all storage items with a key that starts with the given prefix.
|
|
3259
|
+
*
|
|
3260
|
+
* **NOTE:** We rely on the Root origin to provide us the number of subkeys under
|
|
3261
|
+
* the prefix we are removing to accurately calculate the weight of this function.
|
|
3262
|
+
**/
|
|
3263
|
+
killPrefix: AugmentedSubmittable<
|
|
3264
|
+
(
|
|
3265
|
+
prefix: Bytes | string | Uint8Array,
|
|
3266
|
+
subkeys: u32 | AnyNumber | Uint8Array
|
|
3267
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
3268
|
+
[Bytes, u32]
|
|
3269
|
+
>;
|
|
3270
|
+
/**
|
|
3271
|
+
* Kill some items from storage.
|
|
3272
|
+
**/
|
|
3273
|
+
killStorage: AugmentedSubmittable<
|
|
3274
|
+
(keys: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>,
|
|
3275
|
+
[Vec<Bytes>]
|
|
3276
|
+
>;
|
|
3277
|
+
/**
|
|
3278
|
+
* Make some on-chain remark.
|
|
3279
|
+
*
|
|
3280
|
+
* Can be executed by every `origin`.
|
|
3281
|
+
**/
|
|
3282
|
+
remark: AugmentedSubmittable<
|
|
3283
|
+
(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3284
|
+
[Bytes]
|
|
3285
|
+
>;
|
|
3286
|
+
/**
|
|
3287
|
+
* Make some on-chain remark and emit event.
|
|
3288
|
+
**/
|
|
3289
|
+
remarkWithEvent: AugmentedSubmittable<
|
|
3290
|
+
(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3291
|
+
[Bytes]
|
|
3292
|
+
>;
|
|
3293
|
+
/**
|
|
3294
|
+
* Set the new runtime code.
|
|
3295
|
+
**/
|
|
3296
|
+
setCode: AugmentedSubmittable<
|
|
3297
|
+
(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3298
|
+
[Bytes]
|
|
3299
|
+
>;
|
|
3300
|
+
/**
|
|
3301
|
+
* Set the new runtime code without doing any checks of the given `code`.
|
|
3302
|
+
*
|
|
3303
|
+
* Note that runtime upgrades will not run if this is called with a not-increasing spec
|
|
3304
|
+
* version!
|
|
3305
|
+
**/
|
|
3306
|
+
setCodeWithoutChecks: AugmentedSubmittable<
|
|
3307
|
+
(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3308
|
+
[Bytes]
|
|
3309
|
+
>;
|
|
3310
|
+
/**
|
|
3311
|
+
* Set the number of pages in the WebAssembly environment's heap.
|
|
3312
|
+
**/
|
|
3313
|
+
setHeapPages: AugmentedSubmittable<
|
|
3314
|
+
(pages: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3315
|
+
[u64]
|
|
3316
|
+
>;
|
|
3317
|
+
/**
|
|
3318
|
+
* Set some items of storage.
|
|
3319
|
+
**/
|
|
3320
|
+
setStorage: AugmentedSubmittable<
|
|
3321
|
+
(
|
|
3322
|
+
items:
|
|
3323
|
+
| Vec<ITuple<[Bytes, Bytes]>>
|
|
3324
|
+
| [Bytes | string | Uint8Array, Bytes | string | Uint8Array][]
|
|
3325
|
+
) => SubmittableExtrinsic<ApiType>,
|
|
3326
|
+
[Vec<ITuple<[Bytes, Bytes]>>]
|
|
3327
|
+
>;
|
|
3328
|
+
/**
|
|
3329
|
+
* Generic tx
|
|
3330
|
+
**/
|
|
3331
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
3332
|
+
};
|
|
3333
|
+
timestamp: {
|
|
3334
|
+
/**
|
|
3335
|
+
* Set the current time.
|
|
3336
|
+
*
|
|
3337
|
+
* This call should be invoked exactly once per block. It will panic at the finalization
|
|
3338
|
+
* phase, if this call hasn't been invoked by that time.
|
|
3339
|
+
*
|
|
3340
|
+
* The timestamp should be greater than the previous one by the amount specified by
|
|
3341
|
+
* [`Config::MinimumPeriod`].
|
|
3342
|
+
*
|
|
3343
|
+
* The dispatch origin for this call must be _None_.
|
|
3344
|
+
*
|
|
3345
|
+
* This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware
|
|
3346
|
+
* that changing the complexity of this call could result exhausting the resources in a
|
|
3347
|
+
* block to execute any other calls.
|
|
3348
|
+
*
|
|
3349
|
+
* ## Complexity
|
|
3350
|
+
* - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)
|
|
3351
|
+
* - 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in
|
|
3352
|
+
* `on_finalize`)
|
|
3353
|
+
* - 1 event handler `on_timestamp_set`. Must be `O(1)`.
|
|
3354
|
+
**/
|
|
3355
|
+
set: AugmentedSubmittable<
|
|
3356
|
+
(now: Compact<u64> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3357
|
+
[Compact<u64>]
|
|
3358
|
+
>;
|
|
3359
|
+
/**
|
|
3360
|
+
* Generic tx
|
|
3361
|
+
**/
|
|
3362
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
3363
|
+
};
|
|
3364
|
+
xcmpQueue: {
|
|
3365
|
+
/**
|
|
3366
|
+
* Resumes all XCM executions for the XCMP queue.
|
|
3367
|
+
*
|
|
3368
|
+
* Note that this function doesn't change the status of the in/out bound channels.
|
|
3369
|
+
*
|
|
3370
|
+
* - `origin`: Must pass `ControllerOrigin`.
|
|
3371
|
+
**/
|
|
3372
|
+
resumeXcmExecution: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
3373
|
+
/**
|
|
3374
|
+
* Suspends all XCM executions for the XCMP queue, regardless of the sender's origin.
|
|
3375
|
+
*
|
|
3376
|
+
* - `origin`: Must pass `ControllerOrigin`.
|
|
3377
|
+
**/
|
|
3378
|
+
suspendXcmExecution: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
3379
|
+
/**
|
|
3380
|
+
* Overwrites the number of pages which must be in the queue after which we drop any
|
|
3381
|
+
* further messages from the channel.
|
|
3382
|
+
*
|
|
3383
|
+
* - `origin`: Must pass `Root`.
|
|
3384
|
+
* - `new`: Desired value for `QueueConfigData.drop_threshold`
|
|
3385
|
+
**/
|
|
3386
|
+
updateDropThreshold: AugmentedSubmittable<
|
|
3387
|
+
(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3388
|
+
[u32]
|
|
3389
|
+
>;
|
|
3390
|
+
/**
|
|
3391
|
+
* Overwrites the number of pages which the queue must be reduced to before it signals
|
|
3392
|
+
* that message sending may recommence after it has been suspended.
|
|
3393
|
+
*
|
|
3394
|
+
* - `origin`: Must pass `Root`.
|
|
3395
|
+
* - `new`: Desired value for `QueueConfigData.resume_threshold`
|
|
3396
|
+
**/
|
|
3397
|
+
updateResumeThreshold: AugmentedSubmittable<
|
|
3398
|
+
(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3399
|
+
[u32]
|
|
3400
|
+
>;
|
|
3401
|
+
/**
|
|
3402
|
+
* Overwrites the number of pages which must be in the queue for the other side to be
|
|
3403
|
+
* told to suspend their sending.
|
|
3404
|
+
*
|
|
3405
|
+
* - `origin`: Must pass `Root`.
|
|
3406
|
+
* - `new`: Desired value for `QueueConfigData.suspend_value`
|
|
3407
|
+
**/
|
|
3408
|
+
updateSuspendThreshold: AugmentedSubmittable<
|
|
3409
|
+
(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
|
|
3410
|
+
[u32]
|
|
3411
|
+
>;
|
|
3412
|
+
/**
|
|
3413
|
+
* Generic tx
|
|
3414
|
+
**/
|
|
3415
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
3416
|
+
};
|
|
3417
|
+
} // AugmentedSubmittables
|
|
3418
|
+
} // declare module
|