@d9-network/spec 1.2.2 → 1.2.4
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/node_modules/@polkadot-api/descriptors/dist/chunk-7P6ASYW6.mjs +9 -0
- package/node_modules/@polkadot-api/descriptors/dist/common-types.d.ts +3371 -0
- package/node_modules/@polkadot-api/descriptors/dist/common.d.ts +1 -0
- package/node_modules/@polkadot-api/descriptors/dist/contracts/burnManager.d.ts +183 -0
- package/node_modules/@polkadot-api/descriptors/dist/contracts/burnMining.d.ts +184 -0
- package/node_modules/@polkadot-api/descriptors/dist/contracts/crossChainTransfer.d.ts +249 -0
- package/node_modules/@polkadot-api/descriptors/dist/contracts/index.d.ts +8 -0
- package/node_modules/@polkadot-api/descriptors/dist/contracts/marketMaker.d.ts +209 -0
- package/node_modules/@polkadot-api/descriptors/dist/contracts/merchantMining.d.ts +263 -0
- package/node_modules/@polkadot-api/descriptors/dist/contracts/miningPool.d.ts +159 -0
- package/node_modules/@polkadot-api/descriptors/dist/contracts/nodeReward.d.ts +172 -0
- package/node_modules/@polkadot-api/descriptors/dist/contracts/usdt.d.ts +145 -0
- package/node_modules/@polkadot-api/descriptors/dist/d9.d.ts +3346 -0
- package/node_modules/@polkadot-api/descriptors/dist/d9_metadata-EHIEZLL5.mjs +8 -0
- package/node_modules/@polkadot-api/descriptors/dist/d9_metadata.d.ts +2 -0
- package/node_modules/@polkadot-api/descriptors/dist/descriptors-JQ4ZJQ4V.mjs +29 -0
- package/node_modules/@polkadot-api/descriptors/dist/descriptors.d.ts +1 -0
- package/node_modules/@polkadot-api/descriptors/dist/index.d.ts +11 -0
- package/node_modules/@polkadot-api/descriptors/dist/index.js +200 -0
- package/node_modules/@polkadot-api/descriptors/dist/index.mjs +115 -0
- package/node_modules/@polkadot-api/descriptors/dist/metadataTypes-32V7BYUB.mjs +8 -0
- package/node_modules/@polkadot-api/descriptors/dist/metadataTypes.d.ts +2 -0
- package/node_modules/@polkadot-api/descriptors/generated.json +1 -0
- package/node_modules/@polkadot-api/descriptors/package.json +24 -0
- package/package.json +5 -2
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { SS58String, ResultPayload, FixedSizeArray, FixedSizeBinary, Enum, Binary } from 'polkadot-api';
|
|
2
|
+
import type { InkDescriptors } from 'polkadot-api/ink';
|
|
3
|
+
type AnonymousEnum<T extends {}> = T & {
|
|
4
|
+
__anonymous: true;
|
|
5
|
+
};
|
|
6
|
+
type MyTuple<T> = [T, ...T[]];
|
|
7
|
+
type SeparateUndefined<T> = undefined extends T ? undefined | Exclude<T, undefined> : T;
|
|
8
|
+
type Anonymize<T> = SeparateUndefined<T extends FixedSizeBinary<infer L> ? number extends L ? Binary : FixedSizeBinary<L> : T extends string | number | bigint | boolean | void | undefined | null | symbol | Uint8Array | Enum<any> ? T : T extends AnonymousEnum<infer V> ? Enum<V> : T extends MyTuple<any> ? {
|
|
9
|
+
[K in keyof T]: T[K];
|
|
10
|
+
} : T extends [] ? [] : T extends FixedSizeArray<infer L, infer T> ? number extends L ? Array<T> : FixedSizeArray<L, T> : {
|
|
11
|
+
[K in keyof T & string]: T[K];
|
|
12
|
+
}>;
|
|
13
|
+
type T0 = ResultPayload<undefined, Anonymize<T1>>;
|
|
14
|
+
type T1 = Enum<{
|
|
15
|
+
"CouldNotReadInput": undefined;
|
|
16
|
+
}>;
|
|
17
|
+
type T2 = ResultPayload<ResultPayload<undefined, Enum<{
|
|
18
|
+
"OnlyCallableBy": SS58String;
|
|
19
|
+
"BeyondQualificationForNodeStatus": undefined;
|
|
20
|
+
"ErrorIssuingPayment": undefined;
|
|
21
|
+
"ErrorGettingSessionPoolFromMiningPoolContract": undefined;
|
|
22
|
+
"NotAuthorizedToWithdraw": undefined;
|
|
23
|
+
"NothingToWithdraw": undefined;
|
|
24
|
+
"ErrorGettingCurrentValidators": undefined;
|
|
25
|
+
}>>, Anonymize<T1>>;
|
|
26
|
+
type StorageDescriptor = {
|
|
27
|
+
"session_rewards": {
|
|
28
|
+
"key": undefined;
|
|
29
|
+
"value": {
|
|
30
|
+
"0": bigint;
|
|
31
|
+
"1": bigint;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
"node_reward": {
|
|
35
|
+
"key": undefined;
|
|
36
|
+
"value": bigint;
|
|
37
|
+
};
|
|
38
|
+
"authorized_reward_receiver": {
|
|
39
|
+
"key": undefined;
|
|
40
|
+
"value": SS58String;
|
|
41
|
+
};
|
|
42
|
+
"": {
|
|
43
|
+
"key": undefined;
|
|
44
|
+
"value": {
|
|
45
|
+
"admin": SS58String;
|
|
46
|
+
"new_admin": SS58String;
|
|
47
|
+
"mining_pool": SS58String;
|
|
48
|
+
"rewards_pallet": SS58String;
|
|
49
|
+
"vote_limit": bigint;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
type MessagesDescriptor = {
|
|
54
|
+
"set_mining_pool": {
|
|
55
|
+
"message": {
|
|
56
|
+
"mining_pool": SS58String;
|
|
57
|
+
};
|
|
58
|
+
"response": Anonymize<T2>;
|
|
59
|
+
"mutates": true;
|
|
60
|
+
};
|
|
61
|
+
"set_rewards_pallet": {
|
|
62
|
+
"message": {
|
|
63
|
+
"rewards_pallet": SS58String;
|
|
64
|
+
};
|
|
65
|
+
"response": Anonymize<T2>;
|
|
66
|
+
"mutates": true;
|
|
67
|
+
};
|
|
68
|
+
"relinquish_admin": {
|
|
69
|
+
"message": {
|
|
70
|
+
"new_admin": SS58String;
|
|
71
|
+
};
|
|
72
|
+
"response": Anonymize<T2>;
|
|
73
|
+
"mutates": true;
|
|
74
|
+
};
|
|
75
|
+
"accept_admin": {
|
|
76
|
+
"message": {};
|
|
77
|
+
"response": Anonymize<T2>;
|
|
78
|
+
"mutates": true;
|
|
79
|
+
};
|
|
80
|
+
"cancel_admin_relinquish": {
|
|
81
|
+
"message": {};
|
|
82
|
+
"response": Anonymize<T2>;
|
|
83
|
+
"mutates": true;
|
|
84
|
+
};
|
|
85
|
+
"get_vote_limit": {
|
|
86
|
+
"message": {};
|
|
87
|
+
"response": ResultPayload<bigint, Anonymize<T1>>;
|
|
88
|
+
};
|
|
89
|
+
"change_vote_limit": {
|
|
90
|
+
"message": {
|
|
91
|
+
"new_limit": bigint;
|
|
92
|
+
};
|
|
93
|
+
"response": Anonymize<T2>;
|
|
94
|
+
"mutates": true;
|
|
95
|
+
};
|
|
96
|
+
"withdraw_reward": {
|
|
97
|
+
"message": {
|
|
98
|
+
"node_id": SS58String;
|
|
99
|
+
};
|
|
100
|
+
"response": Anonymize<T2>;
|
|
101
|
+
"mutates": true;
|
|
102
|
+
};
|
|
103
|
+
"get_session_rewards_data": {
|
|
104
|
+
"message": {
|
|
105
|
+
"session_index": number;
|
|
106
|
+
};
|
|
107
|
+
"response": ResultPayload<(FixedSizeArray<2, bigint>) | undefined, Anonymize<T1>>;
|
|
108
|
+
};
|
|
109
|
+
"get_node_reward_data": {
|
|
110
|
+
"message": {
|
|
111
|
+
"node_id": SS58String;
|
|
112
|
+
};
|
|
113
|
+
"response": ResultPayload<(bigint) | undefined, Anonymize<T1>>;
|
|
114
|
+
};
|
|
115
|
+
"get_authorized_receiver": {
|
|
116
|
+
"message": {
|
|
117
|
+
"node_id": SS58String;
|
|
118
|
+
};
|
|
119
|
+
"response": ResultPayload<SS58String, Anonymize<T1>>;
|
|
120
|
+
};
|
|
121
|
+
"set_authorized_receiver": {
|
|
122
|
+
"message": {
|
|
123
|
+
"node_id": SS58String;
|
|
124
|
+
"receiver": SS58String;
|
|
125
|
+
};
|
|
126
|
+
"response": Anonymize<T2>;
|
|
127
|
+
"mutates": true;
|
|
128
|
+
};
|
|
129
|
+
"remove_authorized_receiver": {
|
|
130
|
+
"message": {
|
|
131
|
+
"node_id": SS58String;
|
|
132
|
+
};
|
|
133
|
+
"response": Anonymize<T2>;
|
|
134
|
+
"mutates": true;
|
|
135
|
+
};
|
|
136
|
+
"update_rewards": {
|
|
137
|
+
"message": {
|
|
138
|
+
"last_session": number;
|
|
139
|
+
"sorted_nodes_and_votes": Array<[SS58String, bigint]>;
|
|
140
|
+
};
|
|
141
|
+
"response": Anonymize<T2>;
|
|
142
|
+
"mutates": true;
|
|
143
|
+
};
|
|
144
|
+
"set_code": {
|
|
145
|
+
"message": {
|
|
146
|
+
"code_hash": FixedSizeBinary<32>;
|
|
147
|
+
};
|
|
148
|
+
"response": Anonymize<T0>;
|
|
149
|
+
"mutates": true;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
type ConstructorsDescriptor = {
|
|
153
|
+
/**
|
|
154
|
+
* Constructor that initializes the `bool` value to the given `init_value`.
|
|
155
|
+
*/
|
|
156
|
+
"new": {
|
|
157
|
+
"message": {
|
|
158
|
+
"mining_pool": SS58String;
|
|
159
|
+
"rewards_pallet": SS58String;
|
|
160
|
+
};
|
|
161
|
+
"response": Anonymize<T0>;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
type EventDescriptor = Enum<{
|
|
165
|
+
"NodeRewardPaid": {
|
|
166
|
+
"node": SS58String;
|
|
167
|
+
"receiver": SS58String;
|
|
168
|
+
"amount": bigint;
|
|
169
|
+
};
|
|
170
|
+
}>;
|
|
171
|
+
export declare const descriptor: InkDescriptors<StorageDescriptor, MessagesDescriptor, ConstructorsDescriptor, EventDescriptor>;
|
|
172
|
+
export {};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { SS58String, Binary, ResultPayload, Enum, FixedSizeBinary, FixedSizeArray } from 'polkadot-api';
|
|
2
|
+
import type { InkDescriptors } from 'polkadot-api/ink';
|
|
3
|
+
type AnonymousEnum<T extends {}> = T & {
|
|
4
|
+
__anonymous: true;
|
|
5
|
+
};
|
|
6
|
+
type MyTuple<T> = [T, ...T[]];
|
|
7
|
+
type SeparateUndefined<T> = undefined extends T ? undefined | Exclude<T, undefined> : T;
|
|
8
|
+
type Anonymize<T> = SeparateUndefined<T extends FixedSizeBinary<infer L> ? number extends L ? Binary : FixedSizeBinary<L> : T extends string | number | bigint | boolean | void | undefined | null | symbol | Uint8Array | Enum<any> ? T : T extends AnonymousEnum<infer V> ? Enum<V> : T extends MyTuple<any> ? {
|
|
9
|
+
[K in keyof T]: T[K];
|
|
10
|
+
} : T extends [] ? [] : T extends FixedSizeArray<infer L, infer T> ? number extends L ? Array<T> : FixedSizeArray<L, T> : {
|
|
11
|
+
[K in keyof T & string]: T[K];
|
|
12
|
+
}>;
|
|
13
|
+
type T0 = Enum<{
|
|
14
|
+
"CouldNotReadInput": undefined;
|
|
15
|
+
}>;
|
|
16
|
+
type T1 = ResultPayload<ResultPayload<undefined, Enum<{
|
|
17
|
+
"Custom": string;
|
|
18
|
+
"InsufficientBalance": undefined;
|
|
19
|
+
"InsufficientAllowance": undefined;
|
|
20
|
+
"ZeroRecipientAddress": undefined;
|
|
21
|
+
"ZeroSenderAddress": undefined;
|
|
22
|
+
"SafeTransferCheckFailed": string;
|
|
23
|
+
}>>, Anonymize<T0>>;
|
|
24
|
+
type T2 = ResultPayload<bigint, Anonymize<T0>>;
|
|
25
|
+
type StorageDescriptor = {
|
|
26
|
+
"psp22.supply": {
|
|
27
|
+
"key": undefined;
|
|
28
|
+
"value": bigint;
|
|
29
|
+
};
|
|
30
|
+
"psp22.balances": {
|
|
31
|
+
"key": undefined;
|
|
32
|
+
"value": bigint;
|
|
33
|
+
};
|
|
34
|
+
"psp22.allowances": {
|
|
35
|
+
"key": undefined;
|
|
36
|
+
"value": bigint;
|
|
37
|
+
};
|
|
38
|
+
"": {
|
|
39
|
+
"key": undefined;
|
|
40
|
+
"value": {};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
type MessagesDescriptor = {
|
|
44
|
+
"transfer": {
|
|
45
|
+
"message": {
|
|
46
|
+
"to": SS58String;
|
|
47
|
+
"value": bigint;
|
|
48
|
+
"_data": Binary;
|
|
49
|
+
};
|
|
50
|
+
"response": Anonymize<T1>;
|
|
51
|
+
"mutates": true;
|
|
52
|
+
};
|
|
53
|
+
"transfer_from": {
|
|
54
|
+
"message": {
|
|
55
|
+
"from": SS58String;
|
|
56
|
+
"to": SS58String;
|
|
57
|
+
"value": bigint;
|
|
58
|
+
"_data": Binary;
|
|
59
|
+
};
|
|
60
|
+
"response": Anonymize<T1>;
|
|
61
|
+
"mutates": true;
|
|
62
|
+
};
|
|
63
|
+
"PSP22::total_supply": {
|
|
64
|
+
"message": {};
|
|
65
|
+
"response": Anonymize<T2>;
|
|
66
|
+
};
|
|
67
|
+
"PSP22::transfer": {
|
|
68
|
+
"message": {
|
|
69
|
+
"to": SS58String;
|
|
70
|
+
"value": bigint;
|
|
71
|
+
"data": Binary;
|
|
72
|
+
};
|
|
73
|
+
"response": Anonymize<T1>;
|
|
74
|
+
"mutates": true;
|
|
75
|
+
};
|
|
76
|
+
"PSP22::decrease_allowance": {
|
|
77
|
+
"message": {
|
|
78
|
+
"spender": SS58String;
|
|
79
|
+
"delta_value": bigint;
|
|
80
|
+
};
|
|
81
|
+
"response": Anonymize<T1>;
|
|
82
|
+
"mutates": true;
|
|
83
|
+
};
|
|
84
|
+
"PSP22::balance_of": {
|
|
85
|
+
"message": {
|
|
86
|
+
"owner": SS58String;
|
|
87
|
+
};
|
|
88
|
+
"response": Anonymize<T2>;
|
|
89
|
+
};
|
|
90
|
+
"PSP22::transfer_from": {
|
|
91
|
+
"message": {
|
|
92
|
+
"from": SS58String;
|
|
93
|
+
"to": SS58String;
|
|
94
|
+
"value": bigint;
|
|
95
|
+
"data": Binary;
|
|
96
|
+
};
|
|
97
|
+
"response": Anonymize<T1>;
|
|
98
|
+
"mutates": true;
|
|
99
|
+
};
|
|
100
|
+
"PSP22::increase_allowance": {
|
|
101
|
+
"message": {
|
|
102
|
+
"spender": SS58String;
|
|
103
|
+
"delta_value": bigint;
|
|
104
|
+
};
|
|
105
|
+
"response": Anonymize<T1>;
|
|
106
|
+
"mutates": true;
|
|
107
|
+
};
|
|
108
|
+
"PSP22::approve": {
|
|
109
|
+
"message": {
|
|
110
|
+
"spender": SS58String;
|
|
111
|
+
"value": bigint;
|
|
112
|
+
};
|
|
113
|
+
"response": Anonymize<T1>;
|
|
114
|
+
"mutates": true;
|
|
115
|
+
};
|
|
116
|
+
"PSP22::allowance": {
|
|
117
|
+
"message": {
|
|
118
|
+
"owner": SS58String;
|
|
119
|
+
"spender": SS58String;
|
|
120
|
+
};
|
|
121
|
+
"response": Anonymize<T2>;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
type ConstructorsDescriptor = {
|
|
125
|
+
"new": {
|
|
126
|
+
"message": {
|
|
127
|
+
"initial_supply": bigint;
|
|
128
|
+
};
|
|
129
|
+
"response": ResultPayload<undefined, Anonymize<T0>>;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
type EventDescriptor = Enum<{
|
|
133
|
+
"Approval": {
|
|
134
|
+
"owner": SS58String;
|
|
135
|
+
"spender": SS58String;
|
|
136
|
+
"amount": bigint;
|
|
137
|
+
};
|
|
138
|
+
"Transfer": {
|
|
139
|
+
"from"?: (SS58String) | undefined;
|
|
140
|
+
"to"?: (SS58String) | undefined;
|
|
141
|
+
"value": bigint;
|
|
142
|
+
};
|
|
143
|
+
}>;
|
|
144
|
+
export declare const descriptor: InkDescriptors<StorageDescriptor, MessagesDescriptor, ConstructorsDescriptor, EventDescriptor>;
|
|
145
|
+
export {};
|