@storagehub/api-augment 0.1.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/biome.json +2 -9
- package/dist/parachain/index.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-consts.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-errors.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-events.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-query.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-rpc.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-runtime.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-tx.js.map +1 -0
- package/dist/parachain/interfaces/augment-api.js.map +1 -0
- package/dist/parachain/interfaces/augment-types.js.map +1 -0
- package/dist/parachain/interfaces/definitions.js.map +1 -0
- package/dist/parachain/interfaces/index.js.map +1 -0
- package/dist/{interfaces → parachain/interfaces}/lookup.js +1465 -813
- package/dist/parachain/interfaces/lookup.js.map +1 -0
- package/dist/parachain/interfaces/registry.js.map +1 -0
- package/dist/parachain/interfaces/storagehubclient/definitions.js +7 -0
- package/dist/parachain/interfaces/storagehubclient/definitions.js.map +1 -0
- package/dist/parachain/interfaces/storagehubclient/index.js.map +1 -0
- package/dist/parachain/interfaces/storagehubclient/runtime.js.map +1 -0
- package/dist/parachain/interfaces/storagehubclient/types.js.map +1 -0
- package/dist/parachain/interfaces/types-lookup.js.map +1 -0
- package/dist/parachain/interfaces/types.js.map +1 -0
- package/dist/solochain-evm/index.js +4 -0
- package/dist/solochain-evm/index.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-consts.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-consts.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-errors.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-errors.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-events.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-events.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-query.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-query.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-rpc.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-rpc.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-runtime.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-runtime.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-tx.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-tx.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api.js +10 -0
- package/dist/solochain-evm/interfaces/augment-api.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-types.js +6 -0
- package/dist/solochain-evm/interfaces/augment-types.js.map +1 -0
- package/dist/solochain-evm/interfaces/definitions.js +2 -0
- package/dist/solochain-evm/interfaces/definitions.js.map +1 -0
- package/dist/solochain-evm/interfaces/index.js +4 -0
- package/dist/solochain-evm/interfaces/index.js.map +1 -0
- package/dist/solochain-evm/interfaces/lookup.js +3744 -0
- package/dist/solochain-evm/interfaces/lookup.js.map +1 -0
- package/dist/solochain-evm/interfaces/registry.js +6 -0
- package/dist/solochain-evm/interfaces/registry.js.map +1 -0
- package/dist/solochain-evm/interfaces/storagehubclient/definitions.js +7 -0
- package/dist/solochain-evm/interfaces/storagehubclient/definitions.js.map +1 -0
- package/dist/solochain-evm/interfaces/storagehubclient/index.js +4 -0
- package/dist/solochain-evm/interfaces/storagehubclient/index.js.map +1 -0
- package/dist/solochain-evm/interfaces/storagehubclient/types.js +4 -0
- package/dist/solochain-evm/interfaces/storagehubclient/types.js.map +1 -0
- package/dist/solochain-evm/interfaces/types-lookup.js +6 -0
- package/dist/solochain-evm/interfaces/types-lookup.js.map +1 -0
- package/dist/solochain-evm/interfaces/types.js +4 -0
- package/dist/solochain-evm/interfaces/types.js.map +1 -0
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-consts.d.ts +147 -20
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-errors.d.ts +235 -8
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-events.d.ts +542 -118
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-query.d.ts +208 -118
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-rpc.d.ts +61 -4
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-runtime.d.ts +105 -8
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-tx.d.ts +356 -181
- package/dist/types/{interfaces → parachain/interfaces}/augment-types.d.ts +145 -11
- package/dist/types/{interfaces → parachain/interfaces}/lookup.d.ts +1067 -513
- package/dist/types/parachain/interfaces/registry.d.ts +311 -0
- package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/types.d.ts +135 -18
- package/dist/types/{interfaces → parachain/interfaces}/types-lookup.d.ts +1619 -887
- package/dist/types/solochain-evm/interfaces/augment-api-consts.d.ts +641 -0
- package/dist/types/solochain-evm/interfaces/augment-api-errors.d.ts +1260 -0
- package/dist/types/solochain-evm/interfaces/augment-api-events.d.ts +2058 -0
- package/dist/types/solochain-evm/interfaces/augment-api-query.d.ts +1317 -0
- package/dist/types/solochain-evm/interfaces/augment-api-rpc.d.ts +775 -0
- package/dist/types/solochain-evm/interfaces/augment-api-runtime.d.ts +543 -0
- package/dist/types/solochain-evm/interfaces/augment-api-tx.d.ts +2381 -0
- package/dist/types/solochain-evm/interfaces/augment-api.d.ts +7 -0
- package/dist/types/solochain-evm/interfaces/augment-types.d.ts +1419 -0
- package/dist/types/solochain-evm/interfaces/index.d.ts +1 -0
- package/dist/types/solochain-evm/interfaces/lookup.d.ts +3363 -0
- package/dist/types/solochain-evm/interfaces/registry.d.ts +252 -0
- package/dist/types/solochain-evm/interfaces/storagehubclient/definitions.d.ts +6 -0
- package/dist/types/solochain-evm/interfaces/storagehubclient/index.d.ts +1 -0
- package/dist/types/solochain-evm/interfaces/storagehubclient/types.d.ts +325 -0
- package/dist/types/solochain-evm/interfaces/types-lookup.d.ts +3577 -0
- package/dist/types/solochain-evm/interfaces/types.d.ts +1 -0
- package/metadata-sh-parachain.json +5 -0
- package/metadata-sh-solochain-evm.json +5 -0
- package/package.json +41 -26
- package/scripts/scrapeMetadata.ts +41 -29
- package/src/parachain/index.ts +3 -0
- package/src/{interfaces → parachain/interfaces}/augment-api-consts.ts +147 -20
- package/src/{interfaces → parachain/interfaces}/augment-api-errors.ts +235 -8
- package/src/{interfaces → parachain/interfaces}/augment-api-events.ts +527 -137
- package/src/{interfaces → parachain/interfaces}/augment-api-query.ts +272 -145
- package/src/{interfaces → parachain/interfaces}/augment-api-rpc.ts +123 -5
- package/src/{interfaces → parachain/interfaces}/augment-api-runtime.ts +202 -8
- package/src/{interfaces → parachain/interfaces}/augment-api-tx.ts +374 -182
- package/src/{interfaces → parachain/interfaces}/augment-types.ts +280 -12
- package/src/parachain/interfaces/definitions.ts +1 -0
- package/src/{interfaces → parachain/interfaces}/lookup.ts +1497 -813
- package/src/{interfaces → parachain/interfaces}/registry.ts +176 -98
- package/src/parachain/interfaces/storagehubclient/definitions.ts +7 -0
- package/src/{interfaces → parachain/interfaces}/storagehubclient/types.ts +165 -18
- package/src/{interfaces → parachain/interfaces}/types-lookup.ts +1970 -896
- package/src/solochain-evm/index.ts +3 -0
- package/src/solochain-evm/interfaces/augment-api-consts.ts +655 -0
- package/src/solochain-evm/interfaces/augment-api-errors.ts +1268 -0
- package/src/solochain-evm/interfaces/augment-api-events.ts +1813 -0
- package/src/solochain-evm/interfaces/augment-api-query.ts +1838 -0
- package/src/solochain-evm/interfaces/augment-api-rpc.ts +1319 -0
- package/src/solochain-evm/interfaces/augment-api-runtime.ts +977 -0
- package/src/solochain-evm/interfaces/augment-api-tx.ts +2818 -0
- package/src/solochain-evm/interfaces/augment-api.ts +10 -0
- package/src/solochain-evm/interfaces/augment-types.ts +2776 -0
- package/src/solochain-evm/interfaces/definitions.ts +1 -0
- package/src/solochain-evm/interfaces/index.ts +4 -0
- package/src/solochain-evm/interfaces/lookup.ts +3788 -0
- package/src/solochain-evm/interfaces/registry.ts +506 -0
- package/src/solochain-evm/interfaces/storagehubclient/definitions.ts +7 -0
- package/src/solochain-evm/interfaces/storagehubclient/index.ts +4 -0
- package/src/solochain-evm/interfaces/storagehubclient/types.ts +398 -0
- package/src/solochain-evm/interfaces/types-lookup.ts +4616 -0
- package/src/solochain-evm/interfaces/types.ts +4 -0
- package/tsconfig.json +17 -20
- package/tsconfig.parachain.json +17 -0
- package/tsconfig.solochain-evm.json +17 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/dist/index.js.map +0 -1
- package/dist/interfaces/augment-api-consts.js.map +0 -1
- package/dist/interfaces/augment-api-errors.js.map +0 -1
- package/dist/interfaces/augment-api-events.js.map +0 -1
- package/dist/interfaces/augment-api-query.js.map +0 -1
- package/dist/interfaces/augment-api-rpc.js.map +0 -1
- package/dist/interfaces/augment-api-runtime.js.map +0 -1
- package/dist/interfaces/augment-api-tx.js.map +0 -1
- package/dist/interfaces/augment-api.js.map +0 -1
- package/dist/interfaces/augment-types.js.map +0 -1
- package/dist/interfaces/definitions.js.map +0 -1
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/lookup.js.map +0 -1
- package/dist/interfaces/registry.js.map +0 -1
- package/dist/interfaces/storagehubclient/definitions.js +0 -7
- package/dist/interfaces/storagehubclient/definitions.js.map +0 -1
- package/dist/interfaces/storagehubclient/index.js.map +0 -1
- package/dist/interfaces/storagehubclient/runtime.js.map +0 -1
- package/dist/interfaces/storagehubclient/types.js.map +0 -1
- package/dist/interfaces/types-lookup.js.map +0 -1
- package/dist/interfaces/types.js.map +0 -1
- package/dist/types/interfaces/registry.d.ts +0 -272
- package/src/interfaces/storagehubclient/definitions.ts +0 -7
- package/storagehub.json +0 -1
- /package/dist/{index.js → parachain/index.js} +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-consts.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-errors.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-events.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-query.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-rpc.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-runtime.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-tx.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-types.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/definitions.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/index.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/registry.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/storagehubclient/index.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/storagehubclient/runtime.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/storagehubclient/types.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/types-lookup.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/types.js +0 -0
- /package/dist/types/{index.d.ts → parachain/index.d.ts} +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/augment-api.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/definitions.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/index.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/definitions.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/index.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/runtime.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/types.d.ts +0 -0
- /package/{src/index.ts → dist/types/solochain-evm/index.d.ts} +0 -0
- /package/{src/interfaces/definitions.ts → dist/types/solochain-evm/interfaces/definitions.d.ts} +0 -0
- /package/src/{interfaces → parachain/interfaces}/augment-api.ts +0 -0
- /package/src/{interfaces → parachain/interfaces}/index.ts +0 -0
- /package/src/{interfaces → parachain/interfaces}/storagehubclient/index.ts +0 -0
- /package/src/{interfaces → parachain/interfaces}/storagehubclient/runtime.ts +0 -0
- /package/src/{interfaces → parachain/interfaces}/types.ts +0 -0
|
@@ -0,0 +1,2381 @@
|
|
|
1
|
+
import "@polkadot/api-base/types/submittable";
|
|
2
|
+
import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from "@polkadot/api-base/types";
|
|
3
|
+
import type { Bytes, Compact, Option, U256, Vec, bool, u128, u32, u64 } from "@polkadot/types-codec";
|
|
4
|
+
import type { AnyNumber, IMethod, ITuple } from "@polkadot/types-codec/types";
|
|
5
|
+
import type { AccountId20, Call, H160, H256 } from "@polkadot/types/interfaces/runtime";
|
|
6
|
+
import type { EthereumTransactionTransactionV2, FpAccountEthereumSignature, PalletBalancesAdjustmentDirection, PalletFileSystemBucketMoveRequestResponse, PalletFileSystemFileKeyWithProof, PalletFileSystemFileOperationIntention, PalletFileSystemReplicationTarget, PalletFileSystemStorageRequestMspBucketResponse, PalletNftsAttributeNamespace, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletProofsDealerProof, ShSolochainEvmRuntimeConfigsRuntimeParamsRuntimeParameters, ShSolochainEvmRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpSessionMembershipProof, SpTrieStorageProofCompactProof, SpWeightsWeightV2Weight } from "@polkadot/types/lookup";
|
|
7
|
+
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
|
8
|
+
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
|
|
9
|
+
export type __SubmittableExtrinsicFunction<ApiType extends ApiTypes> = SubmittableExtrinsicFunction<ApiType>;
|
|
10
|
+
declare module "@polkadot/api-base/types/submittable" {
|
|
11
|
+
interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
|
12
|
+
babe: {
|
|
13
|
+
/**
|
|
14
|
+
* Plan an epoch config change. The epoch config change is recorded and will be enacted on
|
|
15
|
+
* the next call to `enact_epoch_change`. The config will be activated one epoch after.
|
|
16
|
+
* Multiple calls to this method will replace any existing planned config change that had
|
|
17
|
+
* not been enacted yet.
|
|
18
|
+
**/
|
|
19
|
+
planConfigChange: AugmentedSubmittable<(config: SpConsensusBabeDigestsNextConfigDescriptor | {
|
|
20
|
+
V1: any;
|
|
21
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
22
|
+
SpConsensusBabeDigestsNextConfigDescriptor
|
|
23
|
+
]>;
|
|
24
|
+
/**
|
|
25
|
+
* Report authority equivocation/misbehavior. This method will verify
|
|
26
|
+
* the equivocation proof and validate the given key ownership proof
|
|
27
|
+
* against the extracted offender. If both are valid, the offence will
|
|
28
|
+
* be reported.
|
|
29
|
+
**/
|
|
30
|
+
reportEquivocation: AugmentedSubmittable<(equivocationProof: SpConsensusSlotsEquivocationProof | {
|
|
31
|
+
offender?: any;
|
|
32
|
+
slot?: any;
|
|
33
|
+
firstHeader?: any;
|
|
34
|
+
secondHeader?: any;
|
|
35
|
+
} | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | {
|
|
36
|
+
session?: any;
|
|
37
|
+
trieNodes?: any;
|
|
38
|
+
validatorCount?: any;
|
|
39
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
40
|
+
SpConsensusSlotsEquivocationProof,
|
|
41
|
+
SpSessionMembershipProof
|
|
42
|
+
]>;
|
|
43
|
+
/**
|
|
44
|
+
* Report authority equivocation/misbehavior. This method will verify
|
|
45
|
+
* the equivocation proof and validate the given key ownership proof
|
|
46
|
+
* against the extracted offender. If both are valid, the offence will
|
|
47
|
+
* be reported.
|
|
48
|
+
* This extrinsic must be called unsigned and it is expected that only
|
|
49
|
+
* block authors will call it (validated in `ValidateUnsigned`), as such
|
|
50
|
+
* if the block author is defined it will be defined as the equivocation
|
|
51
|
+
* reporter.
|
|
52
|
+
**/
|
|
53
|
+
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusSlotsEquivocationProof | {
|
|
54
|
+
offender?: any;
|
|
55
|
+
slot?: any;
|
|
56
|
+
firstHeader?: any;
|
|
57
|
+
secondHeader?: any;
|
|
58
|
+
} | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | {
|
|
59
|
+
session?: any;
|
|
60
|
+
trieNodes?: any;
|
|
61
|
+
validatorCount?: any;
|
|
62
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
63
|
+
SpConsensusSlotsEquivocationProof,
|
|
64
|
+
SpSessionMembershipProof
|
|
65
|
+
]>;
|
|
66
|
+
/**
|
|
67
|
+
* Generic tx
|
|
68
|
+
**/
|
|
69
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
70
|
+
};
|
|
71
|
+
balances: {
|
|
72
|
+
/**
|
|
73
|
+
* Burn the specified liquid free balance from the origin account.
|
|
74
|
+
*
|
|
75
|
+
* If the origin's account ends up below the existential deposit as a result
|
|
76
|
+
* of the burn and `keep_alive` is false, the account will be reaped.
|
|
77
|
+
*
|
|
78
|
+
* Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,
|
|
79
|
+
* this `burn` operation will reduce total issuance by the amount _burned_.
|
|
80
|
+
**/
|
|
81
|
+
burn: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, keepAlive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
82
|
+
Compact<u128>,
|
|
83
|
+
bool
|
|
84
|
+
]>;
|
|
85
|
+
/**
|
|
86
|
+
* Adjust the total issuance in a saturating way.
|
|
87
|
+
*
|
|
88
|
+
* Can only be called by root and always needs a positive `delta`.
|
|
89
|
+
*
|
|
90
|
+
* # Example
|
|
91
|
+
**/
|
|
92
|
+
forceAdjustTotalIssuance: AugmentedSubmittable<(direction: PalletBalancesAdjustmentDirection | "Increase" | "Decrease" | number | Uint8Array, delta: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
93
|
+
PalletBalancesAdjustmentDirection,
|
|
94
|
+
Compact<u128>
|
|
95
|
+
]>;
|
|
96
|
+
/**
|
|
97
|
+
* Set the regular balance of a given account.
|
|
98
|
+
*
|
|
99
|
+
* The dispatch origin for this call is `root`.
|
|
100
|
+
**/
|
|
101
|
+
forceSetBalance: AugmentedSubmittable<(who: AccountId20 | string | Uint8Array, newFree: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
102
|
+
AccountId20,
|
|
103
|
+
Compact<u128>
|
|
104
|
+
]>;
|
|
105
|
+
/**
|
|
106
|
+
* Exactly as `transfer_allow_death`, except the origin must be root and the source account
|
|
107
|
+
* may be specified.
|
|
108
|
+
**/
|
|
109
|
+
forceTransfer: AugmentedSubmittable<(source: AccountId20 | string | Uint8Array, dest: AccountId20 | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
110
|
+
AccountId20,
|
|
111
|
+
AccountId20,
|
|
112
|
+
Compact<u128>
|
|
113
|
+
]>;
|
|
114
|
+
/**
|
|
115
|
+
* Unreserve some balance from a user by force.
|
|
116
|
+
*
|
|
117
|
+
* Can only be called by ROOT.
|
|
118
|
+
**/
|
|
119
|
+
forceUnreserve: AugmentedSubmittable<(who: AccountId20 | string | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
120
|
+
AccountId20,
|
|
121
|
+
u128
|
|
122
|
+
]>;
|
|
123
|
+
/**
|
|
124
|
+
* Transfer the entire transferable balance from the caller account.
|
|
125
|
+
*
|
|
126
|
+
* NOTE: This function only attempts to transfer _transferable_ balances. This means that
|
|
127
|
+
* any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be
|
|
128
|
+
* transferred by this function. To ensure that this function results in a killed account,
|
|
129
|
+
* you might need to prepare the account by removing any reference counters, storage
|
|
130
|
+
* deposits, etc...
|
|
131
|
+
*
|
|
132
|
+
* The dispatch origin of this call must be Signed.
|
|
133
|
+
*
|
|
134
|
+
* - `dest`: The recipient of the transfer.
|
|
135
|
+
* - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all
|
|
136
|
+
* of the funds the account has, causing the sender account to be killed (false), or
|
|
137
|
+
* transfer everything except at least the existential deposit, which will guarantee to
|
|
138
|
+
* keep the sender account alive (true).
|
|
139
|
+
**/
|
|
140
|
+
transferAll: AugmentedSubmittable<(dest: AccountId20 | string | Uint8Array, keepAlive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
141
|
+
AccountId20,
|
|
142
|
+
bool
|
|
143
|
+
]>;
|
|
144
|
+
/**
|
|
145
|
+
* Transfer some liquid free balance to another account.
|
|
146
|
+
*
|
|
147
|
+
* `transfer_allow_death` will set the `FreeBalance` of the sender and receiver.
|
|
148
|
+
* If the sender's account is below the existential deposit as a result
|
|
149
|
+
* of the transfer, the account will be reaped.
|
|
150
|
+
*
|
|
151
|
+
* The dispatch origin for this call must be `Signed` by the transactor.
|
|
152
|
+
**/
|
|
153
|
+
transferAllowDeath: AugmentedSubmittable<(dest: AccountId20 | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
154
|
+
AccountId20,
|
|
155
|
+
Compact<u128>
|
|
156
|
+
]>;
|
|
157
|
+
/**
|
|
158
|
+
* Same as the [`transfer_allow_death`] call, but with a check that the transfer will not
|
|
159
|
+
* kill the origin account.
|
|
160
|
+
*
|
|
161
|
+
* 99% of the time you want [`transfer_allow_death`] instead.
|
|
162
|
+
*
|
|
163
|
+
* [`transfer_allow_death`]: struct.Pallet.html#method.transfer
|
|
164
|
+
**/
|
|
165
|
+
transferKeepAlive: AugmentedSubmittable<(dest: AccountId20 | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
166
|
+
AccountId20,
|
|
167
|
+
Compact<u128>
|
|
168
|
+
]>;
|
|
169
|
+
/**
|
|
170
|
+
* Upgrade a specified account.
|
|
171
|
+
*
|
|
172
|
+
* - `origin`: Must be `Signed`.
|
|
173
|
+
* - `who`: The account to be upgraded.
|
|
174
|
+
*
|
|
175
|
+
* This will waive the transaction fee if at least all but 10% of the accounts needed to
|
|
176
|
+
* be upgraded. (We let some not have to be upgraded just in order to allow for the
|
|
177
|
+
* possibility of churn).
|
|
178
|
+
**/
|
|
179
|
+
upgradeAccounts: AugmentedSubmittable<(who: Vec<AccountId20> | (AccountId20 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
|
|
180
|
+
Vec<AccountId20>
|
|
181
|
+
]>;
|
|
182
|
+
/**
|
|
183
|
+
* Generic tx
|
|
184
|
+
**/
|
|
185
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
186
|
+
};
|
|
187
|
+
bucketNfts: {
|
|
188
|
+
/**
|
|
189
|
+
* Share access to files within a bucket with another account.
|
|
190
|
+
*
|
|
191
|
+
* 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.
|
|
192
|
+
**/
|
|
193
|
+
shareAccess: AugmentedSubmittable<(recipient: AccountId20 | string | Uint8Array, bucket: H256 | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, readAccessRegex: Option<Bytes> | null | Uint8Array | Bytes | string) => SubmittableExtrinsic<ApiType>, [
|
|
194
|
+
AccountId20,
|
|
195
|
+
H256,
|
|
196
|
+
u32,
|
|
197
|
+
Option<Bytes>
|
|
198
|
+
]>;
|
|
199
|
+
/**
|
|
200
|
+
* Update read access for an item.
|
|
201
|
+
**/
|
|
202
|
+
updateReadAccess: AugmentedSubmittable<(bucket: H256 | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, readAccessRegex: Option<Bytes> | null | Uint8Array | Bytes | string) => SubmittableExtrinsic<ApiType>, [
|
|
203
|
+
H256,
|
|
204
|
+
u32,
|
|
205
|
+
Option<Bytes>
|
|
206
|
+
]>;
|
|
207
|
+
/**
|
|
208
|
+
* Generic tx
|
|
209
|
+
**/
|
|
210
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
211
|
+
};
|
|
212
|
+
ethereum: {
|
|
213
|
+
/**
|
|
214
|
+
* Transact an Ethereum transaction.
|
|
215
|
+
**/
|
|
216
|
+
transact: AugmentedSubmittable<(transaction: EthereumTransactionTransactionV2 | {
|
|
217
|
+
Legacy: any;
|
|
218
|
+
} | {
|
|
219
|
+
EIP2930: any;
|
|
220
|
+
} | {
|
|
221
|
+
EIP1559: any;
|
|
222
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
223
|
+
EthereumTransactionTransactionV2
|
|
224
|
+
]>;
|
|
225
|
+
/**
|
|
226
|
+
* Generic tx
|
|
227
|
+
**/
|
|
228
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
229
|
+
};
|
|
230
|
+
evm: {
|
|
231
|
+
/**
|
|
232
|
+
* Issue an EVM call operation. This is similar to a message call transaction in Ethereum.
|
|
233
|
+
**/
|
|
234
|
+
call: AugmentedSubmittable<(source: H160 | string | Uint8Array, target: H160 | string | Uint8Array, input: Bytes | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, maxFeePerGas: U256 | AnyNumber | Uint8Array, maxPriorityFeePerGas: Option<U256> | null | Uint8Array | U256 | AnyNumber, nonce: Option<U256> | null | Uint8Array | U256 | AnyNumber, accessList: Vec<ITuple<[H160, Vec<H256>]>> | [H160 | string | Uint8Array, Vec<H256> | (H256 | string | Uint8Array)[]][]) => SubmittableExtrinsic<ApiType>, [
|
|
235
|
+
H160,
|
|
236
|
+
H160,
|
|
237
|
+
Bytes,
|
|
238
|
+
U256,
|
|
239
|
+
u64,
|
|
240
|
+
U256,
|
|
241
|
+
Option<U256>,
|
|
242
|
+
Option<U256>,
|
|
243
|
+
Vec<ITuple<[H160, Vec<H256>]>>
|
|
244
|
+
]>;
|
|
245
|
+
/**
|
|
246
|
+
* Issue an EVM create operation. This is similar to a contract creation transaction in
|
|
247
|
+
* Ethereum.
|
|
248
|
+
**/
|
|
249
|
+
create: AugmentedSubmittable<(source: H160 | string | Uint8Array, init: Bytes | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, maxFeePerGas: U256 | AnyNumber | Uint8Array, maxPriorityFeePerGas: Option<U256> | null | Uint8Array | U256 | AnyNumber, nonce: Option<U256> | null | Uint8Array | U256 | AnyNumber, accessList: Vec<ITuple<[H160, Vec<H256>]>> | [H160 | string | Uint8Array, Vec<H256> | (H256 | string | Uint8Array)[]][]) => SubmittableExtrinsic<ApiType>, [
|
|
250
|
+
H160,
|
|
251
|
+
Bytes,
|
|
252
|
+
U256,
|
|
253
|
+
u64,
|
|
254
|
+
U256,
|
|
255
|
+
Option<U256>,
|
|
256
|
+
Option<U256>,
|
|
257
|
+
Vec<ITuple<[H160, Vec<H256>]>>
|
|
258
|
+
]>;
|
|
259
|
+
/**
|
|
260
|
+
* Issue an EVM create2 operation.
|
|
261
|
+
**/
|
|
262
|
+
create2: AugmentedSubmittable<(source: H160 | string | Uint8Array, init: Bytes | string | Uint8Array, salt: H256 | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, maxFeePerGas: U256 | AnyNumber | Uint8Array, maxPriorityFeePerGas: Option<U256> | null | Uint8Array | U256 | AnyNumber, nonce: Option<U256> | null | Uint8Array | U256 | AnyNumber, accessList: Vec<ITuple<[H160, Vec<H256>]>> | [H160 | string | Uint8Array, Vec<H256> | (H256 | string | Uint8Array)[]][]) => SubmittableExtrinsic<ApiType>, [
|
|
263
|
+
H160,
|
|
264
|
+
Bytes,
|
|
265
|
+
H256,
|
|
266
|
+
U256,
|
|
267
|
+
u64,
|
|
268
|
+
U256,
|
|
269
|
+
Option<U256>,
|
|
270
|
+
Option<U256>,
|
|
271
|
+
Vec<ITuple<[H160, Vec<H256>]>>
|
|
272
|
+
]>;
|
|
273
|
+
/**
|
|
274
|
+
* Withdraw balance from EVM into currency/balances pallet.
|
|
275
|
+
**/
|
|
276
|
+
withdraw: AugmentedSubmittable<(address: H160 | string | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
277
|
+
H160,
|
|
278
|
+
u128
|
|
279
|
+
]>;
|
|
280
|
+
/**
|
|
281
|
+
* Generic tx
|
|
282
|
+
**/
|
|
283
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
284
|
+
};
|
|
285
|
+
fileSystem: {
|
|
286
|
+
/**
|
|
287
|
+
* Executed by a BSP to confirm to stop storing a file.
|
|
288
|
+
*
|
|
289
|
+
* It has to have previously opened a pending stop storing request using the `bsp_request_stop_storing` extrinsic.
|
|
290
|
+
* The minimum amount of blocks between the request and the confirmation is defined by the runtime, such that the
|
|
291
|
+
* BSP can't immediately stop storing a file it has previously lost when receiving a challenge for it.
|
|
292
|
+
**/
|
|
293
|
+
bspConfirmStopStoring: AugmentedSubmittable<(fileKey: H256 | string | Uint8Array, inclusionForestProof: SpTrieStorageProofCompactProof | {
|
|
294
|
+
encodedNodes?: any;
|
|
295
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
296
|
+
H256,
|
|
297
|
+
SpTrieStorageProofCompactProof
|
|
298
|
+
]>;
|
|
299
|
+
/**
|
|
300
|
+
* Used by a BSP to confirm they are storing data of a storage request.
|
|
301
|
+
**/
|
|
302
|
+
bspConfirmStoring: AugmentedSubmittable<(nonInclusionForestProof: SpTrieStorageProofCompactProof | {
|
|
303
|
+
encodedNodes?: any;
|
|
304
|
+
} | string | Uint8Array, fileKeysAndProofs: Vec<PalletFileSystemFileKeyWithProof> | (PalletFileSystemFileKeyWithProof | {
|
|
305
|
+
fileKey?: any;
|
|
306
|
+
proof?: any;
|
|
307
|
+
} | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
|
|
308
|
+
SpTrieStorageProofCompactProof,
|
|
309
|
+
Vec<PalletFileSystemFileKeyWithProof>
|
|
310
|
+
]>;
|
|
311
|
+
/**
|
|
312
|
+
* Executed by a BSP to request to stop storing a file.
|
|
313
|
+
*
|
|
314
|
+
* In the event when a storage request no longer exists for the data the BSP no longer stores,
|
|
315
|
+
* it is required that the BSP still has access to the metadata of the initial storage request.
|
|
316
|
+
* If they do not, they will at least need that metadata to reconstruct the File ID and from wherever
|
|
317
|
+
* the BSP gets that data is up to it. One example could be from the assigned MSP.
|
|
318
|
+
* This metadata is necessary since it is needed to reconstruct the leaf node key in the storage
|
|
319
|
+
* provider's Merkle Forest.
|
|
320
|
+
**/
|
|
321
|
+
bspRequestStopStoring: AugmentedSubmittable<(fileKey: H256 | string | Uint8Array, bucketId: H256 | string | Uint8Array, location: Bytes | string | Uint8Array, owner: AccountId20 | string | Uint8Array, fingerprint: H256 | string | Uint8Array, size: u64 | AnyNumber | Uint8Array, canServe: bool | boolean | Uint8Array, inclusionForestProof: SpTrieStorageProofCompactProof | {
|
|
322
|
+
encodedNodes?: any;
|
|
323
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
324
|
+
H256,
|
|
325
|
+
H256,
|
|
326
|
+
Bytes,
|
|
327
|
+
AccountId20,
|
|
328
|
+
H256,
|
|
329
|
+
u64,
|
|
330
|
+
bool,
|
|
331
|
+
SpTrieStorageProofCompactProof
|
|
332
|
+
]>;
|
|
333
|
+
/**
|
|
334
|
+
* Used by a BSP to volunteer for storing a file.
|
|
335
|
+
*
|
|
336
|
+
* The transaction will fail if the XOR between the file ID and the BSP ID is not below the threshold,
|
|
337
|
+
* so a BSP is strongly advised to check beforehand. Another reason for failure is
|
|
338
|
+
* if the maximum number of BSPs has been reached. A successful assignment as BSP means
|
|
339
|
+
* that some of the collateral tokens of that MSP are frozen.
|
|
340
|
+
**/
|
|
341
|
+
bspVolunteer: AugmentedSubmittable<(fileKey: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
342
|
+
H256
|
|
343
|
+
]>;
|
|
344
|
+
/**
|
|
345
|
+
* Create and associate a collection with a bucket.
|
|
346
|
+
**/
|
|
347
|
+
createAndAssociateCollectionWithBucket: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
348
|
+
H256
|
|
349
|
+
]>;
|
|
350
|
+
createBucket: AugmentedSubmittable<(mspId: H256 | string | Uint8Array, name: Bytes | string | Uint8Array, private: bool | boolean | Uint8Array, valuePropId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
351
|
+
H256,
|
|
352
|
+
Bytes,
|
|
353
|
+
bool,
|
|
354
|
+
H256
|
|
355
|
+
]>;
|
|
356
|
+
/**
|
|
357
|
+
* Dispatchable extrinsic that allows a User to delete any of their buckets if it is currently empty.
|
|
358
|
+
* This way, the User is allowed to remove now unused buckets to recover their deposit for them.
|
|
359
|
+
*
|
|
360
|
+
* The User must provide the BucketId of the bucket they want to delete, which should correspond to a
|
|
361
|
+
* bucket that is both theirs and currently empty.
|
|
362
|
+
*
|
|
363
|
+
* To check if a bucket is empty, we compare its current root with the one of an empty trie.
|
|
364
|
+
**/
|
|
365
|
+
deleteBucket: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
366
|
+
H256
|
|
367
|
+
]>;
|
|
368
|
+
/**
|
|
369
|
+
* Deletes a file from a provider's forest, changing its root
|
|
370
|
+
*
|
|
371
|
+
* This extrinsic allows any actor to execute file deletion based on signed intentions
|
|
372
|
+
* from the `FileDeletionRequested` event. It requires a valid forest proof showing that the
|
|
373
|
+
* file exists in the specified provider's forest before allowing deletion.
|
|
374
|
+
*
|
|
375
|
+
* If `bsp_id` is `None`, the file will be deleted from the bucket forest.
|
|
376
|
+
* If `bsp_id` is `Some(id)`, the file will be deleted from the specified BSP's forest.
|
|
377
|
+
**/
|
|
378
|
+
deleteFile: AugmentedSubmittable<(fileOwner: AccountId20 | string | Uint8Array, signedIntention: PalletFileSystemFileOperationIntention | {
|
|
379
|
+
fileKey?: any;
|
|
380
|
+
operation?: any;
|
|
381
|
+
} | string | Uint8Array, signature: FpAccountEthereumSignature | string | Uint8Array, bucketId: H256 | string | Uint8Array, location: Bytes | string | Uint8Array, size: u64 | AnyNumber | Uint8Array, fingerprint: H256 | string | Uint8Array, bspId: Option<H256> | null | Uint8Array | H256 | string, forestProof: SpTrieStorageProofCompactProof | {
|
|
382
|
+
encodedNodes?: any;
|
|
383
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
384
|
+
AccountId20,
|
|
385
|
+
PalletFileSystemFileOperationIntention,
|
|
386
|
+
FpAccountEthereumSignature,
|
|
387
|
+
H256,
|
|
388
|
+
Bytes,
|
|
389
|
+
u64,
|
|
390
|
+
H256,
|
|
391
|
+
Option<H256>,
|
|
392
|
+
SpTrieStorageProofCompactProof
|
|
393
|
+
]>;
|
|
394
|
+
/**
|
|
395
|
+
* Delete a file from an incomplete (rejected, expired or revoked) storage request.
|
|
396
|
+
*
|
|
397
|
+
* This extrinsic allows fisherman nodes to delete files from providers when an IncompleteStorageRequestMetadata for the given file_key
|
|
398
|
+
* exist in the IncompleteStorageRequests mapping. It validates that the IncompleteStorageRequestMetadata exists,
|
|
399
|
+
* that the provider has the file in its Merkle Patricia Forest, and verifies the file key matches the metadata.
|
|
400
|
+
**/
|
|
401
|
+
deleteFileForIncompleteStorageRequest: AugmentedSubmittable<(fileKey: H256 | string | Uint8Array, bspId: Option<H256> | null | Uint8Array | H256 | string, forestProof: SpTrieStorageProofCompactProof | {
|
|
402
|
+
encodedNodes?: any;
|
|
403
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
404
|
+
H256,
|
|
405
|
+
Option<H256>,
|
|
406
|
+
SpTrieStorageProofCompactProof
|
|
407
|
+
]>;
|
|
408
|
+
/**
|
|
409
|
+
* Issue a new storage request for a file
|
|
410
|
+
**/
|
|
411
|
+
issueStorageRequest: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array, location: Bytes | string | Uint8Array, fingerprint: H256 | string | Uint8Array, size: u64 | AnyNumber | Uint8Array, mspId: H256 | string | Uint8Array, peerIds: Vec<Bytes> | (Bytes | string | Uint8Array)[], replicationTarget: PalletFileSystemReplicationTarget | {
|
|
412
|
+
Basic: any;
|
|
413
|
+
} | {
|
|
414
|
+
Standard: any;
|
|
415
|
+
} | {
|
|
416
|
+
HighSecurity: any;
|
|
417
|
+
} | {
|
|
418
|
+
SuperHighSecurity: any;
|
|
419
|
+
} | {
|
|
420
|
+
UltraHighSecurity: any;
|
|
421
|
+
} | {
|
|
422
|
+
Custom: any;
|
|
423
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
424
|
+
H256,
|
|
425
|
+
Bytes,
|
|
426
|
+
H256,
|
|
427
|
+
u64,
|
|
428
|
+
H256,
|
|
429
|
+
Vec<Bytes>,
|
|
430
|
+
PalletFileSystemReplicationTarget
|
|
431
|
+
]>;
|
|
432
|
+
mspRespondMoveBucketRequest: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array, response: PalletFileSystemBucketMoveRequestResponse | "Accepted" | "Rejected" | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
433
|
+
H256,
|
|
434
|
+
PalletFileSystemBucketMoveRequestResponse
|
|
435
|
+
]>;
|
|
436
|
+
/**
|
|
437
|
+
* Used by a MSP to accept or decline storage requests in batches, grouped by bucket.
|
|
438
|
+
*
|
|
439
|
+
* This follows a best-effort strategy, meaning that all file keys will be processed and declared to have successfully be
|
|
440
|
+
* accepted, rejected or have failed to be processed in the results of the event emitted.
|
|
441
|
+
*
|
|
442
|
+
* 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
|
|
443
|
+
* in the bucket's Merkle Patricia Forest. The file proofs for the file keys is necessary to verify that
|
|
444
|
+
* the MSP actually has the files, while the non-inclusion proof is necessary to verify that the MSP
|
|
445
|
+
* wasn't storing it before.
|
|
446
|
+
**/
|
|
447
|
+
mspRespondStorageRequestsMultipleBuckets: AugmentedSubmittable<(storageRequestMspResponse: Vec<PalletFileSystemStorageRequestMspBucketResponse> | (PalletFileSystemStorageRequestMspBucketResponse | {
|
|
448
|
+
bucketId?: any;
|
|
449
|
+
accept?: any;
|
|
450
|
+
reject?: any;
|
|
451
|
+
} | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
|
|
452
|
+
Vec<PalletFileSystemStorageRequestMspBucketResponse>
|
|
453
|
+
]>;
|
|
454
|
+
mspStopStoringBucket: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
455
|
+
H256
|
|
456
|
+
]>;
|
|
457
|
+
/**
|
|
458
|
+
* Executed by a MSP to stop storing a bucket from an insolvent user.
|
|
459
|
+
*
|
|
460
|
+
* This is used when a user has become insolvent and the MSP needs to stop storing the buckets of that user, since
|
|
461
|
+
* it won't be getting paid for them anymore.
|
|
462
|
+
* It validates that:
|
|
463
|
+
* - The sender is the MSP that's currently storing the bucket, and the bucket exists.
|
|
464
|
+
* - That the user is currently insolvent OR
|
|
465
|
+
* - That the payment stream between the MSP and user doesn't exist (which would occur as a consequence of the MSP previously
|
|
466
|
+
* having deleted another bucket it was storing for this user through this extrinsic).
|
|
467
|
+
* And then completely removes the bucket from the system.
|
|
468
|
+
*
|
|
469
|
+
* If there was a storage request pending for the bucket, it will eventually expire without being fulfilled (because the MSP can't
|
|
470
|
+
* accept storage requests for insolvent users and BSPs can't volunteer nor confirm them either) and afterwards any BSPs that
|
|
471
|
+
* had confirmed the file can just call `sp_stop_storing_for_insolvent_user` to get rid of it.
|
|
472
|
+
**/
|
|
473
|
+
mspStopStoringBucketForInsolventUser: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
474
|
+
H256
|
|
475
|
+
]>;
|
|
476
|
+
/**
|
|
477
|
+
* Request deletion of a file using a signed delete intention.
|
|
478
|
+
*
|
|
479
|
+
* The origin must be signed and the signature must be valid for the given delete intention.
|
|
480
|
+
* The delete intention must contain the file key and the delete operation.
|
|
481
|
+
* File metadata is provided separately for ownership verification.
|
|
482
|
+
**/
|
|
483
|
+
requestDeleteFile: AugmentedSubmittable<(signedIntention: PalletFileSystemFileOperationIntention | {
|
|
484
|
+
fileKey?: any;
|
|
485
|
+
operation?: any;
|
|
486
|
+
} | string | Uint8Array, signature: FpAccountEthereumSignature | string | Uint8Array, bucketId: H256 | string | Uint8Array, location: Bytes | string | Uint8Array, size: u64 | AnyNumber | Uint8Array, fingerprint: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
487
|
+
PalletFileSystemFileOperationIntention,
|
|
488
|
+
FpAccountEthereumSignature,
|
|
489
|
+
H256,
|
|
490
|
+
Bytes,
|
|
491
|
+
u64,
|
|
492
|
+
H256
|
|
493
|
+
]>;
|
|
494
|
+
requestMoveBucket: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array, newMspId: H256 | string | Uint8Array, newValuePropId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
495
|
+
H256,
|
|
496
|
+
H256,
|
|
497
|
+
H256
|
|
498
|
+
]>;
|
|
499
|
+
/**
|
|
500
|
+
* Revoke storage request
|
|
501
|
+
**/
|
|
502
|
+
revokeStorageRequest: AugmentedSubmittable<(fileKey: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
503
|
+
H256
|
|
504
|
+
]>;
|
|
505
|
+
/**
|
|
506
|
+
* Executed by a SP to stop storing a file from an insolvent user.
|
|
507
|
+
*
|
|
508
|
+
* This is used when a user has become insolvent and the SP needs to stop storing the files of that user, since
|
|
509
|
+
* it won't be getting paid for it anymore.
|
|
510
|
+
* 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
|
|
511
|
+
* wait for a minimum amount of blocks to confirm to stop storing the file nor it has to be a BSP.
|
|
512
|
+
**/
|
|
513
|
+
stopStoringForInsolventUser: AugmentedSubmittable<(fileKey: H256 | string | Uint8Array, bucketId: H256 | string | Uint8Array, location: Bytes | string | Uint8Array, owner: AccountId20 | string | Uint8Array, fingerprint: H256 | string | Uint8Array, size: u64 | AnyNumber | Uint8Array, inclusionForestProof: SpTrieStorageProofCompactProof | {
|
|
514
|
+
encodedNodes?: any;
|
|
515
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
516
|
+
H256,
|
|
517
|
+
H256,
|
|
518
|
+
Bytes,
|
|
519
|
+
AccountId20,
|
|
520
|
+
H256,
|
|
521
|
+
u64,
|
|
522
|
+
SpTrieStorageProofCompactProof
|
|
523
|
+
]>;
|
|
524
|
+
updateBucketPrivacy: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array, private: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
525
|
+
H256,
|
|
526
|
+
bool
|
|
527
|
+
]>;
|
|
528
|
+
/**
|
|
529
|
+
* Generic tx
|
|
530
|
+
**/
|
|
531
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
532
|
+
};
|
|
533
|
+
grandpa: {
|
|
534
|
+
/**
|
|
535
|
+
* Note that the current authority set of the GRANDPA finality gadget has stalled.
|
|
536
|
+
*
|
|
537
|
+
* This will trigger a forced authority set change at the beginning of the next session, to
|
|
538
|
+
* be enacted `delay` blocks after that. The `delay` should be high enough to safely assume
|
|
539
|
+
* that the block signalling the forced change will not be re-orged e.g. 1000 blocks.
|
|
540
|
+
* The block production rate (which may be slowed down because of finality lagging) should
|
|
541
|
+
* be taken into account when choosing the `delay`. The GRANDPA voters based on the new
|
|
542
|
+
* authority will start voting on top of `best_finalized_block_number` for new finalized
|
|
543
|
+
* blocks. `best_finalized_block_number` should be the highest of the latest finalized
|
|
544
|
+
* block of all validators of the new authority set.
|
|
545
|
+
*
|
|
546
|
+
* Only callable by root.
|
|
547
|
+
**/
|
|
548
|
+
noteStalled: AugmentedSubmittable<(delay: u32 | AnyNumber | Uint8Array, bestFinalizedBlockNumber: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
549
|
+
u32,
|
|
550
|
+
u32
|
|
551
|
+
]>;
|
|
552
|
+
/**
|
|
553
|
+
* Report voter equivocation/misbehavior. This method will verify the
|
|
554
|
+
* equivocation proof and validate the given key ownership proof
|
|
555
|
+
* against the extracted offender. If both are valid, the offence
|
|
556
|
+
* will be reported.
|
|
557
|
+
**/
|
|
558
|
+
reportEquivocation: AugmentedSubmittable<(equivocationProof: SpConsensusGrandpaEquivocationProof | {
|
|
559
|
+
setId?: any;
|
|
560
|
+
equivocation?: any;
|
|
561
|
+
} | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | {
|
|
562
|
+
session?: any;
|
|
563
|
+
trieNodes?: any;
|
|
564
|
+
validatorCount?: any;
|
|
565
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
566
|
+
SpConsensusGrandpaEquivocationProof,
|
|
567
|
+
SpSessionMembershipProof
|
|
568
|
+
]>;
|
|
569
|
+
/**
|
|
570
|
+
* Report voter equivocation/misbehavior. This method will verify the
|
|
571
|
+
* equivocation proof and validate the given key ownership proof
|
|
572
|
+
* against the extracted offender. If both are valid, the offence
|
|
573
|
+
* will be reported.
|
|
574
|
+
*
|
|
575
|
+
* This extrinsic must be called unsigned and it is expected that only
|
|
576
|
+
* block authors will call it (validated in `ValidateUnsigned`), as such
|
|
577
|
+
* if the block author is defined it will be defined as the equivocation
|
|
578
|
+
* reporter.
|
|
579
|
+
**/
|
|
580
|
+
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusGrandpaEquivocationProof | {
|
|
581
|
+
setId?: any;
|
|
582
|
+
equivocation?: any;
|
|
583
|
+
} | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | {
|
|
584
|
+
session?: any;
|
|
585
|
+
trieNodes?: any;
|
|
586
|
+
validatorCount?: any;
|
|
587
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
588
|
+
SpConsensusGrandpaEquivocationProof,
|
|
589
|
+
SpSessionMembershipProof
|
|
590
|
+
]>;
|
|
591
|
+
/**
|
|
592
|
+
* Generic tx
|
|
593
|
+
**/
|
|
594
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
595
|
+
};
|
|
596
|
+
nfts: {
|
|
597
|
+
/**
|
|
598
|
+
* Approve item's attributes to be changed by a delegated third-party account.
|
|
599
|
+
*
|
|
600
|
+
* Origin must be Signed and must be an owner of the `item`.
|
|
601
|
+
*
|
|
602
|
+
* - `collection`: A collection of the item.
|
|
603
|
+
* - `item`: The item that holds attributes.
|
|
604
|
+
* - `delegate`: The account to delegate permission to change attributes of the item.
|
|
605
|
+
*
|
|
606
|
+
* Emits `ItemAttributesApprovalAdded` on success.
|
|
607
|
+
**/
|
|
608
|
+
approveItemAttributes: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, delegate: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
609
|
+
u32,
|
|
610
|
+
u32,
|
|
611
|
+
AccountId20
|
|
612
|
+
]>;
|
|
613
|
+
/**
|
|
614
|
+
* Approve an item to be transferred by a delegated third-party account.
|
|
615
|
+
*
|
|
616
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the
|
|
617
|
+
* `item`.
|
|
618
|
+
*
|
|
619
|
+
* - `collection`: The collection of the item to be approved for delegated transfer.
|
|
620
|
+
* - `item`: The item to be approved for delegated transfer.
|
|
621
|
+
* - `delegate`: The account to delegate permission to transfer the item.
|
|
622
|
+
* - `maybe_deadline`: Optional deadline for the approval. Specified by providing the
|
|
623
|
+
* number of blocks after which the approval will expire
|
|
624
|
+
*
|
|
625
|
+
* Emits `TransferApproved` on success.
|
|
626
|
+
*
|
|
627
|
+
* Weight: `O(1)`
|
|
628
|
+
**/
|
|
629
|
+
approveTransfer: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, delegate: AccountId20 | string | Uint8Array, maybeDeadline: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [
|
|
630
|
+
u32,
|
|
631
|
+
u32,
|
|
632
|
+
AccountId20,
|
|
633
|
+
Option<u32>
|
|
634
|
+
]>;
|
|
635
|
+
/**
|
|
636
|
+
* Destroy a single item.
|
|
637
|
+
*
|
|
638
|
+
* The origin must conform to `ForceOrigin` or must be Signed and the signing account must
|
|
639
|
+
* be the owner of the `item`.
|
|
640
|
+
*
|
|
641
|
+
* - `collection`: The collection of the item to be burned.
|
|
642
|
+
* - `item`: The item to be burned.
|
|
643
|
+
*
|
|
644
|
+
* Emits `Burned`.
|
|
645
|
+
*
|
|
646
|
+
* Weight: `O(1)`
|
|
647
|
+
**/
|
|
648
|
+
burn: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
649
|
+
u32,
|
|
650
|
+
u32
|
|
651
|
+
]>;
|
|
652
|
+
/**
|
|
653
|
+
* Allows to buy an item if it's up for sale.
|
|
654
|
+
*
|
|
655
|
+
* Origin must be Signed and must not be the owner of the `item`.
|
|
656
|
+
*
|
|
657
|
+
* - `collection`: The collection of the item.
|
|
658
|
+
* - `item`: The item the sender wants to buy.
|
|
659
|
+
* - `bid_price`: The price the sender is willing to pay.
|
|
660
|
+
*
|
|
661
|
+
* Emits `ItemBought` on success.
|
|
662
|
+
**/
|
|
663
|
+
buyItem: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, bidPrice: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
664
|
+
u32,
|
|
665
|
+
u32,
|
|
666
|
+
u128
|
|
667
|
+
]>;
|
|
668
|
+
/**
|
|
669
|
+
* Cancel one of the transfer approvals for a specific item.
|
|
670
|
+
*
|
|
671
|
+
* Origin must be either:
|
|
672
|
+
* - the `Force` origin;
|
|
673
|
+
* - `Signed` with the signer being the Owner of the `item`;
|
|
674
|
+
*
|
|
675
|
+
* Arguments:
|
|
676
|
+
* - `collection`: The collection of the item of whose approval will be cancelled.
|
|
677
|
+
* - `item`: The item of the collection of whose approval will be cancelled.
|
|
678
|
+
* - `delegate`: The account that is going to loose their approval.
|
|
679
|
+
*
|
|
680
|
+
* Emits `ApprovalCancelled` on success.
|
|
681
|
+
*
|
|
682
|
+
* Weight: `O(1)`
|
|
683
|
+
**/
|
|
684
|
+
cancelApproval: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, delegate: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
685
|
+
u32,
|
|
686
|
+
u32,
|
|
687
|
+
AccountId20
|
|
688
|
+
]>;
|
|
689
|
+
/**
|
|
690
|
+
* Cancel the previously provided approval to change item's attributes.
|
|
691
|
+
* All the previously set attributes by the `delegate` will be removed.
|
|
692
|
+
*
|
|
693
|
+
* Origin must be Signed and must be an owner of the `item`.
|
|
694
|
+
*
|
|
695
|
+
* - `collection`: Collection that the item is contained within.
|
|
696
|
+
* - `item`: The item that holds attributes.
|
|
697
|
+
* - `delegate`: The previously approved account to remove.
|
|
698
|
+
*
|
|
699
|
+
* Emits `ItemAttributesApprovalRemoved` on success.
|
|
700
|
+
**/
|
|
701
|
+
cancelItemAttributesApproval: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, delegate: AccountId20 | string | Uint8Array, witness: PalletNftsCancelAttributesApprovalWitness | {
|
|
702
|
+
accountAttributes?: any;
|
|
703
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
704
|
+
u32,
|
|
705
|
+
u32,
|
|
706
|
+
AccountId20,
|
|
707
|
+
PalletNftsCancelAttributesApprovalWitness
|
|
708
|
+
]>;
|
|
709
|
+
/**
|
|
710
|
+
* Cancel an atomic swap.
|
|
711
|
+
*
|
|
712
|
+
* Origin must be Signed.
|
|
713
|
+
* Origin must be an owner of the `item` if the deadline hasn't expired.
|
|
714
|
+
*
|
|
715
|
+
* - `collection`: The collection of the item.
|
|
716
|
+
* - `item`: The item an owner wants to give.
|
|
717
|
+
*
|
|
718
|
+
* Emits `SwapCancelled` on success.
|
|
719
|
+
**/
|
|
720
|
+
cancelSwap: AugmentedSubmittable<(offeredCollection: u32 | AnyNumber | Uint8Array, offeredItem: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
721
|
+
u32,
|
|
722
|
+
u32
|
|
723
|
+
]>;
|
|
724
|
+
/**
|
|
725
|
+
* Claim an atomic swap.
|
|
726
|
+
* This method executes a pending swap, that was created by a counterpart before.
|
|
727
|
+
*
|
|
728
|
+
* Origin must be Signed and must be an owner of the `item`.
|
|
729
|
+
*
|
|
730
|
+
* - `send_collection`: The collection of the item to be sent.
|
|
731
|
+
* - `send_item`: The item to be sent.
|
|
732
|
+
* - `receive_collection`: The collection of the item to be received.
|
|
733
|
+
* - `receive_item`: The item to be received.
|
|
734
|
+
* - `witness_price`: A price that was previously agreed on.
|
|
735
|
+
*
|
|
736
|
+
* Emits `SwapClaimed` on success.
|
|
737
|
+
**/
|
|
738
|
+
claimSwap: AugmentedSubmittable<(sendCollection: u32 | AnyNumber | Uint8Array, sendItem: u32 | AnyNumber | Uint8Array, receiveCollection: u32 | AnyNumber | Uint8Array, receiveItem: u32 | AnyNumber | Uint8Array, witnessPrice: Option<PalletNftsPriceWithDirection> | null | Uint8Array | PalletNftsPriceWithDirection | {
|
|
739
|
+
amount?: any;
|
|
740
|
+
direction?: any;
|
|
741
|
+
} | string) => SubmittableExtrinsic<ApiType>, [
|
|
742
|
+
u32,
|
|
743
|
+
u32,
|
|
744
|
+
u32,
|
|
745
|
+
u32,
|
|
746
|
+
Option<PalletNftsPriceWithDirection>
|
|
747
|
+
]>;
|
|
748
|
+
/**
|
|
749
|
+
* Cancel all the approvals of a specific item.
|
|
750
|
+
*
|
|
751
|
+
* Origin must be either:
|
|
752
|
+
* - the `Force` origin;
|
|
753
|
+
* - `Signed` with the signer being the Owner of the `item`;
|
|
754
|
+
*
|
|
755
|
+
* Arguments:
|
|
756
|
+
* - `collection`: The collection of the item of whose approvals will be cleared.
|
|
757
|
+
* - `item`: The item of the collection of whose approvals will be cleared.
|
|
758
|
+
*
|
|
759
|
+
* Emits `AllApprovalsCancelled` on success.
|
|
760
|
+
*
|
|
761
|
+
* Weight: `O(1)`
|
|
762
|
+
**/
|
|
763
|
+
clearAllTransferApprovals: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
764
|
+
u32,
|
|
765
|
+
u32
|
|
766
|
+
]>;
|
|
767
|
+
/**
|
|
768
|
+
* Clear an attribute for a collection or item.
|
|
769
|
+
*
|
|
770
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the
|
|
771
|
+
* attribute.
|
|
772
|
+
*
|
|
773
|
+
* Any deposit is freed for the collection's owner.
|
|
774
|
+
*
|
|
775
|
+
* - `collection`: The identifier of the collection whose item's metadata to clear.
|
|
776
|
+
* - `maybe_item`: The identifier of the item whose metadata to clear.
|
|
777
|
+
* - `namespace`: Attribute's namespace.
|
|
778
|
+
* - `key`: The key of the attribute.
|
|
779
|
+
*
|
|
780
|
+
* Emits `AttributeCleared`.
|
|
781
|
+
*
|
|
782
|
+
* Weight: `O(1)`
|
|
783
|
+
**/
|
|
784
|
+
clearAttribute: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, maybeItem: Option<u32> | null | Uint8Array | u32 | AnyNumber, namespace: PalletNftsAttributeNamespace | {
|
|
785
|
+
Pallet: any;
|
|
786
|
+
} | {
|
|
787
|
+
CollectionOwner: any;
|
|
788
|
+
} | {
|
|
789
|
+
ItemOwner: any;
|
|
790
|
+
} | {
|
|
791
|
+
Account: any;
|
|
792
|
+
} | string | Uint8Array, key: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
793
|
+
u32,
|
|
794
|
+
Option<u32>,
|
|
795
|
+
PalletNftsAttributeNamespace,
|
|
796
|
+
Bytes
|
|
797
|
+
]>;
|
|
798
|
+
/**
|
|
799
|
+
* Clear the metadata for a collection.
|
|
800
|
+
*
|
|
801
|
+
* Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of
|
|
802
|
+
* the `collection`.
|
|
803
|
+
*
|
|
804
|
+
* Any deposit is freed for the collection's owner.
|
|
805
|
+
*
|
|
806
|
+
* - `collection`: The identifier of the collection whose metadata to clear.
|
|
807
|
+
*
|
|
808
|
+
* Emits `CollectionMetadataCleared`.
|
|
809
|
+
*
|
|
810
|
+
* Weight: `O(1)`
|
|
811
|
+
**/
|
|
812
|
+
clearCollectionMetadata: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
813
|
+
u32
|
|
814
|
+
]>;
|
|
815
|
+
/**
|
|
816
|
+
* Clear the metadata for an item.
|
|
817
|
+
*
|
|
818
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the
|
|
819
|
+
* `collection`.
|
|
820
|
+
*
|
|
821
|
+
* Any deposit is freed for the collection's owner.
|
|
822
|
+
*
|
|
823
|
+
* - `collection`: The identifier of the collection whose item's metadata to clear.
|
|
824
|
+
* - `item`: The identifier of the item whose metadata to clear.
|
|
825
|
+
*
|
|
826
|
+
* Emits `ItemMetadataCleared`.
|
|
827
|
+
*
|
|
828
|
+
* Weight: `O(1)`
|
|
829
|
+
**/
|
|
830
|
+
clearMetadata: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
831
|
+
u32,
|
|
832
|
+
u32
|
|
833
|
+
]>;
|
|
834
|
+
/**
|
|
835
|
+
* Issue a new collection of non-fungible items from a public origin.
|
|
836
|
+
*
|
|
837
|
+
* This new collection has no items initially and its owner is the origin.
|
|
838
|
+
*
|
|
839
|
+
* The origin must be Signed and the sender must have sufficient funds free.
|
|
840
|
+
*
|
|
841
|
+
* `CollectionDeposit` funds of sender are reserved.
|
|
842
|
+
*
|
|
843
|
+
* Parameters:
|
|
844
|
+
* - `admin`: The admin of this collection. The admin is the initial address of each
|
|
845
|
+
* member of the collection's admin team.
|
|
846
|
+
*
|
|
847
|
+
* Emits `Created` event when successful.
|
|
848
|
+
*
|
|
849
|
+
* Weight: `O(1)`
|
|
850
|
+
**/
|
|
851
|
+
create: AugmentedSubmittable<(admin: AccountId20 | string | Uint8Array, config: PalletNftsCollectionConfig | {
|
|
852
|
+
settings?: any;
|
|
853
|
+
maxSupply?: any;
|
|
854
|
+
mintSettings?: any;
|
|
855
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
856
|
+
AccountId20,
|
|
857
|
+
PalletNftsCollectionConfig
|
|
858
|
+
]>;
|
|
859
|
+
/**
|
|
860
|
+
* Register a new atomic swap, declaring an intention to send an `item` in exchange for
|
|
861
|
+
* `desired_item` from origin to target on the current blockchain.
|
|
862
|
+
* The target can execute the swap during the specified `duration` of blocks (if set).
|
|
863
|
+
* Additionally, the price could be set for the desired `item`.
|
|
864
|
+
*
|
|
865
|
+
* Origin must be Signed and must be an owner of the `item`.
|
|
866
|
+
*
|
|
867
|
+
* - `collection`: The collection of the item.
|
|
868
|
+
* - `item`: The item an owner wants to give.
|
|
869
|
+
* - `desired_collection`: The collection of the desired item.
|
|
870
|
+
* - `desired_item`: The desired item an owner wants to receive.
|
|
871
|
+
* - `maybe_price`: The price an owner is willing to pay or receive for the desired `item`.
|
|
872
|
+
* - `duration`: A deadline for the swap. Specified by providing the number of blocks
|
|
873
|
+
* after which the swap will expire.
|
|
874
|
+
*
|
|
875
|
+
* Emits `SwapCreated` on success.
|
|
876
|
+
**/
|
|
877
|
+
createSwap: AugmentedSubmittable<(offeredCollection: u32 | AnyNumber | Uint8Array, offeredItem: u32 | AnyNumber | Uint8Array, desiredCollection: u32 | AnyNumber | Uint8Array, maybeDesiredItem: Option<u32> | null | Uint8Array | u32 | AnyNumber, maybePrice: Option<PalletNftsPriceWithDirection> | null | Uint8Array | PalletNftsPriceWithDirection | {
|
|
878
|
+
amount?: any;
|
|
879
|
+
direction?: any;
|
|
880
|
+
} | string, duration: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
881
|
+
u32,
|
|
882
|
+
u32,
|
|
883
|
+
u32,
|
|
884
|
+
Option<u32>,
|
|
885
|
+
Option<PalletNftsPriceWithDirection>,
|
|
886
|
+
u32
|
|
887
|
+
]>;
|
|
888
|
+
/**
|
|
889
|
+
* Destroy a collection of fungible items.
|
|
890
|
+
*
|
|
891
|
+
* The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the
|
|
892
|
+
* owner of the `collection`.
|
|
893
|
+
*
|
|
894
|
+
* NOTE: The collection must have 0 items to be destroyed.
|
|
895
|
+
*
|
|
896
|
+
* - `collection`: The identifier of the collection to be destroyed.
|
|
897
|
+
* - `witness`: Information on the items minted in the collection. This must be
|
|
898
|
+
* correct.
|
|
899
|
+
*
|
|
900
|
+
* Emits `Destroyed` event when successful.
|
|
901
|
+
*
|
|
902
|
+
* Weight: `O(m + c + a)` where:
|
|
903
|
+
* - `m = witness.item_metadatas`
|
|
904
|
+
* - `c = witness.item_configs`
|
|
905
|
+
* - `a = witness.attributes`
|
|
906
|
+
**/
|
|
907
|
+
destroy: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, witness: PalletNftsDestroyWitness | {
|
|
908
|
+
itemMetadatas?: any;
|
|
909
|
+
itemConfigs?: any;
|
|
910
|
+
attributes?: any;
|
|
911
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
912
|
+
u32,
|
|
913
|
+
PalletNftsDestroyWitness
|
|
914
|
+
]>;
|
|
915
|
+
/**
|
|
916
|
+
* Change the config of a collection.
|
|
917
|
+
*
|
|
918
|
+
* Origin must be `ForceOrigin`.
|
|
919
|
+
*
|
|
920
|
+
* - `collection`: The identifier of the collection.
|
|
921
|
+
* - `config`: The new config of this collection.
|
|
922
|
+
*
|
|
923
|
+
* Emits `CollectionConfigChanged`.
|
|
924
|
+
*
|
|
925
|
+
* Weight: `O(1)`
|
|
926
|
+
**/
|
|
927
|
+
forceCollectionConfig: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, config: PalletNftsCollectionConfig | {
|
|
928
|
+
settings?: any;
|
|
929
|
+
maxSupply?: any;
|
|
930
|
+
mintSettings?: any;
|
|
931
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
932
|
+
u32,
|
|
933
|
+
PalletNftsCollectionConfig
|
|
934
|
+
]>;
|
|
935
|
+
/**
|
|
936
|
+
* Change the Owner of a collection.
|
|
937
|
+
*
|
|
938
|
+
* Origin must be `ForceOrigin`.
|
|
939
|
+
*
|
|
940
|
+
* - `collection`: The identifier of the collection.
|
|
941
|
+
* - `owner`: The new Owner of this collection.
|
|
942
|
+
*
|
|
943
|
+
* Emits `OwnerChanged`.
|
|
944
|
+
*
|
|
945
|
+
* Weight: `O(1)`
|
|
946
|
+
**/
|
|
947
|
+
forceCollectionOwner: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, owner: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
948
|
+
u32,
|
|
949
|
+
AccountId20
|
|
950
|
+
]>;
|
|
951
|
+
/**
|
|
952
|
+
* Issue a new collection of non-fungible items from a privileged origin.
|
|
953
|
+
*
|
|
954
|
+
* This new collection has no items initially.
|
|
955
|
+
*
|
|
956
|
+
* The origin must conform to `ForceOrigin`.
|
|
957
|
+
*
|
|
958
|
+
* Unlike `create`, no funds are reserved.
|
|
959
|
+
*
|
|
960
|
+
* - `owner`: The owner of this collection of items. The owner has full superuser
|
|
961
|
+
* permissions over this item, but may later change and configure the permissions using
|
|
962
|
+
* `transfer_ownership` and `set_team`.
|
|
963
|
+
*
|
|
964
|
+
* Emits `ForceCreated` event when successful.
|
|
965
|
+
*
|
|
966
|
+
* Weight: `O(1)`
|
|
967
|
+
**/
|
|
968
|
+
forceCreate: AugmentedSubmittable<(owner: AccountId20 | string | Uint8Array, config: PalletNftsCollectionConfig | {
|
|
969
|
+
settings?: any;
|
|
970
|
+
maxSupply?: any;
|
|
971
|
+
mintSettings?: any;
|
|
972
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
973
|
+
AccountId20,
|
|
974
|
+
PalletNftsCollectionConfig
|
|
975
|
+
]>;
|
|
976
|
+
/**
|
|
977
|
+
* Mint an item of a particular collection from a privileged origin.
|
|
978
|
+
*
|
|
979
|
+
* The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the
|
|
980
|
+
* Issuer of the `collection`.
|
|
981
|
+
*
|
|
982
|
+
* - `collection`: The collection of the item to be minted.
|
|
983
|
+
* - `item`: An identifier of the new item.
|
|
984
|
+
* - `mint_to`: Account into which the item will be minted.
|
|
985
|
+
* - `item_config`: A config of the new item.
|
|
986
|
+
*
|
|
987
|
+
* Emits `Issued` event when successful.
|
|
988
|
+
*
|
|
989
|
+
* Weight: `O(1)`
|
|
990
|
+
**/
|
|
991
|
+
forceMint: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, mintTo: AccountId20 | string | Uint8Array, itemConfig: PalletNftsItemConfig | {
|
|
992
|
+
settings?: any;
|
|
993
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
994
|
+
u32,
|
|
995
|
+
u32,
|
|
996
|
+
AccountId20,
|
|
997
|
+
PalletNftsItemConfig
|
|
998
|
+
]>;
|
|
999
|
+
/**
|
|
1000
|
+
* Force-set an attribute for a collection or item.
|
|
1001
|
+
*
|
|
1002
|
+
* Origin must be `ForceOrigin`.
|
|
1003
|
+
*
|
|
1004
|
+
* If the attribute already exists and it was set by another account, the deposit
|
|
1005
|
+
* will be returned to the previous owner.
|
|
1006
|
+
*
|
|
1007
|
+
* - `set_as`: An optional owner of the attribute.
|
|
1008
|
+
* - `collection`: The identifier of the collection whose item's metadata to set.
|
|
1009
|
+
* - `maybe_item`: The identifier of the item whose metadata to set.
|
|
1010
|
+
* - `namespace`: Attribute's namespace.
|
|
1011
|
+
* - `key`: The key of the attribute.
|
|
1012
|
+
* - `value`: The value to which to set the attribute.
|
|
1013
|
+
*
|
|
1014
|
+
* Emits `AttributeSet`.
|
|
1015
|
+
*
|
|
1016
|
+
* Weight: `O(1)`
|
|
1017
|
+
**/
|
|
1018
|
+
forceSetAttribute: AugmentedSubmittable<(setAs: Option<AccountId20> | null | Uint8Array | AccountId20 | string, collection: u32 | AnyNumber | Uint8Array, maybeItem: Option<u32> | null | Uint8Array | u32 | AnyNumber, namespace: PalletNftsAttributeNamespace | {
|
|
1019
|
+
Pallet: any;
|
|
1020
|
+
} | {
|
|
1021
|
+
CollectionOwner: any;
|
|
1022
|
+
} | {
|
|
1023
|
+
ItemOwner: any;
|
|
1024
|
+
} | {
|
|
1025
|
+
Account: any;
|
|
1026
|
+
} | string | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1027
|
+
Option<AccountId20>,
|
|
1028
|
+
u32,
|
|
1029
|
+
Option<u32>,
|
|
1030
|
+
PalletNftsAttributeNamespace,
|
|
1031
|
+
Bytes,
|
|
1032
|
+
Bytes
|
|
1033
|
+
]>;
|
|
1034
|
+
/**
|
|
1035
|
+
* Disallows specified settings for the whole collection.
|
|
1036
|
+
*
|
|
1037
|
+
* Origin must be Signed and the sender should be the Owner of the `collection`.
|
|
1038
|
+
*
|
|
1039
|
+
* - `collection`: The collection to be locked.
|
|
1040
|
+
* - `lock_settings`: The settings to be locked.
|
|
1041
|
+
*
|
|
1042
|
+
* Note: it's possible to only lock(set) the setting, but not to unset it.
|
|
1043
|
+
*
|
|
1044
|
+
* Emits `CollectionLocked`.
|
|
1045
|
+
*
|
|
1046
|
+
* Weight: `O(1)`
|
|
1047
|
+
**/
|
|
1048
|
+
lockCollection: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, lockSettings: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1049
|
+
u32,
|
|
1050
|
+
u64
|
|
1051
|
+
]>;
|
|
1052
|
+
/**
|
|
1053
|
+
* Disallows changing the metadata or attributes of the item.
|
|
1054
|
+
*
|
|
1055
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Admin
|
|
1056
|
+
* of the `collection`.
|
|
1057
|
+
*
|
|
1058
|
+
* - `collection`: The collection if the `item`.
|
|
1059
|
+
* - `item`: An item to be locked.
|
|
1060
|
+
* - `lock_metadata`: Specifies whether the metadata should be locked.
|
|
1061
|
+
* - `lock_attributes`: Specifies whether the attributes in the `CollectionOwner` namespace
|
|
1062
|
+
* should be locked.
|
|
1063
|
+
*
|
|
1064
|
+
* Note: `lock_attributes` affects the attributes in the `CollectionOwner` namespace only.
|
|
1065
|
+
* When the metadata or attributes are locked, it won't be possible the unlock them.
|
|
1066
|
+
*
|
|
1067
|
+
* Emits `ItemPropertiesLocked`.
|
|
1068
|
+
*
|
|
1069
|
+
* Weight: `O(1)`
|
|
1070
|
+
**/
|
|
1071
|
+
lockItemProperties: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, lockMetadata: bool | boolean | Uint8Array, lockAttributes: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1072
|
+
u32,
|
|
1073
|
+
u32,
|
|
1074
|
+
bool,
|
|
1075
|
+
bool
|
|
1076
|
+
]>;
|
|
1077
|
+
/**
|
|
1078
|
+
* Disallow further unprivileged transfer of an item.
|
|
1079
|
+
*
|
|
1080
|
+
* Origin must be Signed and the sender should be the Freezer of the `collection`.
|
|
1081
|
+
*
|
|
1082
|
+
* - `collection`: The collection of the item to be changed.
|
|
1083
|
+
* - `item`: The item to become non-transferable.
|
|
1084
|
+
*
|
|
1085
|
+
* Emits `ItemTransferLocked`.
|
|
1086
|
+
*
|
|
1087
|
+
* Weight: `O(1)`
|
|
1088
|
+
**/
|
|
1089
|
+
lockItemTransfer: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1090
|
+
u32,
|
|
1091
|
+
u32
|
|
1092
|
+
]>;
|
|
1093
|
+
/**
|
|
1094
|
+
* Mint an item of a particular collection.
|
|
1095
|
+
*
|
|
1096
|
+
* The origin must be Signed and the sender must comply with the `mint_settings` rules.
|
|
1097
|
+
*
|
|
1098
|
+
* - `collection`: The collection of the item to be minted.
|
|
1099
|
+
* - `item`: An identifier of the new item.
|
|
1100
|
+
* - `mint_to`: Account into which the item will be minted.
|
|
1101
|
+
* - `witness_data`: When the mint type is `HolderOf(collection_id)`, then the owned
|
|
1102
|
+
* item_id from that collection needs to be provided within the witness data object. If
|
|
1103
|
+
* the mint price is set, then it should be additionally confirmed in the `witness_data`.
|
|
1104
|
+
*
|
|
1105
|
+
* Note: the deposit will be taken from the `origin` and not the `owner` of the `item`.
|
|
1106
|
+
*
|
|
1107
|
+
* Emits `Issued` event when successful.
|
|
1108
|
+
*
|
|
1109
|
+
* Weight: `O(1)`
|
|
1110
|
+
**/
|
|
1111
|
+
mint: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, mintTo: AccountId20 | string | Uint8Array, witnessData: Option<PalletNftsMintWitness> | null | Uint8Array | PalletNftsMintWitness | {
|
|
1112
|
+
ownedItem?: any;
|
|
1113
|
+
mintPrice?: any;
|
|
1114
|
+
} | string) => SubmittableExtrinsic<ApiType>, [
|
|
1115
|
+
u32,
|
|
1116
|
+
u32,
|
|
1117
|
+
AccountId20,
|
|
1118
|
+
Option<PalletNftsMintWitness>
|
|
1119
|
+
]>;
|
|
1120
|
+
/**
|
|
1121
|
+
* Mint an item by providing the pre-signed approval.
|
|
1122
|
+
*
|
|
1123
|
+
* Origin must be Signed.
|
|
1124
|
+
*
|
|
1125
|
+
* - `mint_data`: The pre-signed approval that consists of the information about the item,
|
|
1126
|
+
* its metadata, attributes, who can mint it (`None` for anyone) and until what block
|
|
1127
|
+
* number.
|
|
1128
|
+
* - `signature`: The signature of the `data` object.
|
|
1129
|
+
* - `signer`: The `data` object's signer. Should be an Issuer of the collection.
|
|
1130
|
+
*
|
|
1131
|
+
* Emits `Issued` on success.
|
|
1132
|
+
* Emits `AttributeSet` if the attributes were provided.
|
|
1133
|
+
* Emits `ItemMetadataSet` if the metadata was not empty.
|
|
1134
|
+
**/
|
|
1135
|
+
mintPreSigned: AugmentedSubmittable<(mintData: PalletNftsPreSignedMint | {
|
|
1136
|
+
collection?: any;
|
|
1137
|
+
item?: any;
|
|
1138
|
+
attributes?: any;
|
|
1139
|
+
metadata?: any;
|
|
1140
|
+
onlyAccount?: any;
|
|
1141
|
+
deadline?: any;
|
|
1142
|
+
mintPrice?: any;
|
|
1143
|
+
} | string | Uint8Array, signature: FpAccountEthereumSignature | string | Uint8Array, signer: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1144
|
+
PalletNftsPreSignedMint,
|
|
1145
|
+
FpAccountEthereumSignature,
|
|
1146
|
+
AccountId20
|
|
1147
|
+
]>;
|
|
1148
|
+
/**
|
|
1149
|
+
* Allows to pay the tips.
|
|
1150
|
+
*
|
|
1151
|
+
* Origin must be Signed.
|
|
1152
|
+
*
|
|
1153
|
+
* - `tips`: Tips array.
|
|
1154
|
+
*
|
|
1155
|
+
* Emits `TipSent` on every tip transfer.
|
|
1156
|
+
**/
|
|
1157
|
+
payTips: AugmentedSubmittable<(tips: Vec<PalletNftsItemTip> | (PalletNftsItemTip | {
|
|
1158
|
+
collection?: any;
|
|
1159
|
+
item?: any;
|
|
1160
|
+
receiver?: any;
|
|
1161
|
+
amount?: any;
|
|
1162
|
+
} | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
|
|
1163
|
+
Vec<PalletNftsItemTip>
|
|
1164
|
+
]>;
|
|
1165
|
+
/**
|
|
1166
|
+
* Re-evaluate the deposits on some items.
|
|
1167
|
+
*
|
|
1168
|
+
* Origin must be Signed and the sender should be the Owner of the `collection`.
|
|
1169
|
+
*
|
|
1170
|
+
* - `collection`: The collection of the items to be reevaluated.
|
|
1171
|
+
* - `items`: The items of the collection whose deposits will be reevaluated.
|
|
1172
|
+
*
|
|
1173
|
+
* NOTE: This exists as a best-effort function. Any items which are unknown or
|
|
1174
|
+
* in the case that the owner account does not have reservable funds to pay for a
|
|
1175
|
+
* deposit increase are ignored. Generally the owner isn't going to call this on items
|
|
1176
|
+
* whose existing deposit is less than the refreshed deposit as it would only cost them,
|
|
1177
|
+
* so it's of little consequence.
|
|
1178
|
+
*
|
|
1179
|
+
* It will still return an error in the case that the collection is unknown or the signer
|
|
1180
|
+
* is not permitted to call it.
|
|
1181
|
+
*
|
|
1182
|
+
* Weight: `O(items.len())`
|
|
1183
|
+
**/
|
|
1184
|
+
redeposit: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, items: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
|
|
1185
|
+
u32,
|
|
1186
|
+
Vec<u32>
|
|
1187
|
+
]>;
|
|
1188
|
+
/**
|
|
1189
|
+
* Set (or reset) the acceptance of ownership for a particular account.
|
|
1190
|
+
*
|
|
1191
|
+
* Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a
|
|
1192
|
+
* provider reference.
|
|
1193
|
+
*
|
|
1194
|
+
* - `maybe_collection`: The identifier of the collection whose ownership the signer is
|
|
1195
|
+
* willing to accept, or if `None`, an indication that the signer is willing to accept no
|
|
1196
|
+
* ownership transferal.
|
|
1197
|
+
*
|
|
1198
|
+
* Emits `OwnershipAcceptanceChanged`.
|
|
1199
|
+
**/
|
|
1200
|
+
setAcceptOwnership: AugmentedSubmittable<(maybeCollection: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [
|
|
1201
|
+
Option<u32>
|
|
1202
|
+
]>;
|
|
1203
|
+
/**
|
|
1204
|
+
* Set an attribute for a collection or item.
|
|
1205
|
+
*
|
|
1206
|
+
* Origin must be Signed and must conform to the namespace ruleset:
|
|
1207
|
+
* - `CollectionOwner` namespace could be modified by the `collection` Admin only;
|
|
1208
|
+
* - `ItemOwner` namespace could be modified by the `maybe_item` owner only. `maybe_item`
|
|
1209
|
+
* should be set in that case;
|
|
1210
|
+
* - `Account(AccountId)` namespace could be modified only when the `origin` was given a
|
|
1211
|
+
* permission to do so;
|
|
1212
|
+
*
|
|
1213
|
+
* The funds of `origin` are reserved according to the formula:
|
|
1214
|
+
* `AttributeDepositBase + DepositPerByte * (key.len + value.len)` taking into
|
|
1215
|
+
* account any already reserved funds.
|
|
1216
|
+
*
|
|
1217
|
+
* - `collection`: The identifier of the collection whose item's metadata to set.
|
|
1218
|
+
* - `maybe_item`: The identifier of the item whose metadata to set.
|
|
1219
|
+
* - `namespace`: Attribute's namespace.
|
|
1220
|
+
* - `key`: The key of the attribute.
|
|
1221
|
+
* - `value`: The value to which to set the attribute.
|
|
1222
|
+
*
|
|
1223
|
+
* Emits `AttributeSet`.
|
|
1224
|
+
*
|
|
1225
|
+
* Weight: `O(1)`
|
|
1226
|
+
**/
|
|
1227
|
+
setAttribute: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, maybeItem: Option<u32> | null | Uint8Array | u32 | AnyNumber, namespace: PalletNftsAttributeNamespace | {
|
|
1228
|
+
Pallet: any;
|
|
1229
|
+
} | {
|
|
1230
|
+
CollectionOwner: any;
|
|
1231
|
+
} | {
|
|
1232
|
+
ItemOwner: any;
|
|
1233
|
+
} | {
|
|
1234
|
+
Account: any;
|
|
1235
|
+
} | string | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1236
|
+
u32,
|
|
1237
|
+
Option<u32>,
|
|
1238
|
+
PalletNftsAttributeNamespace,
|
|
1239
|
+
Bytes,
|
|
1240
|
+
Bytes
|
|
1241
|
+
]>;
|
|
1242
|
+
/**
|
|
1243
|
+
* Set attributes for an item by providing the pre-signed approval.
|
|
1244
|
+
*
|
|
1245
|
+
* Origin must be Signed and must be an owner of the `data.item`.
|
|
1246
|
+
*
|
|
1247
|
+
* - `data`: The pre-signed approval that consists of the information about the item,
|
|
1248
|
+
* attributes to update and until what block number.
|
|
1249
|
+
* - `signature`: The signature of the `data` object.
|
|
1250
|
+
* - `signer`: The `data` object's signer. Should be an Admin of the collection for the
|
|
1251
|
+
* `CollectionOwner` namespace.
|
|
1252
|
+
*
|
|
1253
|
+
* Emits `AttributeSet` for each provided attribute.
|
|
1254
|
+
* Emits `ItemAttributesApprovalAdded` if the approval wasn't set before.
|
|
1255
|
+
* Emits `PreSignedAttributesSet` on success.
|
|
1256
|
+
**/
|
|
1257
|
+
setAttributesPreSigned: AugmentedSubmittable<(data: PalletNftsPreSignedAttributes | {
|
|
1258
|
+
collection?: any;
|
|
1259
|
+
item?: any;
|
|
1260
|
+
attributes?: any;
|
|
1261
|
+
namespace?: any;
|
|
1262
|
+
deadline?: any;
|
|
1263
|
+
} | string | Uint8Array, signature: FpAccountEthereumSignature | string | Uint8Array, signer: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1264
|
+
PalletNftsPreSignedAttributes,
|
|
1265
|
+
FpAccountEthereumSignature,
|
|
1266
|
+
AccountId20
|
|
1267
|
+
]>;
|
|
1268
|
+
/**
|
|
1269
|
+
* Set the maximum number of items a collection could have.
|
|
1270
|
+
*
|
|
1271
|
+
* Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of
|
|
1272
|
+
* the `collection`.
|
|
1273
|
+
*
|
|
1274
|
+
* - `collection`: The identifier of the collection to change.
|
|
1275
|
+
* - `max_supply`: The maximum number of items a collection could have.
|
|
1276
|
+
*
|
|
1277
|
+
* Emits `CollectionMaxSupplySet` event when successful.
|
|
1278
|
+
**/
|
|
1279
|
+
setCollectionMaxSupply: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, maxSupply: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1280
|
+
u32,
|
|
1281
|
+
u32
|
|
1282
|
+
]>;
|
|
1283
|
+
/**
|
|
1284
|
+
* Set the metadata for a collection.
|
|
1285
|
+
*
|
|
1286
|
+
* Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of
|
|
1287
|
+
* the `collection`.
|
|
1288
|
+
*
|
|
1289
|
+
* If the origin is `Signed`, then funds of signer are reserved according to the formula:
|
|
1290
|
+
* `MetadataDepositBase + DepositPerByte * data.len` taking into
|
|
1291
|
+
* account any already reserved funds.
|
|
1292
|
+
*
|
|
1293
|
+
* - `collection`: The identifier of the item whose metadata to update.
|
|
1294
|
+
* - `data`: The general information of this item. Limited in length by `StringLimit`.
|
|
1295
|
+
*
|
|
1296
|
+
* Emits `CollectionMetadataSet`.
|
|
1297
|
+
*
|
|
1298
|
+
* Weight: `O(1)`
|
|
1299
|
+
**/
|
|
1300
|
+
setCollectionMetadata: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1301
|
+
u32,
|
|
1302
|
+
Bytes
|
|
1303
|
+
]>;
|
|
1304
|
+
/**
|
|
1305
|
+
* Set the metadata for an item.
|
|
1306
|
+
*
|
|
1307
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the
|
|
1308
|
+
* `collection`.
|
|
1309
|
+
*
|
|
1310
|
+
* If the origin is Signed, then funds of signer are reserved according to the formula:
|
|
1311
|
+
* `MetadataDepositBase + DepositPerByte * data.len` taking into
|
|
1312
|
+
* account any already reserved funds.
|
|
1313
|
+
*
|
|
1314
|
+
* - `collection`: The identifier of the collection whose item's metadata to set.
|
|
1315
|
+
* - `item`: The identifier of the item whose metadata to set.
|
|
1316
|
+
* - `data`: The general information of this item. Limited in length by `StringLimit`.
|
|
1317
|
+
*
|
|
1318
|
+
* Emits `ItemMetadataSet`.
|
|
1319
|
+
*
|
|
1320
|
+
* Weight: `O(1)`
|
|
1321
|
+
**/
|
|
1322
|
+
setMetadata: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1323
|
+
u32,
|
|
1324
|
+
u32,
|
|
1325
|
+
Bytes
|
|
1326
|
+
]>;
|
|
1327
|
+
/**
|
|
1328
|
+
* Set (or reset) the price for an item.
|
|
1329
|
+
*
|
|
1330
|
+
* Origin must be Signed and must be the owner of the `item`.
|
|
1331
|
+
*
|
|
1332
|
+
* - `collection`: The collection of the item.
|
|
1333
|
+
* - `item`: The item to set the price for.
|
|
1334
|
+
* - `price`: The price for the item. Pass `None`, to reset the price.
|
|
1335
|
+
* - `buyer`: Restricts the buy operation to a specific account.
|
|
1336
|
+
*
|
|
1337
|
+
* Emits `ItemPriceSet` on success if the price is not `None`.
|
|
1338
|
+
* Emits `ItemPriceRemoved` on success if the price is `None`.
|
|
1339
|
+
**/
|
|
1340
|
+
setPrice: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, price: Option<u128> | null | Uint8Array | u128 | AnyNumber, whitelistedBuyer: Option<AccountId20> | null | Uint8Array | AccountId20 | string) => SubmittableExtrinsic<ApiType>, [
|
|
1341
|
+
u32,
|
|
1342
|
+
u32,
|
|
1343
|
+
Option<u128>,
|
|
1344
|
+
Option<AccountId20>
|
|
1345
|
+
]>;
|
|
1346
|
+
/**
|
|
1347
|
+
* Change the Issuer, Admin and Freezer of a collection.
|
|
1348
|
+
*
|
|
1349
|
+
* Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the
|
|
1350
|
+
* `collection`.
|
|
1351
|
+
*
|
|
1352
|
+
* Note: by setting the role to `None` only the `ForceOrigin` will be able to change it
|
|
1353
|
+
* after to `Some(account)`.
|
|
1354
|
+
*
|
|
1355
|
+
* - `collection`: The collection whose team should be changed.
|
|
1356
|
+
* - `issuer`: The new Issuer of this collection.
|
|
1357
|
+
* - `admin`: The new Admin of this collection.
|
|
1358
|
+
* - `freezer`: The new Freezer of this collection.
|
|
1359
|
+
*
|
|
1360
|
+
* Emits `TeamChanged`.
|
|
1361
|
+
*
|
|
1362
|
+
* Weight: `O(1)`
|
|
1363
|
+
**/
|
|
1364
|
+
setTeam: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, issuer: Option<AccountId20> | null | Uint8Array | AccountId20 | string, admin: Option<AccountId20> | null | Uint8Array | AccountId20 | string, freezer: Option<AccountId20> | null | Uint8Array | AccountId20 | string) => SubmittableExtrinsic<ApiType>, [
|
|
1365
|
+
u32,
|
|
1366
|
+
Option<AccountId20>,
|
|
1367
|
+
Option<AccountId20>,
|
|
1368
|
+
Option<AccountId20>
|
|
1369
|
+
]>;
|
|
1370
|
+
/**
|
|
1371
|
+
* Move an item from the sender account to another.
|
|
1372
|
+
*
|
|
1373
|
+
* Origin must be Signed and the signing account must be either:
|
|
1374
|
+
* - the Owner of the `item`;
|
|
1375
|
+
* - the approved delegate for the `item` (in this case, the approval is reset).
|
|
1376
|
+
*
|
|
1377
|
+
* Arguments:
|
|
1378
|
+
* - `collection`: The collection of the item to be transferred.
|
|
1379
|
+
* - `item`: The item to be transferred.
|
|
1380
|
+
* - `dest`: The account to receive ownership of the item.
|
|
1381
|
+
*
|
|
1382
|
+
* Emits `Transferred`.
|
|
1383
|
+
*
|
|
1384
|
+
* Weight: `O(1)`
|
|
1385
|
+
**/
|
|
1386
|
+
transfer: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, dest: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1387
|
+
u32,
|
|
1388
|
+
u32,
|
|
1389
|
+
AccountId20
|
|
1390
|
+
]>;
|
|
1391
|
+
/**
|
|
1392
|
+
* Change the Owner of a collection.
|
|
1393
|
+
*
|
|
1394
|
+
* Origin must be Signed and the sender should be the Owner of the `collection`.
|
|
1395
|
+
*
|
|
1396
|
+
* - `collection`: The collection whose owner should be changed.
|
|
1397
|
+
* - `owner`: The new Owner of this collection. They must have called
|
|
1398
|
+
* `set_accept_ownership` with `collection` in order for this operation to succeed.
|
|
1399
|
+
*
|
|
1400
|
+
* Emits `OwnerChanged`.
|
|
1401
|
+
*
|
|
1402
|
+
* Weight: `O(1)`
|
|
1403
|
+
**/
|
|
1404
|
+
transferOwnership: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, newOwner: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1405
|
+
u32,
|
|
1406
|
+
AccountId20
|
|
1407
|
+
]>;
|
|
1408
|
+
/**
|
|
1409
|
+
* Re-allow unprivileged transfer of an item.
|
|
1410
|
+
*
|
|
1411
|
+
* Origin must be Signed and the sender should be the Freezer of the `collection`.
|
|
1412
|
+
*
|
|
1413
|
+
* - `collection`: The collection of the item to be changed.
|
|
1414
|
+
* - `item`: The item to become transferable.
|
|
1415
|
+
*
|
|
1416
|
+
* Emits `ItemTransferUnlocked`.
|
|
1417
|
+
*
|
|
1418
|
+
* Weight: `O(1)`
|
|
1419
|
+
**/
|
|
1420
|
+
unlockItemTransfer: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1421
|
+
u32,
|
|
1422
|
+
u32
|
|
1423
|
+
]>;
|
|
1424
|
+
/**
|
|
1425
|
+
* Update mint settings.
|
|
1426
|
+
*
|
|
1427
|
+
* Origin must be either `ForceOrigin` or `Signed` and the sender should be the Issuer
|
|
1428
|
+
* of the `collection`.
|
|
1429
|
+
*
|
|
1430
|
+
* - `collection`: The identifier of the collection to change.
|
|
1431
|
+
* - `mint_settings`: The new mint settings.
|
|
1432
|
+
*
|
|
1433
|
+
* Emits `CollectionMintSettingsUpdated` event when successful.
|
|
1434
|
+
**/
|
|
1435
|
+
updateMintSettings: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, mintSettings: PalletNftsMintSettings | {
|
|
1436
|
+
mintType?: any;
|
|
1437
|
+
price?: any;
|
|
1438
|
+
startBlock?: any;
|
|
1439
|
+
endBlock?: any;
|
|
1440
|
+
defaultItemSettings?: any;
|
|
1441
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1442
|
+
u32,
|
|
1443
|
+
PalletNftsMintSettings
|
|
1444
|
+
]>;
|
|
1445
|
+
/**
|
|
1446
|
+
* Generic tx
|
|
1447
|
+
**/
|
|
1448
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
1449
|
+
};
|
|
1450
|
+
parameters: {
|
|
1451
|
+
/**
|
|
1452
|
+
* Set the value of a parameter.
|
|
1453
|
+
*
|
|
1454
|
+
* The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be
|
|
1455
|
+
* deleted by setting them to `None`.
|
|
1456
|
+
**/
|
|
1457
|
+
setParameter: AugmentedSubmittable<(keyValue: ShSolochainEvmRuntimeConfigsRuntimeParamsRuntimeParameters | {
|
|
1458
|
+
RuntimeConfig: any;
|
|
1459
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1460
|
+
ShSolochainEvmRuntimeConfigsRuntimeParamsRuntimeParameters
|
|
1461
|
+
]>;
|
|
1462
|
+
/**
|
|
1463
|
+
* Generic tx
|
|
1464
|
+
**/
|
|
1465
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
1466
|
+
};
|
|
1467
|
+
paymentStreams: {
|
|
1468
|
+
/**
|
|
1469
|
+
* Dispatchable extrinsic that allows Providers to charge multiple User's payment streams.
|
|
1470
|
+
*
|
|
1471
|
+
* The dispatch origin for this call must be Signed.
|
|
1472
|
+
* The origin must be the Provider that has at least one type of payment stream with each of the Users.
|
|
1473
|
+
*
|
|
1474
|
+
* Parameters:
|
|
1475
|
+
* - `user_accounts`: The array of User Account IDs that have payment streams with the Provider.
|
|
1476
|
+
*
|
|
1477
|
+
* This extrinsic will perform the following checks and logic:
|
|
1478
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
1479
|
+
* 2. Check that the array of Users is not bigger than the maximum allowed.
|
|
1480
|
+
* 3. Execute a for loop for each User in the array of User Account IDs, in which it:
|
|
1481
|
+
* a. Checks that a payment stream between the signer (Provider) and the User exists
|
|
1482
|
+
* b. If there is a fixed-rate payment stream:
|
|
1483
|
+
* 1. Get the rate of the payment stream
|
|
1484
|
+
* 2. Get the difference between the last charged tick number and the last chargeable tick number of the stream
|
|
1485
|
+
* 3. Calculate the amount to charge doing `rate * difference`
|
|
1486
|
+
* 4. Charge the user (if the user does not have enough funds, it gets flagged and a `UserWithoutFunds` event is emitted)
|
|
1487
|
+
* 5. Update the last charged tick number of the payment stream
|
|
1488
|
+
* c. If there is a dynamic-rate payment stream:
|
|
1489
|
+
* 1. Get the amount provided by the Provider
|
|
1490
|
+
* 2. Get the difference between price index when the stream was last charged and the price index at the last chargeable tick
|
|
1491
|
+
* 3. Calculate the amount to charge doing `amount_provided * difference`
|
|
1492
|
+
* 4. Charge the user (if the user does not have enough funds, it gets flagged and a `UserWithoutFunds` event is emitted)
|
|
1493
|
+
* 5. Update the price index when the stream was last charged of the payment stream
|
|
1494
|
+
*
|
|
1495
|
+
* Emits a `PaymentStreamCharged` per User that had to pay and a `UsersCharged` event when successful.
|
|
1496
|
+
*
|
|
1497
|
+
* 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
|
|
1498
|
+
* will try to charge both and the amount charged will be the sum of the amounts charged for each payment stream.
|
|
1499
|
+
**/
|
|
1500
|
+
chargeMultipleUsersPaymentStreams: AugmentedSubmittable<(userAccounts: Vec<AccountId20> | (AccountId20 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
|
|
1501
|
+
Vec<AccountId20>
|
|
1502
|
+
]>;
|
|
1503
|
+
/**
|
|
1504
|
+
* Dispatchable extrinsic that allows Providers to charge a payment stream from a User.
|
|
1505
|
+
*
|
|
1506
|
+
* The dispatch origin for this call must be Signed.
|
|
1507
|
+
* The origin must be the Provider that has at least one type of payment stream with the User.
|
|
1508
|
+
*
|
|
1509
|
+
* Parameters:
|
|
1510
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
1511
|
+
*
|
|
1512
|
+
* This extrinsic will perform the following checks and logic:
|
|
1513
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
1514
|
+
* 2. Check that a payment stream between the signer (Provider) and the User exists
|
|
1515
|
+
* 3. If there is a fixed-rate payment stream:
|
|
1516
|
+
* 1. Get the rate of the payment stream
|
|
1517
|
+
* 2. Get the difference between the last charged tick number and the last chargeable tick number of the stream
|
|
1518
|
+
* 3. Calculate the amount to charge doing `rate * difference`
|
|
1519
|
+
* 4. Charge the user (if the user does not have enough funds, it gets flagged and a `UserWithoutFunds` event is emitted)
|
|
1520
|
+
* 5. Update the last charged tick number of the payment stream
|
|
1521
|
+
* 4. If there is a dynamic-rate payment stream:
|
|
1522
|
+
* 1. Get the amount provided by the Provider
|
|
1523
|
+
* 2. Get the difference between price index when the stream was last charged and the price index at the last chargeable tick
|
|
1524
|
+
* 3. Calculate the amount to charge doing `amount_provided * difference`
|
|
1525
|
+
* 4. Charge the user (if the user does not have enough funds, it gets flagged and a `UserWithoutFunds` event is emitted)
|
|
1526
|
+
* 5. Update the price index when the stream was last charged of the payment stream
|
|
1527
|
+
*
|
|
1528
|
+
* Emits a `PaymentStreamCharged` event when successful.
|
|
1529
|
+
*
|
|
1530
|
+
* 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
|
|
1531
|
+
* will try to charge both and the amount charged will be the sum of the amounts charged for each payment stream.
|
|
1532
|
+
**/
|
|
1533
|
+
chargePaymentStreams: AugmentedSubmittable<(userAccount: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1534
|
+
AccountId20
|
|
1535
|
+
]>;
|
|
1536
|
+
/**
|
|
1537
|
+
* Dispatchable extrinsic that allows a user flagged as without funds long ago enough to clear this flag from its account,
|
|
1538
|
+
* allowing it to begin contracting and paying for services again. It should have previously paid all its outstanding debt.
|
|
1539
|
+
*
|
|
1540
|
+
* The dispatch origin for this call must be Signed.
|
|
1541
|
+
* The origin must be the User that has been flagged as without funds.
|
|
1542
|
+
*
|
|
1543
|
+
* This extrinsic will perform the following checks and logic:
|
|
1544
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
1545
|
+
* 2. Check that the user has been flagged as without funds.
|
|
1546
|
+
* 3. Check that the cooldown period has passed since the user was flagged as without funds.
|
|
1547
|
+
* 4. Check that there's no remaining outstanding debt.
|
|
1548
|
+
* 5. Unflag the user as without funds.
|
|
1549
|
+
*
|
|
1550
|
+
* Emits a 'UserSolvent' event when successful.
|
|
1551
|
+
**/
|
|
1552
|
+
clearInsolventFlag: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
1553
|
+
/**
|
|
1554
|
+
* Dispatchable extrinsic that allows root to add a dynamic-rate payment stream from a User to a Provider.
|
|
1555
|
+
*
|
|
1556
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
1557
|
+
* this extrinsic is for manual testing).
|
|
1558
|
+
*
|
|
1559
|
+
* Parameters:
|
|
1560
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
1561
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
1562
|
+
* - `amount_provided`: The initial amount provided by the Provider.
|
|
1563
|
+
*
|
|
1564
|
+
* This extrinsic will perform the following checks and logic:
|
|
1565
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
1566
|
+
* 2. Check that the payment stream does not already exist
|
|
1567
|
+
* 3. Check that the User has enough funds to pay the deposit
|
|
1568
|
+
* 4. Hold the deposit from the User
|
|
1569
|
+
* 5. Update the Payment Streams storage to add the new payment stream
|
|
1570
|
+
*
|
|
1571
|
+
* Emits `DynamicRatePaymentStreamCreated` event when successful.
|
|
1572
|
+
**/
|
|
1573
|
+
createDynamicRatePaymentStream: AugmentedSubmittable<(providerId: H256 | string | Uint8Array, userAccount: AccountId20 | string | Uint8Array, amountProvided: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1574
|
+
H256,
|
|
1575
|
+
AccountId20,
|
|
1576
|
+
u64
|
|
1577
|
+
]>;
|
|
1578
|
+
/**
|
|
1579
|
+
* Dispatchable extrinsic that allows root to add a fixed-rate payment stream from a User to a Provider.
|
|
1580
|
+
*
|
|
1581
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
1582
|
+
* this extrinsic is for manual testing).
|
|
1583
|
+
*
|
|
1584
|
+
* Parameters:
|
|
1585
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
1586
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
1587
|
+
* - `rate`: The initial rate of the payment stream.
|
|
1588
|
+
*
|
|
1589
|
+
* This extrinsic will perform the following checks and logic:
|
|
1590
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
1591
|
+
* 2. Check that the payment stream does not already exist
|
|
1592
|
+
* 3. Check that the User has enough funds to pay the deposit
|
|
1593
|
+
* 4. Hold the deposit from the User
|
|
1594
|
+
* 5. Update the Payment Streams storage to add the new payment stream
|
|
1595
|
+
*
|
|
1596
|
+
* Emits `FixedRatePaymentStreamCreated` event when successful.
|
|
1597
|
+
**/
|
|
1598
|
+
createFixedRatePaymentStream: AugmentedSubmittable<(providerId: H256 | string | Uint8Array, userAccount: AccountId20 | string | Uint8Array, rate: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1599
|
+
H256,
|
|
1600
|
+
AccountId20,
|
|
1601
|
+
u128
|
|
1602
|
+
]>;
|
|
1603
|
+
/**
|
|
1604
|
+
* Dispatchable extrinsic that allows root to delete an existing dynamic-rate payment stream between a User and a Provider.
|
|
1605
|
+
*
|
|
1606
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
1607
|
+
* this extrinsic is for manual testing).
|
|
1608
|
+
*
|
|
1609
|
+
* Parameters:
|
|
1610
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
1611
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
1612
|
+
*
|
|
1613
|
+
* This extrinsic will perform the following checks and logic:
|
|
1614
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
1615
|
+
* 2. Check that the payment stream exists
|
|
1616
|
+
* 3. Update the Payment Streams storage to remove the payment stream
|
|
1617
|
+
*
|
|
1618
|
+
* Emits `DynamicRatePaymentStreamDeleted` event when successful.
|
|
1619
|
+
**/
|
|
1620
|
+
deleteDynamicRatePaymentStream: AugmentedSubmittable<(providerId: H256 | string | Uint8Array, userAccount: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1621
|
+
H256,
|
|
1622
|
+
AccountId20
|
|
1623
|
+
]>;
|
|
1624
|
+
/**
|
|
1625
|
+
* Dispatchable extrinsic that allows root to delete an existing fixed-rate payment stream between a User and a Provider.
|
|
1626
|
+
*
|
|
1627
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
1628
|
+
* this extrinsic is for manual testing).
|
|
1629
|
+
*
|
|
1630
|
+
* Parameters:
|
|
1631
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
1632
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
1633
|
+
*
|
|
1634
|
+
* This extrinsic will perform the following checks and logic:
|
|
1635
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
1636
|
+
* 2. Check that the payment stream exists
|
|
1637
|
+
* 3. Update the Payment Streams storage to remove the payment stream
|
|
1638
|
+
*
|
|
1639
|
+
* Emits `FixedRatePaymentStreamDeleted` event when successful.
|
|
1640
|
+
**/
|
|
1641
|
+
deleteFixedRatePaymentStream: AugmentedSubmittable<(providerId: H256 | string | Uint8Array, userAccount: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1642
|
+
H256,
|
|
1643
|
+
AccountId20
|
|
1644
|
+
]>;
|
|
1645
|
+
/**
|
|
1646
|
+
* Dispatchable extrinsic that allows a user flagged as without funds to pay the Providers that still have payment streams
|
|
1647
|
+
* with it, in order to recover as much of its deposits as possible.
|
|
1648
|
+
*
|
|
1649
|
+
* The dispatch origin for this call must be Signed.
|
|
1650
|
+
* The origin must be the User that has been flagged as without funds.
|
|
1651
|
+
*
|
|
1652
|
+
* This extrinsic will perform the following checks and logic:
|
|
1653
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
1654
|
+
* 2. Check that the user has been flagged as without funds.
|
|
1655
|
+
* 3. Release the user's funds that were held as a deposit for each payment stream to be paid.
|
|
1656
|
+
* 4. Get the payment streams that the user has with the provided list of Providers, and pay them for the services.
|
|
1657
|
+
* 5. Delete the charged payment streams of the user.
|
|
1658
|
+
*
|
|
1659
|
+
* Emits a 'UserPaidSomeDebts' event when successful if the user has remaining debts. If the user has successfully paid all its debts,
|
|
1660
|
+
* it emits a 'UserPaidAllDebts' event.
|
|
1661
|
+
*
|
|
1662
|
+
* Notes: this extrinsic iterates over the provided list of Providers, getting the payment streams they have with the user and charging
|
|
1663
|
+
* them, so the execution could get expensive. It's recommended to provide a list of Providers that the user actually has payment streams with,
|
|
1664
|
+
* which can be obtained by calling the `get_providers_with_payment_streams_with_user` runtime API.
|
|
1665
|
+
* There was an idea to limit the amount of Providers that can be received by this extrinsic using a constant in the configuration of this pallet,
|
|
1666
|
+
* but the correct benchmarking of this extrinsic should be enough to avoid any potential abuse.
|
|
1667
|
+
**/
|
|
1668
|
+
payOutstandingDebt: AugmentedSubmittable<(providers: Vec<H256> | (H256 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
|
|
1669
|
+
Vec<H256>
|
|
1670
|
+
]>;
|
|
1671
|
+
/**
|
|
1672
|
+
* Dispatchable extrinsic that allows root to update an existing dynamic-rate payment stream between a User and a Provider.
|
|
1673
|
+
*
|
|
1674
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
1675
|
+
* this extrinsic is for manual testing).
|
|
1676
|
+
*
|
|
1677
|
+
* Parameters:
|
|
1678
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
1679
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
1680
|
+
* - `new_amount_provided`: The new amount provided by the Provider.
|
|
1681
|
+
*
|
|
1682
|
+
* This extrinsic will perform the following checks and logic:
|
|
1683
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
1684
|
+
* 2. Check that the payment stream exists
|
|
1685
|
+
* 3. Update the Payment Streams storage to update the payment stream
|
|
1686
|
+
*
|
|
1687
|
+
* Emits `DynamicRatePaymentStreamUpdated` event when successful.
|
|
1688
|
+
**/
|
|
1689
|
+
updateDynamicRatePaymentStream: AugmentedSubmittable<(providerId: H256 | string | Uint8Array, userAccount: AccountId20 | string | Uint8Array, newAmountProvided: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1690
|
+
H256,
|
|
1691
|
+
AccountId20,
|
|
1692
|
+
u64
|
|
1693
|
+
]>;
|
|
1694
|
+
/**
|
|
1695
|
+
* Dispatchable extrinsic that allows root to update an existing fixed-rate payment stream between a User and a Provider.
|
|
1696
|
+
*
|
|
1697
|
+
* The dispatch origin for this call must be Root (Payment streams should only be added by traits in other pallets,
|
|
1698
|
+
* this extrinsic is for manual testing).
|
|
1699
|
+
*
|
|
1700
|
+
* Parameters:
|
|
1701
|
+
* - `provider_id`: The Provider ID that the payment stream is for.
|
|
1702
|
+
* - `user_account`: The User Account ID that the payment stream is for.
|
|
1703
|
+
* - `new_rate`: The new rate of the payment stream.
|
|
1704
|
+
*
|
|
1705
|
+
* This extrinsic will perform the following checks and logic:
|
|
1706
|
+
* 1. Check that the extrinsic was executed by the root origin
|
|
1707
|
+
* 2. Check that the payment stream exists
|
|
1708
|
+
* 3. Update the Payment Streams storage to update the payment stream
|
|
1709
|
+
*
|
|
1710
|
+
* Emits `FixedRatePaymentStreamUpdated` event when successful.
|
|
1711
|
+
**/
|
|
1712
|
+
updateFixedRatePaymentStream: AugmentedSubmittable<(providerId: H256 | string | Uint8Array, userAccount: AccountId20 | string | Uint8Array, newRate: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1713
|
+
H256,
|
|
1714
|
+
AccountId20,
|
|
1715
|
+
u128
|
|
1716
|
+
]>;
|
|
1717
|
+
/**
|
|
1718
|
+
* Generic tx
|
|
1719
|
+
**/
|
|
1720
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
1721
|
+
};
|
|
1722
|
+
proofsDealer: {
|
|
1723
|
+
/**
|
|
1724
|
+
* Introduce a new challenge.
|
|
1725
|
+
*
|
|
1726
|
+
* This function allows authorized origins to add a new challenge to the `ChallengesQueue`.
|
|
1727
|
+
* The challenge will be dispatched in the coming blocks.
|
|
1728
|
+
* Users are charged a small fee for submitting a challenge, which
|
|
1729
|
+
* goes to the Treasury.
|
|
1730
|
+
**/
|
|
1731
|
+
challenge: AugmentedSubmittable<(key: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1732
|
+
H256
|
|
1733
|
+
]>;
|
|
1734
|
+
/**
|
|
1735
|
+
* Initialise a Provider's challenge cycle.
|
|
1736
|
+
*
|
|
1737
|
+
* Only callable by sudo.
|
|
1738
|
+
*
|
|
1739
|
+
* Sets the last tick the Provider submitted a proof for to the current tick, and sets the
|
|
1740
|
+
* deadline for submitting a proof to the current tick + the Provider's period + the tolerance.
|
|
1741
|
+
**/
|
|
1742
|
+
forceInitialiseChallengeCycle: AugmentedSubmittable<(provider: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1743
|
+
H256
|
|
1744
|
+
]>;
|
|
1745
|
+
priorityChallenge: AugmentedSubmittable<(key: H256 | string | Uint8Array, shouldRemoveKey: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1746
|
+
H256,
|
|
1747
|
+
bool
|
|
1748
|
+
]>;
|
|
1749
|
+
/**
|
|
1750
|
+
* Set the [`ChallengesTickerPaused`] to `true` or `false`.
|
|
1751
|
+
*
|
|
1752
|
+
* Only callable by sudo.
|
|
1753
|
+
**/
|
|
1754
|
+
setPaused: AugmentedSubmittable<(paused: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1755
|
+
bool
|
|
1756
|
+
]>;
|
|
1757
|
+
/**
|
|
1758
|
+
* For a Provider to submit a proof.
|
|
1759
|
+
*
|
|
1760
|
+
* Checks that `provider` is a registered Provider. If none
|
|
1761
|
+
* is provided, the proof submitter is considered to be the Provider.
|
|
1762
|
+
* Relies on a Providers pallet to get the root for the Provider.
|
|
1763
|
+
* Validates that the proof corresponds to a challenge that was made in the past,
|
|
1764
|
+
* by checking the [`TickToChallengesSeed`] StorageMap. The challenge tick that the
|
|
1765
|
+
* Provider should be submitting a proof for is retrieved from [`ProviderToProofSubmissionRecord`],
|
|
1766
|
+
* and it was calculated based on the last tick they submitted a proof for, and the challenge
|
|
1767
|
+
* period for that Provider, at the time of the previous proof submission or when it was
|
|
1768
|
+
* marked as slashable.
|
|
1769
|
+
*
|
|
1770
|
+
* This extrinsic also checks that there hasn't been a checkpoint challenge round
|
|
1771
|
+
* in between the last time the Provider submitted a proof for and the tick
|
|
1772
|
+
* for which the proof is being submitted. If there has been, the Provider is
|
|
1773
|
+
* expected to include responses to the checkpoint challenges in the proof.
|
|
1774
|
+
*
|
|
1775
|
+
* If valid:
|
|
1776
|
+
* - Pushes forward the Provider in the [`TickToProvidersDeadlines`] StorageMap a number
|
|
1777
|
+
* of ticks corresponding to the stake of the Provider.
|
|
1778
|
+
* - Registers the last tick for which the Provider submitted a proof for in
|
|
1779
|
+
* [`ProviderToProofSubmissionRecord`], as well as the next tick for which the Provider
|
|
1780
|
+
* should submit a proof for.
|
|
1781
|
+
*
|
|
1782
|
+
* Execution of this extrinsic should be refunded if the proof is valid.
|
|
1783
|
+
**/
|
|
1784
|
+
submitProof: AugmentedSubmittable<(proof: PalletProofsDealerProof | {
|
|
1785
|
+
forestProof?: any;
|
|
1786
|
+
keyProofs?: any;
|
|
1787
|
+
} | string | Uint8Array, provider: Option<H256> | null | Uint8Array | H256 | string) => SubmittableExtrinsic<ApiType>, [
|
|
1788
|
+
PalletProofsDealerProof,
|
|
1789
|
+
Option<H256>
|
|
1790
|
+
]>;
|
|
1791
|
+
/**
|
|
1792
|
+
* Generic tx
|
|
1793
|
+
**/
|
|
1794
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
1795
|
+
};
|
|
1796
|
+
providers: {
|
|
1797
|
+
/**
|
|
1798
|
+
* Dispatchable extrinsic that allows BSPs and MSPs to add a new multiaddress to their account.
|
|
1799
|
+
*
|
|
1800
|
+
* The dispatch origin for this call must be Signed.
|
|
1801
|
+
* The origin must be the account that wants to add a new multiaddress.
|
|
1802
|
+
*
|
|
1803
|
+
* Parameters:
|
|
1804
|
+
* - `new_multiaddress`: The new multiaddress that the signer wants to add to its account.
|
|
1805
|
+
*
|
|
1806
|
+
* This extrinsic will perform the following checks and logic:
|
|
1807
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
1808
|
+
* 2. Check that the signer is registered as a MSP or BSP.
|
|
1809
|
+
* 3. Check that the Provider has not reached the maximum amount of multiaddresses.
|
|
1810
|
+
* 4. Check that the multiaddress is valid (size and any other relevant checks). TODO: Implement this.
|
|
1811
|
+
* 5. Update the Provider's storage to add the multiaddress.
|
|
1812
|
+
*
|
|
1813
|
+
* Emits `MultiAddressAdded` event when successful.
|
|
1814
|
+
**/
|
|
1815
|
+
addMultiaddress: AugmentedSubmittable<(newMultiaddress: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1816
|
+
Bytes
|
|
1817
|
+
]>;
|
|
1818
|
+
/**
|
|
1819
|
+
* Dispatchable extrinsic only callable by an MSP that allows it to add a value proposition to its service
|
|
1820
|
+
*
|
|
1821
|
+
* The dispatch origin for this call must be Signed.
|
|
1822
|
+
* The origin must be the account that wants to add a value proposition.
|
|
1823
|
+
*
|
|
1824
|
+
* Emits `ValuePropAdded` event when successful.
|
|
1825
|
+
**/
|
|
1826
|
+
addValueProp: AugmentedSubmittable<(pricePerGigaUnitOfDataPerBlock: u128 | AnyNumber | Uint8Array, commitment: Bytes | string | Uint8Array, bucketDataLimit: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1827
|
+
u128,
|
|
1828
|
+
Bytes,
|
|
1829
|
+
u64
|
|
1830
|
+
]>;
|
|
1831
|
+
/**
|
|
1832
|
+
* Dispatchable extrinsic that allows users to sign off as a Backup Storage Provider.
|
|
1833
|
+
*
|
|
1834
|
+
* The dispatch origin for this call must be Signed.
|
|
1835
|
+
* The origin must be the account that wants to sign off as a Backup Storage Provider.
|
|
1836
|
+
*
|
|
1837
|
+
* This extrinsic will perform the following checks and logic:
|
|
1838
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
1839
|
+
* 2. Check that the signer is registered as a BSP
|
|
1840
|
+
* 3. Check that the BSP has no storage assigned to it
|
|
1841
|
+
* 4. Update the BSPs storage, removing the signer as an BSP
|
|
1842
|
+
* 5. Update the total capacity of all BSPs, removing the capacity of the signer
|
|
1843
|
+
* 6. Return the deposit to the signer
|
|
1844
|
+
* 7. Decrement the storage that holds total amount of BSPs currently in the system
|
|
1845
|
+
*
|
|
1846
|
+
* Emits `BspSignOffSuccess` event when successful.
|
|
1847
|
+
**/
|
|
1848
|
+
bspSignOff: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
1849
|
+
/**
|
|
1850
|
+
* Dispatchable extrinsic that allows a user with a pending Sign Up Request to cancel it, getting the deposit back.
|
|
1851
|
+
*
|
|
1852
|
+
* The dispatch origin for this call must be Signed.
|
|
1853
|
+
* The origin must be the account that requested to sign up as a Storage Provider.
|
|
1854
|
+
*
|
|
1855
|
+
* This extrinsic will perform the following checks and logic:
|
|
1856
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
1857
|
+
* 2. Check that the signer has requested to sign up as a SP
|
|
1858
|
+
* 3. Delete the request from the Sign Up Requests storage
|
|
1859
|
+
* 4. Return the deposit to the signer
|
|
1860
|
+
*
|
|
1861
|
+
* Emits `SignUpRequestCanceled` event when successful.
|
|
1862
|
+
**/
|
|
1863
|
+
cancelSignUp: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
1864
|
+
/**
|
|
1865
|
+
* Dispatchable extrinsic that allows users to change their amount of stored data
|
|
1866
|
+
*
|
|
1867
|
+
* The dispatch origin for this call must be Signed.
|
|
1868
|
+
* The origin must be the account that wants to change its capacity.
|
|
1869
|
+
*
|
|
1870
|
+
* Parameters:
|
|
1871
|
+
* - `new_capacity`: The new total amount of data that the Storage Provider wants to be able to store.
|
|
1872
|
+
*
|
|
1873
|
+
* This extrinsic will perform the following checks and logic:
|
|
1874
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
1875
|
+
* 2. Check that the signer is registered as a SP
|
|
1876
|
+
* 3. Check that enough time has passed since the last time the SP changed its capacity
|
|
1877
|
+
* 4. Check that the new capacity is greater than the minimum required by the runtime
|
|
1878
|
+
* 5. Check that the new capacity is greater than the data used by this SP
|
|
1879
|
+
* 6. Calculate the new deposit needed for this new capacity
|
|
1880
|
+
* 7. Check to see if the new deposit needed is greater or less than the current deposit
|
|
1881
|
+
* a. If the new deposit is greater than the current deposit:
|
|
1882
|
+
* i. Check that the signer has enough funds to pay this extra deposit
|
|
1883
|
+
* ii. Hold the extra deposit from the signer
|
|
1884
|
+
* b. If the new deposit is less than the current deposit, return the held difference to the signer
|
|
1885
|
+
* 7. Update the SPs storage to change the total data
|
|
1886
|
+
* 8. If user is a BSP, update the total capacity of the network (sum of all capacities of BSPs)
|
|
1887
|
+
*
|
|
1888
|
+
* Emits `CapacityChanged` event when successful.
|
|
1889
|
+
**/
|
|
1890
|
+
changeCapacity: AugmentedSubmittable<(newCapacity: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1891
|
+
u64
|
|
1892
|
+
]>;
|
|
1893
|
+
/**
|
|
1894
|
+
* Dispatchable extrinsic that allows users to confirm their sign up as a Storage Provider, either MSP or BSP.
|
|
1895
|
+
*
|
|
1896
|
+
* The dispatch origin for this call must be Signed.
|
|
1897
|
+
* The origin must be the account that requested to sign up as a Storage Provider, except when providing a
|
|
1898
|
+
* `provider_account` parameter, in which case the origin can be any account.
|
|
1899
|
+
*
|
|
1900
|
+
* Parameters:
|
|
1901
|
+
* - `provider_account`: The account that requested to sign up as a Storage Provider. If not provided, the signer
|
|
1902
|
+
* will be considered the account that requested to sign up.
|
|
1903
|
+
*
|
|
1904
|
+
* This extrinsic will perform the following checks and logic:
|
|
1905
|
+
* 1. Check that the extrinsic was signed
|
|
1906
|
+
* 2. Check that the account received has requested to register as a SP
|
|
1907
|
+
* 3. Check that the current randomness is sufficiently fresh to be used as a salt for that request
|
|
1908
|
+
* 4. Check that the request has not expired
|
|
1909
|
+
* 5. Register the signer as a MSP or BSP with the data provided in the request
|
|
1910
|
+
*
|
|
1911
|
+
* Emits `MspSignUpSuccess` or `BspSignUpSuccess` event when successful, depending on the type of sign up.
|
|
1912
|
+
*
|
|
1913
|
+
* Notes:
|
|
1914
|
+
* - This extrinsic could be called by the user itself or by a third party
|
|
1915
|
+
* - The deposit that the user has to pay to register as a SP is held when the user requests to register as a SP
|
|
1916
|
+
* - If this extrinsic is successful, it will be free for the caller, to incentive state de-bloating
|
|
1917
|
+
**/
|
|
1918
|
+
confirmSignUp: AugmentedSubmittable<(providerAccount: Option<AccountId20> | null | Uint8Array | AccountId20 | string) => SubmittableExtrinsic<ApiType>, [
|
|
1919
|
+
Option<AccountId20>
|
|
1920
|
+
]>;
|
|
1921
|
+
/**
|
|
1922
|
+
* Delete a provider from the system.
|
|
1923
|
+
*
|
|
1924
|
+
* This can only be done if the following conditions are met:
|
|
1925
|
+
* - The provider is insolvent.
|
|
1926
|
+
* - The provider has no active payment streams.
|
|
1927
|
+
*
|
|
1928
|
+
* This is a free operation and can be called by anyone with a signed transaction.
|
|
1929
|
+
*
|
|
1930
|
+
* You can utilize the runtime API `can_delete_provider` to check if a provider can be deleted
|
|
1931
|
+
* to automate the process.
|
|
1932
|
+
*
|
|
1933
|
+
* Emits `MspDeleted` or `BspDeleted` event when successful.
|
|
1934
|
+
*
|
|
1935
|
+
* This operation is free if successful to encourage the community to delete insolvent providers,
|
|
1936
|
+
* debloating the state.
|
|
1937
|
+
**/
|
|
1938
|
+
deleteProvider: AugmentedSubmittable<(providerId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1939
|
+
H256
|
|
1940
|
+
]>;
|
|
1941
|
+
/**
|
|
1942
|
+
* Dispatchable extrinsic that allows to forcefully and automatically sing up a Backup Storage Provider.
|
|
1943
|
+
*
|
|
1944
|
+
* The dispatch origin for this call must be Root.
|
|
1945
|
+
* The `who` parameter is the account that wants to sign up as a Backup Storage Provider.
|
|
1946
|
+
*
|
|
1947
|
+
* Funds proportional to the capacity requested are reserved (held) from the account passed as the `who` parameter.
|
|
1948
|
+
*
|
|
1949
|
+
* Parameters:
|
|
1950
|
+
* - `who`: The account that wants to sign up as a Backup Storage Provider.
|
|
1951
|
+
* - `bsp_id`: The Backup Storage Provider ID that the account passed as the `who` parameter is requesting to sign up as.
|
|
1952
|
+
* - `capacity`: The total amount of data that the Backup Storage Provider will be able to store.
|
|
1953
|
+
* - `multiaddresses`: The vector of multiaddresses that the signer wants to register (according to the
|
|
1954
|
+
* [Multiaddr spec](https://github.com/multiformats/multiaddr))
|
|
1955
|
+
*
|
|
1956
|
+
* This extrinsic will perform the steps of:
|
|
1957
|
+
* 1. [request_bsp_sign_up](crate::dispatchables::request_bsp_sign_up)
|
|
1958
|
+
* 2. [confirm_sign_up](crate::dispatchables::confirm_sign_up)
|
|
1959
|
+
*
|
|
1960
|
+
* Emits `BspRequestSignUpSuccess` and `BspSignUpSuccess` events when successful.
|
|
1961
|
+
**/
|
|
1962
|
+
forceBspSignUp: AugmentedSubmittable<(who: AccountId20 | string | Uint8Array, bspId: H256 | string | Uint8Array, capacity: u64 | AnyNumber | Uint8Array, multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[], paymentAccount: AccountId20 | string | Uint8Array, weight: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [
|
|
1963
|
+
AccountId20,
|
|
1964
|
+
H256,
|
|
1965
|
+
u64,
|
|
1966
|
+
Vec<Bytes>,
|
|
1967
|
+
AccountId20,
|
|
1968
|
+
Option<u32>
|
|
1969
|
+
]>;
|
|
1970
|
+
/**
|
|
1971
|
+
* Dispatchable extrinsic that allows to forcefully and automatically sign up a Main Storage Provider.
|
|
1972
|
+
*
|
|
1973
|
+
* The dispatch origin for this call must be Root.
|
|
1974
|
+
* The `who` parameter is the account that wants to sign up as a Main Storage Provider.
|
|
1975
|
+
*
|
|
1976
|
+
* Funds proportional to the capacity requested are reserved (held) from the account passed as the `who` parameter.
|
|
1977
|
+
*
|
|
1978
|
+
* Parameters:
|
|
1979
|
+
* - `who`: The account that wants to sign up as a Main Storage Provider.
|
|
1980
|
+
* - `msp_id`: The Main Storage Provider ID that the account passed as the `who` parameter is requesting to sign up as.
|
|
1981
|
+
* - `capacity`: The total amount of data that the Main Storage Provider will be able to store.
|
|
1982
|
+
* - `multiaddresses`: The vector of multiaddresses that the signer wants to register (according to the
|
|
1983
|
+
* [Multiaddr spec](https://github.com/multiformats/multiaddr))
|
|
1984
|
+
* - `value_prop`: The value proposition that the signer will provide as a Main Storage Provider to
|
|
1985
|
+
* users and wants to register on-chain. It could be data limits, communication protocols to access the user's
|
|
1986
|
+
* data, and more.
|
|
1987
|
+
*
|
|
1988
|
+
* This extrinsic will perform the steps of:
|
|
1989
|
+
* 1. [request_msp_sign_up](crate::dispatchables::request_msp_sign_up)
|
|
1990
|
+
* 2. [confirm_sign_up](crate::dispatchables::confirm_sign_up)
|
|
1991
|
+
*
|
|
1992
|
+
* Emits `MspRequestSignUpSuccess` and `MspSignUpSuccess` events when successful.
|
|
1993
|
+
**/
|
|
1994
|
+
forceMspSignUp: AugmentedSubmittable<(who: AccountId20 | string | Uint8Array, mspId: H256 | string | Uint8Array, capacity: u64 | AnyNumber | Uint8Array, multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[], valuePropPricePerGigaUnitOfDataPerBlock: u128 | AnyNumber | Uint8Array, commitment: Bytes | string | Uint8Array, valuePropMaxDataLimit: u64 | AnyNumber | Uint8Array, paymentAccount: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
1995
|
+
AccountId20,
|
|
1996
|
+
H256,
|
|
1997
|
+
u64,
|
|
1998
|
+
Vec<Bytes>,
|
|
1999
|
+
u128,
|
|
2000
|
+
Bytes,
|
|
2001
|
+
u64,
|
|
2002
|
+
AccountId20
|
|
2003
|
+
]>;
|
|
2004
|
+
/**
|
|
2005
|
+
* Dispatchable extrinsic only callable by an MSP that allows it to make a value proposition unavailable.
|
|
2006
|
+
*
|
|
2007
|
+
* This operation cannot be reversed. You can only add new value propositions.
|
|
2008
|
+
* This will not affect existing buckets which are using this value proposition.
|
|
2009
|
+
**/
|
|
2010
|
+
makeValuePropUnavailable: AugmentedSubmittable<(valuePropId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2011
|
+
H256
|
|
2012
|
+
]>;
|
|
2013
|
+
/**
|
|
2014
|
+
* Dispatchable extrinsic that allows users to sign off as a Main Storage Provider.
|
|
2015
|
+
*
|
|
2016
|
+
* The dispatch origin for this call must be Signed.
|
|
2017
|
+
* The origin must be the account that wants to sign off as a Main Storage Provider.
|
|
2018
|
+
*
|
|
2019
|
+
* This extrinsic will perform the following checks and logic:
|
|
2020
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
2021
|
+
* 2. Check that the signer is registered as a MSP
|
|
2022
|
+
* 3. Check that the MSP has no storage assigned to it (no buckets or data used by it)
|
|
2023
|
+
* 4. Update the MSPs storage, removing the signer as an MSP
|
|
2024
|
+
* 5. Return the deposit to the signer
|
|
2025
|
+
* 6. Decrement the storage that holds total amount of MSPs currently in the system
|
|
2026
|
+
*
|
|
2027
|
+
* Emits `MspSignOffSuccess` event when successful.
|
|
2028
|
+
**/
|
|
2029
|
+
mspSignOff: AugmentedSubmittable<(mspId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2030
|
+
H256
|
|
2031
|
+
]>;
|
|
2032
|
+
/**
|
|
2033
|
+
* Dispatchable extrinsic that allows BSPs and MSPs to remove an existing multiaddress from their account.
|
|
2034
|
+
*
|
|
2035
|
+
* The dispatch origin for this call must be Signed.
|
|
2036
|
+
* The origin must be the account that wants to remove a multiaddress.
|
|
2037
|
+
*
|
|
2038
|
+
* Parameters:
|
|
2039
|
+
* - `multiaddress`: The multiaddress that the signer wants to remove from its account.
|
|
2040
|
+
*
|
|
2041
|
+
* This extrinsic will perform the following checks and logic:
|
|
2042
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
2043
|
+
* 2. Check that the signer is registered as a MSP or BSP.
|
|
2044
|
+
* 3. Check that the multiaddress exists in the Provider's account.
|
|
2045
|
+
* 4. Update the Provider's storage to remove the multiaddress.
|
|
2046
|
+
*
|
|
2047
|
+
* Emits `MultiAddressRemoved` event when successful.
|
|
2048
|
+
**/
|
|
2049
|
+
removeMultiaddress: AugmentedSubmittable<(multiaddress: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2050
|
+
Bytes
|
|
2051
|
+
]>;
|
|
2052
|
+
/**
|
|
2053
|
+
* Dispatchable extrinsic that allows users to sign up as a Backup Storage Provider.
|
|
2054
|
+
*
|
|
2055
|
+
* The dispatch origin for this call must be Signed.
|
|
2056
|
+
* The origin must be the account that wants to sign up as a Backup Storage Provider.
|
|
2057
|
+
*
|
|
2058
|
+
* Funds proportional to the capacity requested are reserved (held) from the account.
|
|
2059
|
+
*
|
|
2060
|
+
* Parameters:
|
|
2061
|
+
* - `capacity`: The total amount of data that the Backup Storage Provider will be able to store.
|
|
2062
|
+
* - `multiaddresses`: The vector of multiaddresses that the signer wants to register (according to the
|
|
2063
|
+
* [Multiaddr spec](https://github.com/multiformats/multiaddr))
|
|
2064
|
+
*
|
|
2065
|
+
* This extrinsic will perform the following checks and logic:
|
|
2066
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
2067
|
+
* 2. Check that the signer is not already registered as either a MSP or BSP
|
|
2068
|
+
* 3. Check that the multiaddress is valid
|
|
2069
|
+
* 4. Check that the data to be stored is greater than the minimum required by the runtime
|
|
2070
|
+
* 5. Calculate how much deposit will the signer have to pay using the amount of data it wants to store
|
|
2071
|
+
* 6. Check that the signer has enough funds to pay the deposit
|
|
2072
|
+
* 7. Hold the deposit from the signer
|
|
2073
|
+
* 8. Update the Sign Up Requests storage to add the signer as requesting to sign up as a BSP
|
|
2074
|
+
*
|
|
2075
|
+
* Emits `BspRequestSignUpSuccess` event when successful.
|
|
2076
|
+
**/
|
|
2077
|
+
requestBspSignUp: AugmentedSubmittable<(capacity: u64 | AnyNumber | Uint8Array, multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[], paymentAccount: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2078
|
+
u64,
|
|
2079
|
+
Vec<Bytes>,
|
|
2080
|
+
AccountId20
|
|
2081
|
+
]>;
|
|
2082
|
+
/**
|
|
2083
|
+
* Dispatchable extrinsic that allows users to request to sign up as a Main Storage Provider.
|
|
2084
|
+
*
|
|
2085
|
+
* The dispatch origin for this call must be Signed.
|
|
2086
|
+
* The origin must be the account that wants to sign up as a Main Storage Provider.
|
|
2087
|
+
*
|
|
2088
|
+
* Funds proportional to the capacity requested are reserved (held) from the account.
|
|
2089
|
+
*
|
|
2090
|
+
* Parameters:
|
|
2091
|
+
* - `capacity`: The total amount of data that the Main Storage Provider will be able to store.
|
|
2092
|
+
* - `multiaddresses`: The vector of multiaddresses that the signer wants to register (according to the
|
|
2093
|
+
* [Multiaddr spec](https://github.com/multiformats/multiaddr))
|
|
2094
|
+
* - `value_prop`: The value proposition that the signer will provide as a Main Storage Provider to
|
|
2095
|
+
* users and wants to register on-chain. It could be data limits, communication protocols to access the user's
|
|
2096
|
+
* data, and more.
|
|
2097
|
+
*
|
|
2098
|
+
* This extrinsic will perform the following checks and logic:
|
|
2099
|
+
* 1. Check that the extrinsic was signed and get the signer.
|
|
2100
|
+
* 2. Check that the signer is not already registered as either a MSP or BSP
|
|
2101
|
+
* 3. Check that the multiaddress is valid
|
|
2102
|
+
* 4. Check that the data to be stored is greater than the minimum required by the runtime.
|
|
2103
|
+
* 5. Calculate how much deposit will the signer have to pay using the amount of data it wants to store
|
|
2104
|
+
* 6. Check that the signer has enough funds to pay the deposit
|
|
2105
|
+
* 7. Hold the deposit from the signer
|
|
2106
|
+
* 8. Update the Sign Up Requests storage to add the signer as requesting to sign up as a MSP
|
|
2107
|
+
*
|
|
2108
|
+
* Emits `MspRequestSignUpSuccess` event when successful.
|
|
2109
|
+
**/
|
|
2110
|
+
requestMspSignUp: AugmentedSubmittable<(capacity: u64 | AnyNumber | Uint8Array, multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[], valuePropPricePerGigaUnitOfDataPerBlock: u128 | AnyNumber | Uint8Array, commitment: Bytes | string | Uint8Array, valuePropMaxDataLimit: u64 | AnyNumber | Uint8Array, paymentAccount: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2111
|
+
u64,
|
|
2112
|
+
Vec<Bytes>,
|
|
2113
|
+
u128,
|
|
2114
|
+
Bytes,
|
|
2115
|
+
u64,
|
|
2116
|
+
AccountId20
|
|
2117
|
+
]>;
|
|
2118
|
+
/**
|
|
2119
|
+
* Dispatchable extrinsic to slash a _slashable_ Storage Provider.
|
|
2120
|
+
*
|
|
2121
|
+
* A Storage Provider is _slashable_ iff it has failed to respond to challenges for providing proofs of storage.
|
|
2122
|
+
* In the context of the StorageHub protocol, the proofs-dealer pallet marks a Storage Provider as _slashable_ when it fails to respond to challenges.
|
|
2123
|
+
*
|
|
2124
|
+
* This is a free operation to incentivise the community to slash misbehaving providers.
|
|
2125
|
+
**/
|
|
2126
|
+
slash: AugmentedSubmittable<(providerId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2127
|
+
H256
|
|
2128
|
+
]>;
|
|
2129
|
+
/**
|
|
2130
|
+
* BSP operation to stop all of your automatic cycles.
|
|
2131
|
+
*
|
|
2132
|
+
* This includes:
|
|
2133
|
+
*
|
|
2134
|
+
* - Commit reveal randomness cycle
|
|
2135
|
+
* - Proof challenge cycle
|
|
2136
|
+
*
|
|
2137
|
+
* If you are an BSP, the only requirement that must be met is that your root is the default one (an empty root).
|
|
2138
|
+
**/
|
|
2139
|
+
stopAllCycles: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
2140
|
+
/**
|
|
2141
|
+
* Dispatchable extrinsic to top-up the deposit of a Storage Provider.
|
|
2142
|
+
*
|
|
2143
|
+
* The dispatch origin for this call must be signed.
|
|
2144
|
+
**/
|
|
2145
|
+
topUpDeposit: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
2146
|
+
/**
|
|
2147
|
+
* Generic tx
|
|
2148
|
+
**/
|
|
2149
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
2150
|
+
};
|
|
2151
|
+
randomness: {
|
|
2152
|
+
/**
|
|
2153
|
+
* This inherent that must be included (DispatchClass::Mandatory) at each block saves the latest randomness available from the
|
|
2154
|
+
* relay chain into a variable that can then be used as a seed for commitments that happened during
|
|
2155
|
+
* the previous relay chain epoch
|
|
2156
|
+
**/
|
|
2157
|
+
setBabeRandomness: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
2158
|
+
/**
|
|
2159
|
+
* Generic tx
|
|
2160
|
+
**/
|
|
2161
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
2162
|
+
};
|
|
2163
|
+
session: {
|
|
2164
|
+
/**
|
|
2165
|
+
* Removes any session key(s) of the function caller.
|
|
2166
|
+
*
|
|
2167
|
+
* This doesn't take effect until the next session.
|
|
2168
|
+
*
|
|
2169
|
+
* The dispatch origin of this function must be Signed and the account must be either be
|
|
2170
|
+
* convertible to a validator ID using the chain's typical addressing system (this usually
|
|
2171
|
+
* means being a controller account) or directly convertible into a validator ID (which
|
|
2172
|
+
* usually means being a stash account).
|
|
2173
|
+
*
|
|
2174
|
+
* ## Complexity
|
|
2175
|
+
* - `O(1)` in number of key types. Actual cost depends on the number of length of
|
|
2176
|
+
* `T::Keys::key_ids()` which is fixed.
|
|
2177
|
+
**/
|
|
2178
|
+
purgeKeys: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
2179
|
+
/**
|
|
2180
|
+
* Sets the session key(s) of the function caller to `keys`.
|
|
2181
|
+
* Allows an account to set its session key prior to becoming a validator.
|
|
2182
|
+
* This doesn't take effect until the next session.
|
|
2183
|
+
*
|
|
2184
|
+
* The dispatch origin of this function must be signed.
|
|
2185
|
+
*
|
|
2186
|
+
* ## Complexity
|
|
2187
|
+
* - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is
|
|
2188
|
+
* fixed.
|
|
2189
|
+
**/
|
|
2190
|
+
setKeys: AugmentedSubmittable<(keys: ShSolochainEvmRuntimeSessionKeys | {
|
|
2191
|
+
babe?: any;
|
|
2192
|
+
grandpa?: any;
|
|
2193
|
+
} | string | Uint8Array, proof: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2194
|
+
ShSolochainEvmRuntimeSessionKeys,
|
|
2195
|
+
Bytes
|
|
2196
|
+
]>;
|
|
2197
|
+
/**
|
|
2198
|
+
* Generic tx
|
|
2199
|
+
**/
|
|
2200
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
2201
|
+
};
|
|
2202
|
+
sudo: {
|
|
2203
|
+
/**
|
|
2204
|
+
* Permanently removes the sudo key.
|
|
2205
|
+
*
|
|
2206
|
+
* **This cannot be un-done.**
|
|
2207
|
+
**/
|
|
2208
|
+
removeKey: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
2209
|
+
/**
|
|
2210
|
+
* Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo
|
|
2211
|
+
* key.
|
|
2212
|
+
**/
|
|
2213
|
+
setKey: AugmentedSubmittable<(updated: AccountId20 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2214
|
+
AccountId20
|
|
2215
|
+
]>;
|
|
2216
|
+
/**
|
|
2217
|
+
* Authenticates the sudo key and dispatches a function call with `Root` origin.
|
|
2218
|
+
**/
|
|
2219
|
+
sudo: AugmentedSubmittable<(call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2220
|
+
Call
|
|
2221
|
+
]>;
|
|
2222
|
+
/**
|
|
2223
|
+
* Authenticates the sudo key and dispatches a function call with `Signed` origin from
|
|
2224
|
+
* a given account.
|
|
2225
|
+
*
|
|
2226
|
+
* The dispatch origin for this call must be _Signed_.
|
|
2227
|
+
**/
|
|
2228
|
+
sudoAs: AugmentedSubmittable<(who: AccountId20 | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2229
|
+
AccountId20,
|
|
2230
|
+
Call
|
|
2231
|
+
]>;
|
|
2232
|
+
/**
|
|
2233
|
+
* Authenticates the sudo key and dispatches a function call with `Root` origin.
|
|
2234
|
+
* This function does not check the weight of the call, and instead allows the
|
|
2235
|
+
* Sudo user to specify the weight of the call.
|
|
2236
|
+
*
|
|
2237
|
+
* The dispatch origin for this call must be _Signed_.
|
|
2238
|
+
**/
|
|
2239
|
+
sudoUncheckedWeight: AugmentedSubmittable<(call: Call | IMethod | string | Uint8Array, weight: SpWeightsWeightV2Weight | {
|
|
2240
|
+
refTime?: any;
|
|
2241
|
+
proofSize?: any;
|
|
2242
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2243
|
+
Call,
|
|
2244
|
+
SpWeightsWeightV2Weight
|
|
2245
|
+
]>;
|
|
2246
|
+
/**
|
|
2247
|
+
* Generic tx
|
|
2248
|
+
**/
|
|
2249
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
2250
|
+
};
|
|
2251
|
+
system: {
|
|
2252
|
+
/**
|
|
2253
|
+
* Provide the preimage (runtime binary) `code` for an upgrade that has been authorized.
|
|
2254
|
+
*
|
|
2255
|
+
* If the authorization required a version check, this call will ensure the spec name
|
|
2256
|
+
* remains unchanged and that the spec version has increased.
|
|
2257
|
+
*
|
|
2258
|
+
* Depending on the runtime's `OnSetCode` configuration, this function may directly apply
|
|
2259
|
+
* the new `code` in the same block or attempt to schedule the upgrade.
|
|
2260
|
+
*
|
|
2261
|
+
* All origins are allowed.
|
|
2262
|
+
**/
|
|
2263
|
+
applyAuthorizedUpgrade: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2264
|
+
Bytes
|
|
2265
|
+
]>;
|
|
2266
|
+
/**
|
|
2267
|
+
* Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied
|
|
2268
|
+
* later.
|
|
2269
|
+
*
|
|
2270
|
+
* This call requires Root origin.
|
|
2271
|
+
**/
|
|
2272
|
+
authorizeUpgrade: AugmentedSubmittable<(codeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2273
|
+
H256
|
|
2274
|
+
]>;
|
|
2275
|
+
/**
|
|
2276
|
+
* Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied
|
|
2277
|
+
* later.
|
|
2278
|
+
*
|
|
2279
|
+
* WARNING: This authorizes an upgrade that will take place without any safety checks, for
|
|
2280
|
+
* example that the spec name remains the same and that the version number increases. Not
|
|
2281
|
+
* recommended for normal use. Use `authorize_upgrade` instead.
|
|
2282
|
+
*
|
|
2283
|
+
* This call requires Root origin.
|
|
2284
|
+
**/
|
|
2285
|
+
authorizeUpgradeWithoutChecks: AugmentedSubmittable<(codeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2286
|
+
H256
|
|
2287
|
+
]>;
|
|
2288
|
+
/**
|
|
2289
|
+
* Kill all storage items with a key that starts with the given prefix.
|
|
2290
|
+
*
|
|
2291
|
+
* **NOTE:** We rely on the Root origin to provide us the number of subkeys under
|
|
2292
|
+
* the prefix we are removing to accurately calculate the weight of this function.
|
|
2293
|
+
**/
|
|
2294
|
+
killPrefix: AugmentedSubmittable<(prefix: Bytes | string | Uint8Array, subkeys: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2295
|
+
Bytes,
|
|
2296
|
+
u32
|
|
2297
|
+
]>;
|
|
2298
|
+
/**
|
|
2299
|
+
* Kill some items from storage.
|
|
2300
|
+
**/
|
|
2301
|
+
killStorage: AugmentedSubmittable<(keys: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
|
|
2302
|
+
Vec<Bytes>
|
|
2303
|
+
]>;
|
|
2304
|
+
/**
|
|
2305
|
+
* Make some on-chain remark.
|
|
2306
|
+
*
|
|
2307
|
+
* Can be executed by every `origin`.
|
|
2308
|
+
**/
|
|
2309
|
+
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2310
|
+
Bytes
|
|
2311
|
+
]>;
|
|
2312
|
+
/**
|
|
2313
|
+
* Make some on-chain remark and emit event.
|
|
2314
|
+
**/
|
|
2315
|
+
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2316
|
+
Bytes
|
|
2317
|
+
]>;
|
|
2318
|
+
/**
|
|
2319
|
+
* Set the new runtime code.
|
|
2320
|
+
**/
|
|
2321
|
+
setCode: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2322
|
+
Bytes
|
|
2323
|
+
]>;
|
|
2324
|
+
/**
|
|
2325
|
+
* Set the new runtime code without doing any checks of the given `code`.
|
|
2326
|
+
*
|
|
2327
|
+
* Note that runtime upgrades will not run if this is called with a not-increasing spec
|
|
2328
|
+
* version!
|
|
2329
|
+
**/
|
|
2330
|
+
setCodeWithoutChecks: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2331
|
+
Bytes
|
|
2332
|
+
]>;
|
|
2333
|
+
/**
|
|
2334
|
+
* Set the number of pages in the WebAssembly environment's heap.
|
|
2335
|
+
**/
|
|
2336
|
+
setHeapPages: AugmentedSubmittable<(pages: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2337
|
+
u64
|
|
2338
|
+
]>;
|
|
2339
|
+
/**
|
|
2340
|
+
* Set some items of storage.
|
|
2341
|
+
**/
|
|
2342
|
+
setStorage: AugmentedSubmittable<(items: Vec<ITuple<[Bytes, Bytes]>> | [Bytes | string | Uint8Array, Bytes | string | Uint8Array][]) => SubmittableExtrinsic<ApiType>, [
|
|
2343
|
+
Vec<ITuple<[Bytes, Bytes]>>
|
|
2344
|
+
]>;
|
|
2345
|
+
/**
|
|
2346
|
+
* Generic tx
|
|
2347
|
+
**/
|
|
2348
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
2349
|
+
};
|
|
2350
|
+
timestamp: {
|
|
2351
|
+
/**
|
|
2352
|
+
* Set the current time.
|
|
2353
|
+
*
|
|
2354
|
+
* This call should be invoked exactly once per block. It will panic at the finalization
|
|
2355
|
+
* phase, if this call hasn't been invoked by that time.
|
|
2356
|
+
*
|
|
2357
|
+
* The timestamp should be greater than the previous one by the amount specified by
|
|
2358
|
+
* [`Config::MinimumPeriod`].
|
|
2359
|
+
*
|
|
2360
|
+
* The dispatch origin for this call must be _None_.
|
|
2361
|
+
*
|
|
2362
|
+
* This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware
|
|
2363
|
+
* that changing the complexity of this call could result exhausting the resources in a
|
|
2364
|
+
* block to execute any other calls.
|
|
2365
|
+
*
|
|
2366
|
+
* ## Complexity
|
|
2367
|
+
* - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)
|
|
2368
|
+
* - 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in
|
|
2369
|
+
* `on_finalize`)
|
|
2370
|
+
* - 1 event handler `on_timestamp_set`. Must be `O(1)`.
|
|
2371
|
+
**/
|
|
2372
|
+
set: AugmentedSubmittable<(now: Compact<u64> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
|
|
2373
|
+
Compact<u64>
|
|
2374
|
+
]>;
|
|
2375
|
+
/**
|
|
2376
|
+
* Generic tx
|
|
2377
|
+
**/
|
|
2378
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
2379
|
+
};
|
|
2380
|
+
}
|
|
2381
|
+
}
|