@dfns/sdk 0.6.5 → 0.6.6-rc.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/dfnsApiClient.d.ts +2 -0
- package/dfnsApiClient.js +4 -0
- package/dfnsDelegatedApiClient.d.ts +2 -0
- package/dfnsDelegatedApiClient.js +4 -0
- package/generated/auth/types.d.ts +2 -5
- package/generated/exchanges/types.d.ts +1 -1
- package/generated/feeSponsors/types.d.ts +6 -6
- package/generated/keys/client.d.ts +16 -0
- package/generated/keys/client.js +129 -0
- package/generated/keys/delegatedClient.d.ts +23 -0
- package/generated/keys/delegatedClient.js +218 -0
- package/generated/keys/index.d.ts +3 -0
- package/generated/keys/index.js +19 -0
- package/generated/keys/types.d.ts +540 -0
- package/generated/keys/types.js +2 -0
- package/generated/policies/types.d.ts +75 -75
- package/generated/staking/types.d.ts +121 -33
- package/generated/wallets/types.d.ts +66 -80
- package/package.json +1 -1
- package/types/keys.d.ts +1 -0
- package/types/keys.js +17 -0
|
@@ -1,31 +1,51 @@
|
|
|
1
1
|
export type CreateStakeBody = {
|
|
2
|
-
|
|
2
|
+
protocol: "Babylon";
|
|
3
|
+
walletId: string;
|
|
4
|
+
provider: "Figment";
|
|
3
5
|
amount: string;
|
|
6
|
+
duration: number;
|
|
7
|
+
} | {
|
|
8
|
+
protocol: "Ethereum";
|
|
4
9
|
walletId: string;
|
|
5
10
|
provider: "Figment";
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
amount: string;
|
|
12
|
+
} | {
|
|
13
|
+
protocol: "Iota";
|
|
14
|
+
walletId: string;
|
|
15
|
+
validator: string;
|
|
16
|
+
amount?: string | undefined;
|
|
17
|
+
lockedIotas?: string[] | undefined;
|
|
8
18
|
};
|
|
9
19
|
export type CreateStakeResponse = {
|
|
10
20
|
stake: {
|
|
11
21
|
id: string;
|
|
12
|
-
provider
|
|
13
|
-
providerStakeId
|
|
22
|
+
provider?: (("Figment") | undefined) | null;
|
|
23
|
+
providerStakeId?: (string | undefined) | null;
|
|
14
24
|
walletId: string;
|
|
15
|
-
protocol: "Babylon" | "Ethereum";
|
|
16
|
-
status: "Creating" | "
|
|
25
|
+
protocol: "Babylon" | "Ethereum" | "Iota";
|
|
26
|
+
status: "Active" | "Creating" | "Failed" | "Unbonding" | "Unbond" | "Withdrawing" | "Withdrawn";
|
|
17
27
|
requester: {
|
|
18
28
|
userId: string;
|
|
19
29
|
tokenId?: string | undefined;
|
|
20
30
|
appId?: string | undefined;
|
|
21
31
|
};
|
|
22
32
|
requestBody: {
|
|
23
|
-
|
|
33
|
+
protocol: "Babylon";
|
|
34
|
+
walletId: string;
|
|
35
|
+
provider: "Figment";
|
|
24
36
|
amount: string;
|
|
37
|
+
duration: number;
|
|
38
|
+
} | {
|
|
39
|
+
protocol: "Ethereum";
|
|
25
40
|
walletId: string;
|
|
26
41
|
provider: "Figment";
|
|
27
|
-
|
|
28
|
-
|
|
42
|
+
amount: string;
|
|
43
|
+
} | {
|
|
44
|
+
protocol: "Iota";
|
|
45
|
+
walletId: string;
|
|
46
|
+
validator: string;
|
|
47
|
+
amount?: string | undefined;
|
|
48
|
+
lockedIotas?: string[] | undefined;
|
|
29
49
|
};
|
|
30
50
|
dateCreated: string;
|
|
31
51
|
};
|
|
@@ -33,6 +53,7 @@ export type CreateStakeResponse = {
|
|
|
33
53
|
id: string;
|
|
34
54
|
stakeId: string;
|
|
35
55
|
transactionId?: string | undefined;
|
|
56
|
+
transactionHash?: string | undefined;
|
|
36
57
|
kind: "Stake" | "Unbond" | "Withdraw";
|
|
37
58
|
requester: {
|
|
38
59
|
userId: string;
|
|
@@ -40,13 +61,26 @@ export type CreateStakeResponse = {
|
|
|
40
61
|
appId?: string | undefined;
|
|
41
62
|
};
|
|
42
63
|
requestBody: ({
|
|
43
|
-
|
|
64
|
+
protocol: "Babylon";
|
|
65
|
+
walletId: string;
|
|
66
|
+
provider: "Figment";
|
|
44
67
|
amount: string;
|
|
68
|
+
duration: number;
|
|
69
|
+
} | {
|
|
70
|
+
protocol: "Ethereum";
|
|
45
71
|
walletId: string;
|
|
46
72
|
provider: "Figment";
|
|
47
|
-
|
|
48
|
-
|
|
73
|
+
amount: string;
|
|
74
|
+
} | {
|
|
75
|
+
protocol: "Iota";
|
|
76
|
+
walletId: string;
|
|
77
|
+
validator: string;
|
|
78
|
+
amount?: string | undefined;
|
|
79
|
+
lockedIotas?: string[] | undefined;
|
|
49
80
|
}) | ({
|
|
81
|
+
protocol: "Iota";
|
|
82
|
+
kind: "Withdraw";
|
|
83
|
+
} | {
|
|
50
84
|
protocol: "Babylon";
|
|
51
85
|
kind: "Unbond" | "Withdraw";
|
|
52
86
|
} | {
|
|
@@ -54,12 +88,16 @@ export type CreateStakeResponse = {
|
|
|
54
88
|
kind: "Withdraw";
|
|
55
89
|
});
|
|
56
90
|
dateCreated: string;
|
|
91
|
+
data?: any;
|
|
57
92
|
};
|
|
58
93
|
};
|
|
59
94
|
export type CreateStakeRequest = {
|
|
60
95
|
body: CreateStakeBody;
|
|
61
96
|
};
|
|
62
97
|
export type CreateStakeActionBody = {
|
|
98
|
+
protocol: "Iota";
|
|
99
|
+
kind: "Withdraw";
|
|
100
|
+
} | {
|
|
63
101
|
protocol: "Babylon";
|
|
64
102
|
kind: "Unbond" | "Withdraw";
|
|
65
103
|
} | {
|
|
@@ -72,23 +110,33 @@ export type CreateStakeActionParams = {
|
|
|
72
110
|
export type CreateStakeActionResponse = {
|
|
73
111
|
stake: {
|
|
74
112
|
id: string;
|
|
75
|
-
provider
|
|
76
|
-
providerStakeId
|
|
113
|
+
provider?: (("Figment") | undefined) | null;
|
|
114
|
+
providerStakeId?: (string | undefined) | null;
|
|
77
115
|
walletId: string;
|
|
78
|
-
protocol: "Babylon" | "Ethereum";
|
|
79
|
-
status: "Creating" | "
|
|
116
|
+
protocol: "Babylon" | "Ethereum" | "Iota";
|
|
117
|
+
status: "Active" | "Creating" | "Failed" | "Unbonding" | "Unbond" | "Withdrawing" | "Withdrawn";
|
|
80
118
|
requester: {
|
|
81
119
|
userId: string;
|
|
82
120
|
tokenId?: string | undefined;
|
|
83
121
|
appId?: string | undefined;
|
|
84
122
|
};
|
|
85
123
|
requestBody: {
|
|
86
|
-
|
|
124
|
+
protocol: "Babylon";
|
|
125
|
+
walletId: string;
|
|
126
|
+
provider: "Figment";
|
|
87
127
|
amount: string;
|
|
128
|
+
duration: number;
|
|
129
|
+
} | {
|
|
130
|
+
protocol: "Ethereum";
|
|
88
131
|
walletId: string;
|
|
89
132
|
provider: "Figment";
|
|
90
|
-
|
|
91
|
-
|
|
133
|
+
amount: string;
|
|
134
|
+
} | {
|
|
135
|
+
protocol: "Iota";
|
|
136
|
+
walletId: string;
|
|
137
|
+
validator: string;
|
|
138
|
+
amount?: string | undefined;
|
|
139
|
+
lockedIotas?: string[] | undefined;
|
|
92
140
|
};
|
|
93
141
|
dateCreated: string;
|
|
94
142
|
};
|
|
@@ -96,6 +144,7 @@ export type CreateStakeActionResponse = {
|
|
|
96
144
|
id: string;
|
|
97
145
|
stakeId: string;
|
|
98
146
|
transactionId?: string | undefined;
|
|
147
|
+
transactionHash?: string | undefined;
|
|
99
148
|
kind: "Stake" | "Unbond" | "Withdraw";
|
|
100
149
|
requester: {
|
|
101
150
|
userId: string;
|
|
@@ -103,13 +152,26 @@ export type CreateStakeActionResponse = {
|
|
|
103
152
|
appId?: string | undefined;
|
|
104
153
|
};
|
|
105
154
|
requestBody: ({
|
|
106
|
-
|
|
155
|
+
protocol: "Babylon";
|
|
156
|
+
walletId: string;
|
|
157
|
+
provider: "Figment";
|
|
107
158
|
amount: string;
|
|
159
|
+
duration: number;
|
|
160
|
+
} | {
|
|
161
|
+
protocol: "Ethereum";
|
|
108
162
|
walletId: string;
|
|
109
163
|
provider: "Figment";
|
|
110
|
-
|
|
111
|
-
|
|
164
|
+
amount: string;
|
|
165
|
+
} | {
|
|
166
|
+
protocol: "Iota";
|
|
167
|
+
walletId: string;
|
|
168
|
+
validator: string;
|
|
169
|
+
amount?: string | undefined;
|
|
170
|
+
lockedIotas?: string[] | undefined;
|
|
112
171
|
}) | ({
|
|
172
|
+
protocol: "Iota";
|
|
173
|
+
kind: "Withdraw";
|
|
174
|
+
} | {
|
|
113
175
|
protocol: "Babylon";
|
|
114
176
|
kind: "Unbond" | "Withdraw";
|
|
115
177
|
} | {
|
|
@@ -117,6 +179,7 @@ export type CreateStakeActionResponse = {
|
|
|
117
179
|
kind: "Withdraw";
|
|
118
180
|
});
|
|
119
181
|
dateCreated: string;
|
|
182
|
+
data?: any;
|
|
120
183
|
};
|
|
121
184
|
};
|
|
122
185
|
export type CreateStakeActionRequest = CreateStakeActionParams & {
|
|
@@ -139,6 +202,7 @@ export type ListStakeActionsResponse = {
|
|
|
139
202
|
id: string;
|
|
140
203
|
stakeId: string;
|
|
141
204
|
transactionId?: string | undefined;
|
|
205
|
+
transactionHash?: string | undefined;
|
|
142
206
|
kind: "Stake" | "Unbond" | "Withdraw";
|
|
143
207
|
requester: {
|
|
144
208
|
userId: string;
|
|
@@ -146,13 +210,26 @@ export type ListStakeActionsResponse = {
|
|
|
146
210
|
appId?: string | undefined;
|
|
147
211
|
};
|
|
148
212
|
requestBody: ({
|
|
149
|
-
|
|
213
|
+
protocol: "Babylon";
|
|
214
|
+
walletId: string;
|
|
215
|
+
provider: "Figment";
|
|
150
216
|
amount: string;
|
|
217
|
+
duration: number;
|
|
218
|
+
} | {
|
|
219
|
+
protocol: "Ethereum";
|
|
151
220
|
walletId: string;
|
|
152
221
|
provider: "Figment";
|
|
153
|
-
|
|
154
|
-
|
|
222
|
+
amount: string;
|
|
223
|
+
} | {
|
|
224
|
+
protocol: "Iota";
|
|
225
|
+
walletId: string;
|
|
226
|
+
validator: string;
|
|
227
|
+
amount?: string | undefined;
|
|
228
|
+
lockedIotas?: string[] | undefined;
|
|
155
229
|
}) | ({
|
|
230
|
+
protocol: "Iota";
|
|
231
|
+
kind: "Withdraw";
|
|
232
|
+
} | {
|
|
156
233
|
protocol: "Babylon";
|
|
157
234
|
kind: "Unbond" | "Withdraw";
|
|
158
235
|
} | {
|
|
@@ -160,6 +237,7 @@ export type ListStakeActionsResponse = {
|
|
|
160
237
|
kind: "Withdraw";
|
|
161
238
|
});
|
|
162
239
|
dateCreated: string;
|
|
240
|
+
data?: any;
|
|
163
241
|
}[];
|
|
164
242
|
nextPageToken?: string | undefined;
|
|
165
243
|
};
|
|
@@ -173,23 +251,33 @@ export type ListStakesQuery = {
|
|
|
173
251
|
export type ListStakesResponse = {
|
|
174
252
|
items: {
|
|
175
253
|
id: string;
|
|
176
|
-
provider
|
|
177
|
-
providerStakeId
|
|
254
|
+
provider?: (("Figment") | undefined) | null;
|
|
255
|
+
providerStakeId?: (string | undefined) | null;
|
|
178
256
|
walletId: string;
|
|
179
|
-
protocol: "Babylon" | "Ethereum";
|
|
180
|
-
status: "Creating" | "
|
|
257
|
+
protocol: "Babylon" | "Ethereum" | "Iota";
|
|
258
|
+
status: "Active" | "Creating" | "Failed" | "Unbonding" | "Unbond" | "Withdrawing" | "Withdrawn";
|
|
181
259
|
requester: {
|
|
182
260
|
userId: string;
|
|
183
261
|
tokenId?: string | undefined;
|
|
184
262
|
appId?: string | undefined;
|
|
185
263
|
};
|
|
186
264
|
requestBody: {
|
|
187
|
-
|
|
265
|
+
protocol: "Babylon";
|
|
266
|
+
walletId: string;
|
|
267
|
+
provider: "Figment";
|
|
188
268
|
amount: string;
|
|
269
|
+
duration: number;
|
|
270
|
+
} | {
|
|
271
|
+
protocol: "Ethereum";
|
|
189
272
|
walletId: string;
|
|
190
273
|
provider: "Figment";
|
|
191
|
-
|
|
192
|
-
|
|
274
|
+
amount: string;
|
|
275
|
+
} | {
|
|
276
|
+
protocol: "Iota";
|
|
277
|
+
walletId: string;
|
|
278
|
+
validator: string;
|
|
279
|
+
amount?: string | undefined;
|
|
280
|
+
lockedIotas?: string[] | undefined;
|
|
193
281
|
};
|
|
194
282
|
dateCreated: string;
|
|
195
283
|
}[];
|