@dfns/sdk 0.0.0-prealpha.9
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/baseAuthApi.d.ts +96 -0
- package/baseAuthApi.js +73 -0
- package/codegen/Assets/AssetsClient.d.ts +13 -0
- package/codegen/Assets/AssetsClient.js +94 -0
- package/codegen/Assets/DelegatedAssetsClient.d.ts +16 -0
- package/codegen/Assets/DelegatedAssetsClient.js +125 -0
- package/codegen/Assets/index.d.ts +3 -0
- package/codegen/Assets/index.js +19 -0
- package/codegen/Assets/types.d.ts +37 -0
- package/codegen/Assets/types.js +2 -0
- package/codegen/Auth/AuthClient.d.ts +48 -0
- package/codegen/Auth/AuthClient.js +494 -0
- package/codegen/Auth/DelegatedAuthClient.d.ts +74 -0
- package/codegen/Auth/DelegatedAuthClient.js +882 -0
- package/codegen/Auth/index.d.ts +3 -0
- package/codegen/Auth/index.js +19 -0
- package/codegen/Auth/types.d.ts +169 -0
- package/codegen/Auth/types.js +2 -0
- package/codegen/Blockchains/BlockchainsClient.d.ts +7 -0
- package/codegen/Blockchains/BlockchainsClient.js +23 -0
- package/codegen/Blockchains/DelegatedBlockchainsClient.d.ts +7 -0
- package/codegen/Blockchains/DelegatedBlockchainsClient.js +23 -0
- package/codegen/Blockchains/index.d.ts +3 -0
- package/codegen/Blockchains/index.js +19 -0
- package/codegen/Blockchains/types.d.ts +6 -0
- package/codegen/Blockchains/types.js +2 -0
- package/codegen/Callbacks/CallbacksClient.d.ts +12 -0
- package/codegen/Callbacks/CallbacksClient.js +78 -0
- package/codegen/Callbacks/DelegatedCallbacksClient.d.ts +15 -0
- package/codegen/Callbacks/DelegatedCallbacksClient.js +110 -0
- package/codegen/Callbacks/index.d.ts +3 -0
- package/codegen/Callbacks/index.js +19 -0
- package/codegen/Callbacks/types.d.ts +23 -0
- package/codegen/Callbacks/types.js +2 -0
- package/codegen/Permissions/DelegatedPermissionsClient.d.ts +27 -0
- package/codegen/Permissions/DelegatedPermissionsClient.js +285 -0
- package/codegen/Permissions/PermissionsClient.d.ts +18 -0
- package/codegen/Permissions/PermissionsClient.js +157 -0
- package/codegen/Permissions/index.d.ts +3 -0
- package/codegen/Permissions/index.js +19 -0
- package/codegen/Permissions/types.d.ts +62 -0
- package/codegen/Permissions/types.js +2 -0
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.d.ts +11 -0
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.js +62 -0
- package/codegen/PolicyExecution/PolicyExecutionClient.d.ts +9 -0
- package/codegen/PolicyExecution/PolicyExecutionClient.js +46 -0
- package/codegen/PolicyExecution/index.d.ts +3 -0
- package/codegen/PolicyExecution/index.js +19 -0
- package/codegen/PolicyExecution/types.d.ts +18 -0
- package/codegen/PolicyExecution/types.js +2 -0
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.d.ts +25 -0
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +241 -0
- package/codegen/PolicyManagement/PolicyManagementClient.d.ts +18 -0
- package/codegen/PolicyManagement/PolicyManagementClient.js +147 -0
- package/codegen/PolicyManagement/index.d.ts +3 -0
- package/codegen/PolicyManagement/index.js +19 -0
- package/codegen/PolicyManagement/types.d.ts +51 -0
- package/codegen/PolicyManagement/types.js +2 -0
- package/codegen/PublicKeys/DelegatedPublicKeysClient.d.ts +21 -0
- package/codegen/PublicKeys/DelegatedPublicKeysClient.js +191 -0
- package/codegen/PublicKeys/PublicKeysClient.d.ts +16 -0
- package/codegen/PublicKeys/PublicKeysClient.js +130 -0
- package/codegen/PublicKeys/index.d.ts +3 -0
- package/codegen/PublicKeys/index.js +19 -0
- package/codegen/PublicKeys/types.d.ts +51 -0
- package/codegen/PublicKeys/types.js +2 -0
- package/codegen/Wallets/DelegatedWalletsClient.d.ts +26 -0
- package/codegen/Wallets/DelegatedWalletsClient.js +249 -0
- package/codegen/Wallets/WalletsClient.d.ts +21 -0
- package/codegen/Wallets/WalletsClient.js +188 -0
- package/codegen/Wallets/index.d.ts +3 -0
- package/codegen/Wallets/index.js +19 -0
- package/codegen/Wallets/types.d.ts +87 -0
- package/codegen/Wallets/types.js +2 -0
- package/codegen/datamodel/Assets/errors.d.ts +11 -0
- package/codegen/datamodel/Assets/errors.js +17 -0
- package/codegen/datamodel/Assets/index.d.ts +3 -0
- package/codegen/datamodel/Assets/index.js +19 -0
- package/codegen/datamodel/Assets/responses.d.ts +47 -0
- package/codegen/datamodel/Assets/responses.js +2 -0
- package/codegen/datamodel/Assets/types.d.ts +225 -0
- package/codegen/datamodel/Assets/types.js +75 -0
- package/codegen/datamodel/Auth/index.d.ts +2 -0
- package/codegen/datamodel/Auth/index.js +18 -0
- package/codegen/datamodel/Auth/responses.d.ts +348 -0
- package/codegen/datamodel/Auth/responses.js +2 -0
- package/codegen/datamodel/Auth/types.d.ts +610 -0
- package/codegen/datamodel/Auth/types.js +127 -0
- package/codegen/datamodel/Blockchains/index.d.ts +2 -0
- package/codegen/datamodel/Blockchains/index.js +18 -0
- package/codegen/datamodel/Blockchains/responses.d.ts +12 -0
- package/codegen/datamodel/Blockchains/responses.js +2 -0
- package/codegen/datamodel/Blockchains/types.d.ts +269 -0
- package/codegen/datamodel/Blockchains/types.js +53 -0
- package/codegen/datamodel/Callbacks/index.d.ts +2 -0
- package/codegen/datamodel/Callbacks/index.js +18 -0
- package/codegen/datamodel/Callbacks/responses.d.ts +36 -0
- package/codegen/datamodel/Callbacks/responses.js +2 -0
- package/codegen/datamodel/Callbacks/types.d.ts +43 -0
- package/codegen/datamodel/Callbacks/types.js +39 -0
- package/codegen/datamodel/Foundations/errors.d.ts +121 -0
- package/codegen/datamodel/Foundations/errors.js +169 -0
- package/codegen/datamodel/Foundations/index.d.ts +2 -0
- package/codegen/datamodel/Foundations/index.js +18 -0
- package/codegen/datamodel/Foundations/types.d.ts +9756 -0
- package/codegen/datamodel/Foundations/types.js +57753 -0
- package/codegen/datamodel/Permissions/index.d.ts +2 -0
- package/codegen/datamodel/Permissions/index.js +18 -0
- package/codegen/datamodel/Permissions/responses.d.ts +75 -0
- package/codegen/datamodel/Permissions/responses.js +2 -0
- package/codegen/datamodel/Permissions/types.d.ts +93 -0
- package/codegen/datamodel/Permissions/types.js +43 -0
- package/codegen/datamodel/PolicyExecution/errors.d.ts +11 -0
- package/codegen/datamodel/PolicyExecution/errors.js +17 -0
- package/codegen/datamodel/PolicyExecution/index.d.ts +3 -0
- package/codegen/datamodel/PolicyExecution/index.js +19 -0
- package/codegen/datamodel/PolicyExecution/responses.d.ts +19 -0
- package/codegen/datamodel/PolicyExecution/responses.js +2 -0
- package/codegen/datamodel/PolicyExecution/types.d.ts +45 -0
- package/codegen/datamodel/PolicyExecution/types.js +15 -0
- package/codegen/datamodel/PolicyManagement/index.d.ts +2 -0
- package/codegen/datamodel/PolicyManagement/index.js +18 -0
- package/codegen/datamodel/PolicyManagement/responses.d.ts +83 -0
- package/codegen/datamodel/PolicyManagement/responses.js +2 -0
- package/codegen/datamodel/PolicyManagement/types.d.ts +212 -0
- package/codegen/datamodel/PolicyManagement/types.js +77 -0
- package/codegen/datamodel/PublicKeys/index.d.ts +2 -0
- package/codegen/datamodel/PublicKeys/index.js +18 -0
- package/codegen/datamodel/PublicKeys/responses.d.ts +56 -0
- package/codegen/datamodel/PublicKeys/responses.js +2 -0
- package/codegen/datamodel/PublicKeys/types.d.ts +222 -0
- package/codegen/datamodel/PublicKeys/types.js +59 -0
- package/codegen/datamodel/Wallets/index.d.ts +2 -0
- package/codegen/datamodel/Wallets/index.js +18 -0
- package/codegen/datamodel/Wallets/responses.d.ts +77 -0
- package/codegen/datamodel/Wallets/responses.js +2 -0
- package/codegen/datamodel/Wallets/types.d.ts +277 -0
- package/codegen/datamodel/Wallets/types.js +123 -0
- package/dfnsApiClient.d.ts +27 -0
- package/dfnsApiClient.js +45 -0
- package/dfnsAuthenticator.d.ts +17 -0
- package/dfnsAuthenticator.js +29 -0
- package/dfnsDelegatedApiClient.d.ts +24 -0
- package/dfnsDelegatedApiClient.js +41 -0
- package/dfnsError.d.ts +5 -0
- package/dfnsError.js +11 -0
- package/index.d.ts +7 -0
- package/index.js +23 -0
- package/package.json +11 -0
- package/signer.d.ts +42 -0
- package/signer.js +2 -0
- package/store.d.ts +79 -0
- package/store.js +2 -0
- package/utils/base64.d.ts +3 -0
- package/utils/base64.js +20 -0
- package/utils/fetch.d.ts +12 -0
- package/utils/fetch.js +89 -0
- package/utils/nonce.d.ts +1 -0
- package/utils/nonce.js +12 -0
- package/utils/url.d.ts +4 -0
- package/utils/url.js +15 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DelegatedWalletsClient = void 0;
|
|
4
|
+
const baseAuthApi_1 = require("../../baseAuthApi");
|
|
5
|
+
const fetch_1 = require("../../utils/fetch");
|
|
6
|
+
const url_1 = require("../../utils/url");
|
|
7
|
+
class DelegatedWalletsClient {
|
|
8
|
+
constructor(apiOptions) {
|
|
9
|
+
this.apiOptions = apiOptions;
|
|
10
|
+
}
|
|
11
|
+
async createWalletInit(request) {
|
|
12
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets', {
|
|
13
|
+
path: {},
|
|
14
|
+
query: {},
|
|
15
|
+
});
|
|
16
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
17
|
+
userActionHttpMethod: 'POST',
|
|
18
|
+
userActionHttpPath: path,
|
|
19
|
+
userActionPayload: JSON.stringify(request.body),
|
|
20
|
+
userActionServerKind: 'Api',
|
|
21
|
+
}, this.apiOptions);
|
|
22
|
+
return challenge;
|
|
23
|
+
}
|
|
24
|
+
async createWalletComplete(request, signedChallenge) {
|
|
25
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets', {
|
|
26
|
+
path: {},
|
|
27
|
+
query: {},
|
|
28
|
+
});
|
|
29
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
30
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
31
|
+
method: 'POST',
|
|
32
|
+
body: request.body,
|
|
33
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
34
|
+
apiOptions: this.apiOptions,
|
|
35
|
+
});
|
|
36
|
+
return response.json();
|
|
37
|
+
}
|
|
38
|
+
async getWallet(request) {
|
|
39
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId', {
|
|
40
|
+
path: { walletId: request.walletId },
|
|
41
|
+
query: {},
|
|
42
|
+
});
|
|
43
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
44
|
+
method: 'GET',
|
|
45
|
+
apiOptions: this.apiOptions,
|
|
46
|
+
});
|
|
47
|
+
return response.json();
|
|
48
|
+
}
|
|
49
|
+
async getWalletAssets(request) {
|
|
50
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/assets', {
|
|
51
|
+
path: { walletId: request.walletId },
|
|
52
|
+
query: {},
|
|
53
|
+
});
|
|
54
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
55
|
+
method: 'GET',
|
|
56
|
+
apiOptions: this.apiOptions,
|
|
57
|
+
});
|
|
58
|
+
return response.json();
|
|
59
|
+
}
|
|
60
|
+
async getWalletNfts(request) {
|
|
61
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/nfts', {
|
|
62
|
+
path: { walletId: request.walletId },
|
|
63
|
+
query: {},
|
|
64
|
+
});
|
|
65
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
66
|
+
method: 'GET',
|
|
67
|
+
apiOptions: this.apiOptions,
|
|
68
|
+
});
|
|
69
|
+
return response.json();
|
|
70
|
+
}
|
|
71
|
+
async listWallets(request) {
|
|
72
|
+
var _a;
|
|
73
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets', {
|
|
74
|
+
path: {},
|
|
75
|
+
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
76
|
+
});
|
|
77
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
78
|
+
method: 'GET',
|
|
79
|
+
apiOptions: this.apiOptions,
|
|
80
|
+
});
|
|
81
|
+
return response.json();
|
|
82
|
+
}
|
|
83
|
+
async getWalletHistory(request) {
|
|
84
|
+
var _a;
|
|
85
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/history', {
|
|
86
|
+
path: { walletId: request.walletId },
|
|
87
|
+
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
88
|
+
});
|
|
89
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
90
|
+
method: 'GET',
|
|
91
|
+
apiOptions: this.apiOptions,
|
|
92
|
+
});
|
|
93
|
+
return response.json();
|
|
94
|
+
}
|
|
95
|
+
async transferAssetInit(request) {
|
|
96
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transfers', {
|
|
97
|
+
path: { walletId: request.walletId },
|
|
98
|
+
query: {},
|
|
99
|
+
});
|
|
100
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
101
|
+
userActionHttpMethod: 'POST',
|
|
102
|
+
userActionHttpPath: path,
|
|
103
|
+
userActionPayload: JSON.stringify(request.body),
|
|
104
|
+
userActionServerKind: 'Api',
|
|
105
|
+
}, this.apiOptions);
|
|
106
|
+
return challenge;
|
|
107
|
+
}
|
|
108
|
+
async transferAssetComplete(request, signedChallenge) {
|
|
109
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transfers', {
|
|
110
|
+
path: { walletId: request.walletId },
|
|
111
|
+
query: {},
|
|
112
|
+
});
|
|
113
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
114
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
115
|
+
method: 'POST',
|
|
116
|
+
body: request.body,
|
|
117
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
118
|
+
apiOptions: this.apiOptions,
|
|
119
|
+
});
|
|
120
|
+
return response.json();
|
|
121
|
+
}
|
|
122
|
+
async getTransfer(request) {
|
|
123
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transfers/:transferId', {
|
|
124
|
+
path: { walletId: request.walletId, transferId: request.transferId },
|
|
125
|
+
query: {},
|
|
126
|
+
});
|
|
127
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
128
|
+
method: 'GET',
|
|
129
|
+
apiOptions: this.apiOptions,
|
|
130
|
+
});
|
|
131
|
+
return response.json();
|
|
132
|
+
}
|
|
133
|
+
async listTransfers(request) {
|
|
134
|
+
var _a;
|
|
135
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transfers', {
|
|
136
|
+
path: { walletId: request.walletId },
|
|
137
|
+
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
138
|
+
});
|
|
139
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
140
|
+
method: 'GET',
|
|
141
|
+
apiOptions: this.apiOptions,
|
|
142
|
+
});
|
|
143
|
+
return response.json();
|
|
144
|
+
}
|
|
145
|
+
async broadcastTransactionInit(request) {
|
|
146
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transactions', {
|
|
147
|
+
path: { walletId: request.walletId },
|
|
148
|
+
query: {},
|
|
149
|
+
});
|
|
150
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
151
|
+
userActionHttpMethod: 'POST',
|
|
152
|
+
userActionHttpPath: path,
|
|
153
|
+
userActionPayload: JSON.stringify(request.body),
|
|
154
|
+
userActionServerKind: 'Api',
|
|
155
|
+
}, this.apiOptions);
|
|
156
|
+
return challenge;
|
|
157
|
+
}
|
|
158
|
+
async broadcastTransactionComplete(request, signedChallenge) {
|
|
159
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transactions', {
|
|
160
|
+
path: { walletId: request.walletId },
|
|
161
|
+
query: {},
|
|
162
|
+
});
|
|
163
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
164
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
165
|
+
method: 'POST',
|
|
166
|
+
body: request.body,
|
|
167
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
168
|
+
apiOptions: this.apiOptions,
|
|
169
|
+
});
|
|
170
|
+
return response.json();
|
|
171
|
+
}
|
|
172
|
+
async getTransaction(request) {
|
|
173
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transactions/:transactionId', {
|
|
174
|
+
path: {
|
|
175
|
+
walletId: request.walletId,
|
|
176
|
+
transactionId: request.transactionId,
|
|
177
|
+
},
|
|
178
|
+
query: {},
|
|
179
|
+
});
|
|
180
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
181
|
+
method: 'GET',
|
|
182
|
+
apiOptions: this.apiOptions,
|
|
183
|
+
});
|
|
184
|
+
return response.json();
|
|
185
|
+
}
|
|
186
|
+
async listTransactions(request) {
|
|
187
|
+
var _a;
|
|
188
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transactions', {
|
|
189
|
+
path: { walletId: request.walletId },
|
|
190
|
+
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
191
|
+
});
|
|
192
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
193
|
+
method: 'GET',
|
|
194
|
+
apiOptions: this.apiOptions,
|
|
195
|
+
});
|
|
196
|
+
return response.json();
|
|
197
|
+
}
|
|
198
|
+
async generateSignatureInit(request) {
|
|
199
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/signatures', {
|
|
200
|
+
path: { walletId: request.walletId },
|
|
201
|
+
query: {},
|
|
202
|
+
});
|
|
203
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
204
|
+
userActionHttpMethod: 'POST',
|
|
205
|
+
userActionHttpPath: path,
|
|
206
|
+
userActionPayload: JSON.stringify(request.body),
|
|
207
|
+
userActionServerKind: 'Api',
|
|
208
|
+
}, this.apiOptions);
|
|
209
|
+
return challenge;
|
|
210
|
+
}
|
|
211
|
+
async generateSignatureComplete(request, signedChallenge) {
|
|
212
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/signatures', {
|
|
213
|
+
path: { walletId: request.walletId },
|
|
214
|
+
query: {},
|
|
215
|
+
});
|
|
216
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
217
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
218
|
+
method: 'POST',
|
|
219
|
+
body: request.body,
|
|
220
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
221
|
+
apiOptions: this.apiOptions,
|
|
222
|
+
});
|
|
223
|
+
return response.json();
|
|
224
|
+
}
|
|
225
|
+
async getSignature(request) {
|
|
226
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/signatures/:signatureId', {
|
|
227
|
+
path: { walletId: request.walletId, signatureId: request.signatureId },
|
|
228
|
+
query: {},
|
|
229
|
+
});
|
|
230
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
231
|
+
method: 'GET',
|
|
232
|
+
apiOptions: this.apiOptions,
|
|
233
|
+
});
|
|
234
|
+
return response.json();
|
|
235
|
+
}
|
|
236
|
+
async listSignatures(request) {
|
|
237
|
+
var _a;
|
|
238
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/signatures', {
|
|
239
|
+
path: { walletId: request.walletId },
|
|
240
|
+
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
241
|
+
});
|
|
242
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
243
|
+
method: 'GET',
|
|
244
|
+
apiOptions: this.apiOptions,
|
|
245
|
+
});
|
|
246
|
+
return response.json();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
exports.DelegatedWalletsClient = DelegatedWalletsClient;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DfnsApiClientOptions } from '../../dfnsApiClient';
|
|
2
|
+
import * as T from './types';
|
|
3
|
+
export declare class WalletsClient {
|
|
4
|
+
private apiOptions;
|
|
5
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
6
|
+
createWallet(request: T.CreateWalletRequest): Promise<T.CreateWalletResponse>;
|
|
7
|
+
getWallet(request: T.GetWalletRequest): Promise<T.GetWalletResponse>;
|
|
8
|
+
getWalletAssets(request: T.GetWalletAssetsRequest): Promise<T.GetWalletAssetsResponse>;
|
|
9
|
+
getWalletNfts(request: T.GetWalletNftsRequest): Promise<T.GetWalletNftsResponse>;
|
|
10
|
+
listWallets(request: T.ListWalletsRequest): Promise<T.ListWalletsResponse>;
|
|
11
|
+
getWalletHistory(request: T.GetWalletHistoryRequest): Promise<T.GetWalletHistoryResponse>;
|
|
12
|
+
transferAsset(request: T.TransferAssetRequest): Promise<T.TransferAssetResponse>;
|
|
13
|
+
getTransfer(request: T.GetTransferRequest): Promise<T.GetTransferResponse>;
|
|
14
|
+
listTransfers(request: T.ListTransfersRequest): Promise<T.ListTransfersResponse>;
|
|
15
|
+
broadcastTransaction(request: T.BroadcastTransactionRequest): Promise<T.BroadcastTransactionResponse>;
|
|
16
|
+
getTransaction(request: T.GetTransactionRequest): Promise<T.GetTransactionResponse>;
|
|
17
|
+
listTransactions(request: T.ListTransactionsRequest): Promise<T.ListTransactionsResponse>;
|
|
18
|
+
generateSignature(request: T.GenerateSignatureRequest): Promise<T.GenerateSignatureResponse>;
|
|
19
|
+
getSignature(request: T.GetSignatureRequest): Promise<T.GetSignatureResponse>;
|
|
20
|
+
listSignatures(request: T.ListSignaturesRequest): Promise<T.ListSignaturesResponse>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WalletsClient = void 0;
|
|
4
|
+
const fetch_1 = require("../../utils/fetch");
|
|
5
|
+
const url_1 = require("../../utils/url");
|
|
6
|
+
class WalletsClient {
|
|
7
|
+
constructor(apiOptions) {
|
|
8
|
+
this.apiOptions = apiOptions;
|
|
9
|
+
}
|
|
10
|
+
async createWallet(request) {
|
|
11
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets', {
|
|
12
|
+
path: {},
|
|
13
|
+
query: {},
|
|
14
|
+
});
|
|
15
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
16
|
+
method: 'POST',
|
|
17
|
+
body: request.body,
|
|
18
|
+
apiOptions: this.apiOptions,
|
|
19
|
+
});
|
|
20
|
+
return response.json();
|
|
21
|
+
}
|
|
22
|
+
async getWallet(request) {
|
|
23
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId', {
|
|
24
|
+
path: { walletId: request.walletId },
|
|
25
|
+
query: {},
|
|
26
|
+
});
|
|
27
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
28
|
+
method: 'GET',
|
|
29
|
+
apiOptions: this.apiOptions,
|
|
30
|
+
});
|
|
31
|
+
return response.json();
|
|
32
|
+
}
|
|
33
|
+
async getWalletAssets(request) {
|
|
34
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/assets', {
|
|
35
|
+
path: { walletId: request.walletId },
|
|
36
|
+
query: {},
|
|
37
|
+
});
|
|
38
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
39
|
+
method: 'GET',
|
|
40
|
+
apiOptions: this.apiOptions,
|
|
41
|
+
});
|
|
42
|
+
return response.json();
|
|
43
|
+
}
|
|
44
|
+
async getWalletNfts(request) {
|
|
45
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/nfts', {
|
|
46
|
+
path: { walletId: request.walletId },
|
|
47
|
+
query: {},
|
|
48
|
+
});
|
|
49
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
50
|
+
method: 'GET',
|
|
51
|
+
apiOptions: this.apiOptions,
|
|
52
|
+
});
|
|
53
|
+
return response.json();
|
|
54
|
+
}
|
|
55
|
+
async listWallets(request) {
|
|
56
|
+
var _a;
|
|
57
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets', {
|
|
58
|
+
path: {},
|
|
59
|
+
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
60
|
+
});
|
|
61
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
62
|
+
method: 'GET',
|
|
63
|
+
apiOptions: this.apiOptions,
|
|
64
|
+
});
|
|
65
|
+
return response.json();
|
|
66
|
+
}
|
|
67
|
+
async getWalletHistory(request) {
|
|
68
|
+
var _a;
|
|
69
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/history', {
|
|
70
|
+
path: { walletId: request.walletId },
|
|
71
|
+
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
72
|
+
});
|
|
73
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
74
|
+
method: 'GET',
|
|
75
|
+
apiOptions: this.apiOptions,
|
|
76
|
+
});
|
|
77
|
+
return response.json();
|
|
78
|
+
}
|
|
79
|
+
async transferAsset(request) {
|
|
80
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transfers', {
|
|
81
|
+
path: { walletId: request.walletId },
|
|
82
|
+
query: {},
|
|
83
|
+
});
|
|
84
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
body: request.body,
|
|
87
|
+
apiOptions: this.apiOptions,
|
|
88
|
+
});
|
|
89
|
+
return response.json();
|
|
90
|
+
}
|
|
91
|
+
async getTransfer(request) {
|
|
92
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transfers/:transferId', {
|
|
93
|
+
path: { walletId: request.walletId, transferId: request.transferId },
|
|
94
|
+
query: {},
|
|
95
|
+
});
|
|
96
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
97
|
+
method: 'GET',
|
|
98
|
+
apiOptions: this.apiOptions,
|
|
99
|
+
});
|
|
100
|
+
return response.json();
|
|
101
|
+
}
|
|
102
|
+
async listTransfers(request) {
|
|
103
|
+
var _a;
|
|
104
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transfers', {
|
|
105
|
+
path: { walletId: request.walletId },
|
|
106
|
+
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
107
|
+
});
|
|
108
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
109
|
+
method: 'GET',
|
|
110
|
+
apiOptions: this.apiOptions,
|
|
111
|
+
});
|
|
112
|
+
return response.json();
|
|
113
|
+
}
|
|
114
|
+
async broadcastTransaction(request) {
|
|
115
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transactions', {
|
|
116
|
+
path: { walletId: request.walletId },
|
|
117
|
+
query: {},
|
|
118
|
+
});
|
|
119
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
120
|
+
method: 'POST',
|
|
121
|
+
body: request.body,
|
|
122
|
+
apiOptions: this.apiOptions,
|
|
123
|
+
});
|
|
124
|
+
return response.json();
|
|
125
|
+
}
|
|
126
|
+
async getTransaction(request) {
|
|
127
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transactions/:transactionId', {
|
|
128
|
+
path: {
|
|
129
|
+
walletId: request.walletId,
|
|
130
|
+
transactionId: request.transactionId,
|
|
131
|
+
},
|
|
132
|
+
query: {},
|
|
133
|
+
});
|
|
134
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
135
|
+
method: 'GET',
|
|
136
|
+
apiOptions: this.apiOptions,
|
|
137
|
+
});
|
|
138
|
+
return response.json();
|
|
139
|
+
}
|
|
140
|
+
async listTransactions(request) {
|
|
141
|
+
var _a;
|
|
142
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/transactions', {
|
|
143
|
+
path: { walletId: request.walletId },
|
|
144
|
+
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
145
|
+
});
|
|
146
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
147
|
+
method: 'GET',
|
|
148
|
+
apiOptions: this.apiOptions,
|
|
149
|
+
});
|
|
150
|
+
return response.json();
|
|
151
|
+
}
|
|
152
|
+
async generateSignature(request) {
|
|
153
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/signatures', {
|
|
154
|
+
path: { walletId: request.walletId },
|
|
155
|
+
query: {},
|
|
156
|
+
});
|
|
157
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
158
|
+
method: 'POST',
|
|
159
|
+
body: request.body,
|
|
160
|
+
apiOptions: this.apiOptions,
|
|
161
|
+
});
|
|
162
|
+
return response.json();
|
|
163
|
+
}
|
|
164
|
+
async getSignature(request) {
|
|
165
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/signatures/:signatureId', {
|
|
166
|
+
path: { walletId: request.walletId, signatureId: request.signatureId },
|
|
167
|
+
query: {},
|
|
168
|
+
});
|
|
169
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
170
|
+
method: 'GET',
|
|
171
|
+
apiOptions: this.apiOptions,
|
|
172
|
+
});
|
|
173
|
+
return response.json();
|
|
174
|
+
}
|
|
175
|
+
async listSignatures(request) {
|
|
176
|
+
var _a;
|
|
177
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:walletId/signatures', {
|
|
178
|
+
path: { walletId: request.walletId },
|
|
179
|
+
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
180
|
+
});
|
|
181
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
182
|
+
method: 'GET',
|
|
183
|
+
apiOptions: this.apiOptions,
|
|
184
|
+
});
|
|
185
|
+
return response.json();
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
exports.WalletsClient = WalletsClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DelegatedWalletsClient"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
__exportStar(require("./WalletsClient"), exports);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as Foundations from '../datamodel/Foundations';
|
|
2
|
+
import * as Wallets from '../datamodel/Wallets';
|
|
3
|
+
export type CreateWalletRequest = {
|
|
4
|
+
body: Wallets.CreateWalletBody;
|
|
5
|
+
};
|
|
6
|
+
export type CreateWalletResponse = Wallets.Wallet;
|
|
7
|
+
export type GetWalletRequest = {
|
|
8
|
+
walletId: Foundations.EntityId;
|
|
9
|
+
};
|
|
10
|
+
export type GetWalletResponse = Wallets.Wallet;
|
|
11
|
+
export type GetWalletAssetsRequest = {
|
|
12
|
+
walletId: Foundations.EntityId;
|
|
13
|
+
};
|
|
14
|
+
export type GetWalletAssetsResponse = Wallets.WalletAssets;
|
|
15
|
+
export type GetWalletNftsRequest = {
|
|
16
|
+
walletId: Foundations.EntityId;
|
|
17
|
+
};
|
|
18
|
+
export type GetWalletNftsResponse = Wallets.WalletNfts;
|
|
19
|
+
export type ListWalletsRequest = {
|
|
20
|
+
query?: {
|
|
21
|
+
limit?: Foundations.IntegerPositiveStrict;
|
|
22
|
+
paginationToken?: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type ListWalletsResponse = Wallets.PaginatedWalletList;
|
|
26
|
+
export type GetWalletHistoryRequest = {
|
|
27
|
+
walletId: Foundations.EntityId;
|
|
28
|
+
query?: {
|
|
29
|
+
limit?: Foundations.IntegerPositiveStrict;
|
|
30
|
+
paginationToken?: Foundations.IsoDatetime;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type GetWalletHistoryResponse = Wallets.PaginatedEventHistory;
|
|
34
|
+
export type TransferAssetRequest = {
|
|
35
|
+
walletId: Foundations.EntityId;
|
|
36
|
+
body: Wallets.TransferAssetBody;
|
|
37
|
+
};
|
|
38
|
+
export type TransferAssetResponse = Wallets.TransferRequest;
|
|
39
|
+
export type GetTransferRequest = {
|
|
40
|
+
walletId: Foundations.EntityId;
|
|
41
|
+
transferId: Foundations.EntityId;
|
|
42
|
+
};
|
|
43
|
+
export type GetTransferResponse = Wallets.TransferRequest;
|
|
44
|
+
export type ListTransfersRequest = {
|
|
45
|
+
walletId: Foundations.EntityId;
|
|
46
|
+
query?: {
|
|
47
|
+
limit?: Foundations.IntegerPositiveStrict;
|
|
48
|
+
paginationToken?: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export type ListTransfersResponse = Wallets.PaginatedTransferList;
|
|
52
|
+
export type BroadcastTransactionRequest = {
|
|
53
|
+
walletId: Foundations.EntityId;
|
|
54
|
+
body: Wallets.BroadcastTransactionBody;
|
|
55
|
+
};
|
|
56
|
+
export type BroadcastTransactionResponse = Wallets.TransactionRequest;
|
|
57
|
+
export type GetTransactionRequest = {
|
|
58
|
+
walletId: Foundations.EntityId;
|
|
59
|
+
transactionId: Foundations.EntityId;
|
|
60
|
+
};
|
|
61
|
+
export type GetTransactionResponse = Wallets.TransactionRequest;
|
|
62
|
+
export type ListTransactionsRequest = {
|
|
63
|
+
walletId: Foundations.EntityId;
|
|
64
|
+
query?: {
|
|
65
|
+
limit?: Foundations.IntegerPositiveStrict;
|
|
66
|
+
paginationToken?: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export type ListTransactionsResponse = Wallets.PaginatedTransactionList;
|
|
70
|
+
export type GenerateSignatureRequest = {
|
|
71
|
+
walletId: Foundations.EntityId;
|
|
72
|
+
body: Wallets.GenerateSignatureBody;
|
|
73
|
+
};
|
|
74
|
+
export type GenerateSignatureResponse = Wallets.SignatureRequest;
|
|
75
|
+
export type GetSignatureRequest = {
|
|
76
|
+
walletId: Foundations.EntityId;
|
|
77
|
+
signatureId: Foundations.EntityId;
|
|
78
|
+
};
|
|
79
|
+
export type GetSignatureResponse = Wallets.SignatureRequest;
|
|
80
|
+
export type ListSignaturesRequest = {
|
|
81
|
+
walletId: Foundations.EntityId;
|
|
82
|
+
query?: {
|
|
83
|
+
limit?: Foundations.IntegerPositiveStrict;
|
|
84
|
+
paginationToken?: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
export type ListSignaturesResponse = Wallets.PaginatedSignatureList;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DfnsError } from '../Foundations';
|
|
2
|
+
export declare class InsufficientFunds extends DfnsError {
|
|
3
|
+
name: string;
|
|
4
|
+
serviceName: string;
|
|
5
|
+
message: string;
|
|
6
|
+
causes?: string[];
|
|
7
|
+
shouldTriggerInvestigaton: boolean;
|
|
8
|
+
isDfnsError: boolean;
|
|
9
|
+
httpStatus: number;
|
|
10
|
+
errorName: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InsufficientFunds = void 0;
|
|
4
|
+
const Foundations_1 = require("../Foundations");
|
|
5
|
+
class InsufficientFunds extends Foundations_1.DfnsError {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'InsufficientFunds';
|
|
9
|
+
// FIXME: Missing documentation for isDfnsError
|
|
10
|
+
this.isDfnsError = true;
|
|
11
|
+
// FIXME: Missing documentation for httpStatus
|
|
12
|
+
this.httpStatus = 422;
|
|
13
|
+
// FIXME: Missing documentation for errorName
|
|
14
|
+
this.errorName = 'Insufficient funds in asset account';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.InsufficientFunds = InsufficientFunds;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./errors"), exports);
|
|
18
|
+
__exportStar(require("./responses"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BadRequestError, EntityNotFoundError, ForbiddenError, PaymentRequiredError, UnauthorizedError } from '../Foundations';
|
|
2
|
+
import { InsufficientFunds } from './errors';
|
|
3
|
+
import { AssetAccount, AssetAccountBalance, Payment } from './types';
|
|
4
|
+
export type InitiatePaymentSuccess = Payment;
|
|
5
|
+
export type InitiatePaymentError = {
|
|
6
|
+
error: BadRequestError | PaymentRequiredError | InsufficientFunds | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
7
|
+
};
|
|
8
|
+
export type InitiatePaymentResponse = InitiatePaymentSuccess | InitiatePaymentError;
|
|
9
|
+
export type GetPaymentByIdSuccess = Payment;
|
|
10
|
+
export type GetPaymentByIdError = {
|
|
11
|
+
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
12
|
+
};
|
|
13
|
+
export type GetPaymentByIdResponse = GetPaymentByIdSuccess | GetPaymentByIdError;
|
|
14
|
+
export type ListPaymentsSuccess = {
|
|
15
|
+
items: Payment[];
|
|
16
|
+
};
|
|
17
|
+
export type ListPaymentsError = {
|
|
18
|
+
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
19
|
+
};
|
|
20
|
+
export type ListPaymentsResponse = ListPaymentsSuccess | ListPaymentsError;
|
|
21
|
+
export type CreateAssetAccountSuccess = AssetAccount;
|
|
22
|
+
export type CreateAssetAccountError = {
|
|
23
|
+
error: EntityNotFoundError | BadRequestError | PaymentRequiredError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
24
|
+
};
|
|
25
|
+
export type CreateAssetAccountResponse = CreateAssetAccountSuccess | CreateAssetAccountError;
|
|
26
|
+
export type GetAssetAccountByIdSuccess = AssetAccount;
|
|
27
|
+
export type GetAssetAccountByIdError = {
|
|
28
|
+
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
29
|
+
};
|
|
30
|
+
export type GetAssetAccountByIdResponse = GetAssetAccountByIdSuccess | GetAssetAccountByIdError;
|
|
31
|
+
export type ListAssetAccountsSuccess = {
|
|
32
|
+
items: AssetAccount[];
|
|
33
|
+
};
|
|
34
|
+
export type ListAssetAccountsError = {
|
|
35
|
+
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
36
|
+
};
|
|
37
|
+
export type ListAssetAccountsResponse = ListAssetAccountsSuccess | ListAssetAccountsError;
|
|
38
|
+
export type ArchiveAssetAccountSuccess = AssetAccount;
|
|
39
|
+
export type ArchiveAssetAccountError = {
|
|
40
|
+
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
41
|
+
};
|
|
42
|
+
export type ArchiveAssetAccountResponse = ArchiveAssetAccountSuccess | ArchiveAssetAccountError;
|
|
43
|
+
export type GetAssetAccountBalanceByIdSuccess = AssetAccountBalance;
|
|
44
|
+
export type GetAssetAccountBalanceByIdError = {
|
|
45
|
+
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
46
|
+
};
|
|
47
|
+
export type GetAssetAccountBalanceByIdResponse = GetAssetAccountBalanceByIdSuccess | GetAssetAccountBalanceByIdError;
|