@aws-sdk/client-managedblockchain-query 3.490.0 → 3.496.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/ManagedBlockchainQuery.js +1 -27
- package/dist-cjs/ManagedBlockchainQueryClient.js +1 -43
- package/dist-cjs/commands/BatchGetTokenBalanceCommand.js +1 -28
- package/dist-cjs/commands/GetAssetContractCommand.js +1 -28
- package/dist-cjs/commands/GetTokenBalanceCommand.js +1 -28
- package/dist-cjs/commands/GetTransactionCommand.js +1 -28
- package/dist-cjs/commands/ListAssetContractsCommand.js +1 -28
- package/dist-cjs/commands/ListTokenBalancesCommand.js +1 -28
- package/dist-cjs/commands/ListTransactionEventsCommand.js +1 -28
- package/dist-cjs/commands/ListTransactionsCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -11
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1387 -11
- package/dist-cjs/models/ManagedBlockchainQueryServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -153
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListAssetContractsPaginator.js +1 -7
- package/dist-cjs/pagination/ListTokenBalancesPaginator.js +1 -7
- package/dist-cjs/pagination/ListTransactionEventsPaginator.js +1 -7
- package/dist-cjs/pagination/ListTransactionsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -8
- package/dist-cjs/protocols/Aws_restJson1.js +1 -791
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
package/dist-cjs/index.js
CHANGED
|
@@ -1,12 +1,1388 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
AccessDeniedException: () => AccessDeniedException,
|
|
25
|
+
BatchGetTokenBalanceCommand: () => BatchGetTokenBalanceCommand,
|
|
26
|
+
ConfirmationStatus: () => ConfirmationStatus,
|
|
27
|
+
ErrorType: () => ErrorType,
|
|
28
|
+
ExecutionStatus: () => ExecutionStatus,
|
|
29
|
+
GetAssetContractCommand: () => GetAssetContractCommand,
|
|
30
|
+
GetTokenBalanceCommand: () => GetTokenBalanceCommand,
|
|
31
|
+
GetTransactionCommand: () => GetTransactionCommand,
|
|
32
|
+
InternalServerException: () => InternalServerException,
|
|
33
|
+
ListAssetContractsCommand: () => ListAssetContractsCommand,
|
|
34
|
+
ListTokenBalancesCommand: () => ListTokenBalancesCommand,
|
|
35
|
+
ListTransactionEventsCommand: () => ListTransactionEventsCommand,
|
|
36
|
+
ListTransactionsCommand: () => ListTransactionsCommand,
|
|
37
|
+
ListTransactionsSortBy: () => ListTransactionsSortBy,
|
|
38
|
+
ManagedBlockchainQuery: () => ManagedBlockchainQuery,
|
|
39
|
+
ManagedBlockchainQueryClient: () => ManagedBlockchainQueryClient,
|
|
40
|
+
ManagedBlockchainQueryServiceException: () => ManagedBlockchainQueryServiceException,
|
|
41
|
+
QueryNetwork: () => QueryNetwork,
|
|
42
|
+
QueryTokenStandard: () => QueryTokenStandard,
|
|
43
|
+
QueryTransactionEventType: () => QueryTransactionEventType,
|
|
44
|
+
QueryTransactionStatus: () => QueryTransactionStatus,
|
|
45
|
+
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
46
|
+
ResourceType: () => ResourceType,
|
|
47
|
+
ServiceQuotaExceededException: () => ServiceQuotaExceededException,
|
|
48
|
+
SortOrder: () => SortOrder,
|
|
49
|
+
ThrottlingException: () => ThrottlingException,
|
|
50
|
+
ValidationException: () => ValidationException,
|
|
51
|
+
ValidationExceptionReason: () => ValidationExceptionReason,
|
|
52
|
+
__Client: () => import_smithy_client.Client,
|
|
53
|
+
paginateListAssetContracts: () => paginateListAssetContracts,
|
|
54
|
+
paginateListTokenBalances: () => paginateListTokenBalances,
|
|
55
|
+
paginateListTransactionEvents: () => paginateListTransactionEvents,
|
|
56
|
+
paginateListTransactions: () => paginateListTransactions
|
|
57
|
+
});
|
|
58
|
+
module.exports = __toCommonJS(src_exports);
|
|
59
|
+
|
|
60
|
+
// src/ManagedBlockchainQueryClient.ts
|
|
61
|
+
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
62
|
+
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
63
|
+
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
64
|
+
var import_middleware_signing = require("@aws-sdk/middleware-signing");
|
|
65
|
+
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
66
|
+
var import_config_resolver = require("@smithy/config-resolver");
|
|
67
|
+
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
68
|
+
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
69
|
+
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
// src/endpoint/EndpointParameters.ts
|
|
73
|
+
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
74
|
+
return {
|
|
75
|
+
...options,
|
|
76
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
77
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
78
|
+
defaultSigningName: "managedblockchain-query"
|
|
79
|
+
};
|
|
80
|
+
}, "resolveClientEndpointParameters");
|
|
81
|
+
var commonParams = {
|
|
82
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
83
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
84
|
+
Region: { type: "builtInParams", name: "region" },
|
|
85
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// src/ManagedBlockchainQueryClient.ts
|
|
89
|
+
var import_runtimeConfig = require("././runtimeConfig");
|
|
90
|
+
|
|
91
|
+
// src/runtimeExtensions.ts
|
|
92
|
+
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
|
|
93
|
+
var import_protocol_http = require("@smithy/protocol-http");
|
|
94
|
+
var import_smithy_client = require("@smithy/smithy-client");
|
|
95
|
+
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
96
|
+
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
97
|
+
const extensionConfiguration = {
|
|
98
|
+
...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
99
|
+
...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
100
|
+
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
|
|
101
|
+
};
|
|
102
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
103
|
+
return {
|
|
104
|
+
...runtimeConfig,
|
|
105
|
+
...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
106
|
+
...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
107
|
+
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
|
|
108
|
+
};
|
|
109
|
+
}, "resolveRuntimeExtensions");
|
|
110
|
+
|
|
111
|
+
// src/ManagedBlockchainQueryClient.ts
|
|
112
|
+
var _ManagedBlockchainQueryClient = class _ManagedBlockchainQueryClient extends import_smithy_client.Client {
|
|
113
|
+
constructor(...[configuration]) {
|
|
114
|
+
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
115
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
116
|
+
const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
|
|
117
|
+
const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
|
|
118
|
+
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
|
|
119
|
+
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
120
|
+
const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
|
|
121
|
+
const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
|
|
122
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
|
|
123
|
+
super(_config_8);
|
|
124
|
+
this.config = _config_8;
|
|
125
|
+
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
126
|
+
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
127
|
+
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
128
|
+
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
129
|
+
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
130
|
+
this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
|
|
131
|
+
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
135
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
136
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
137
|
+
*/
|
|
138
|
+
destroy() {
|
|
139
|
+
super.destroy();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
__name(_ManagedBlockchainQueryClient, "ManagedBlockchainQueryClient");
|
|
143
|
+
var ManagedBlockchainQueryClient = _ManagedBlockchainQueryClient;
|
|
144
|
+
|
|
145
|
+
// src/ManagedBlockchainQuery.ts
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
// src/commands/BatchGetTokenBalanceCommand.ts
|
|
149
|
+
|
|
150
|
+
var import_middleware_serde = require("@smithy/middleware-serde");
|
|
151
|
+
|
|
152
|
+
var import_types = require("@smithy/types");
|
|
153
|
+
|
|
154
|
+
// src/protocols/Aws_restJson1.ts
|
|
155
|
+
var import_core = require("@smithy/core");
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
// src/models/ManagedBlockchainQueryServiceException.ts
|
|
159
|
+
|
|
160
|
+
var _ManagedBlockchainQueryServiceException = class _ManagedBlockchainQueryServiceException extends import_smithy_client.ServiceException {
|
|
161
|
+
/**
|
|
162
|
+
* @internal
|
|
163
|
+
*/
|
|
164
|
+
constructor(options) {
|
|
165
|
+
super(options);
|
|
166
|
+
Object.setPrototypeOf(this, _ManagedBlockchainQueryServiceException.prototype);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
__name(_ManagedBlockchainQueryServiceException, "ManagedBlockchainQueryServiceException");
|
|
170
|
+
var ManagedBlockchainQueryServiceException = _ManagedBlockchainQueryServiceException;
|
|
171
|
+
|
|
172
|
+
// src/models/models_0.ts
|
|
173
|
+
var _AccessDeniedException = class _AccessDeniedException extends ManagedBlockchainQueryServiceException {
|
|
174
|
+
/**
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
constructor(opts) {
|
|
178
|
+
super({
|
|
179
|
+
name: "AccessDeniedException",
|
|
180
|
+
$fault: "client",
|
|
181
|
+
...opts
|
|
182
|
+
});
|
|
183
|
+
this.name = "AccessDeniedException";
|
|
184
|
+
this.$fault = "client";
|
|
185
|
+
Object.setPrototypeOf(this, _AccessDeniedException.prototype);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
__name(_AccessDeniedException, "AccessDeniedException");
|
|
189
|
+
var AccessDeniedException = _AccessDeniedException;
|
|
190
|
+
var QueryNetwork = {
|
|
191
|
+
/**
|
|
192
|
+
* Bitcoin main network
|
|
193
|
+
*/
|
|
194
|
+
BITCOIN_MAINNET: "BITCOIN_MAINNET",
|
|
195
|
+
/**
|
|
196
|
+
* Bitcoin test network
|
|
197
|
+
*/
|
|
198
|
+
BITCOIN_TESTNET: "BITCOIN_TESTNET",
|
|
199
|
+
/**
|
|
200
|
+
* Ethereum main network
|
|
201
|
+
*/
|
|
202
|
+
ETHEREUM_MAINNET: "ETHEREUM_MAINNET",
|
|
203
|
+
/**
|
|
204
|
+
* SEPOLIA network (ethereum testnet)
|
|
205
|
+
*/
|
|
206
|
+
ETHEREUM_SEPOLIA_TESTNET: "ETHEREUM_SEPOLIA_TESTNET"
|
|
207
|
+
};
|
|
208
|
+
var QueryTokenStandard = {
|
|
209
|
+
ERC1155: "ERC1155",
|
|
210
|
+
ERC20: "ERC20",
|
|
211
|
+
ERC721: "ERC721"
|
|
212
|
+
};
|
|
213
|
+
var ErrorType = {
|
|
214
|
+
/**
|
|
215
|
+
* An API request retrieving an item that can't be found
|
|
216
|
+
*/
|
|
217
|
+
RESOURCE_NOT_FOUND_EXCEPTION: "RESOURCE_NOT_FOUND_EXCEPTION",
|
|
218
|
+
/**
|
|
219
|
+
* An API request validation exception
|
|
220
|
+
*/
|
|
221
|
+
VALIDATION_EXCEPTION: "VALIDATION_EXCEPTION"
|
|
222
|
+
};
|
|
223
|
+
var _InternalServerException = class _InternalServerException extends ManagedBlockchainQueryServiceException {
|
|
224
|
+
/**
|
|
225
|
+
* @internal
|
|
226
|
+
*/
|
|
227
|
+
constructor(opts) {
|
|
228
|
+
super({
|
|
229
|
+
name: "InternalServerException",
|
|
230
|
+
$fault: "server",
|
|
231
|
+
...opts
|
|
232
|
+
});
|
|
233
|
+
this.name = "InternalServerException";
|
|
234
|
+
this.$fault = "server";
|
|
235
|
+
this.$retryable = {};
|
|
236
|
+
Object.setPrototypeOf(this, _InternalServerException.prototype);
|
|
237
|
+
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
__name(_InternalServerException, "InternalServerException");
|
|
241
|
+
var InternalServerException = _InternalServerException;
|
|
242
|
+
var ResourceType = {
|
|
243
|
+
COLLECTION: "collection"
|
|
244
|
+
};
|
|
245
|
+
var _ResourceNotFoundException = class _ResourceNotFoundException extends ManagedBlockchainQueryServiceException {
|
|
246
|
+
/**
|
|
247
|
+
* @internal
|
|
248
|
+
*/
|
|
249
|
+
constructor(opts) {
|
|
250
|
+
super({
|
|
251
|
+
name: "ResourceNotFoundException",
|
|
252
|
+
$fault: "client",
|
|
253
|
+
...opts
|
|
254
|
+
});
|
|
255
|
+
this.name = "ResourceNotFoundException";
|
|
256
|
+
this.$fault = "client";
|
|
257
|
+
Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
|
|
258
|
+
this.resourceId = opts.resourceId;
|
|
259
|
+
this.resourceType = opts.resourceType;
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
__name(_ResourceNotFoundException, "ResourceNotFoundException");
|
|
263
|
+
var ResourceNotFoundException = _ResourceNotFoundException;
|
|
264
|
+
var _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends ManagedBlockchainQueryServiceException {
|
|
265
|
+
/**
|
|
266
|
+
* @internal
|
|
267
|
+
*/
|
|
268
|
+
constructor(opts) {
|
|
269
|
+
super({
|
|
270
|
+
name: "ServiceQuotaExceededException",
|
|
271
|
+
$fault: "client",
|
|
272
|
+
...opts
|
|
273
|
+
});
|
|
274
|
+
this.name = "ServiceQuotaExceededException";
|
|
275
|
+
this.$fault = "client";
|
|
276
|
+
Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
|
|
277
|
+
this.resourceId = opts.resourceId;
|
|
278
|
+
this.resourceType = opts.resourceType;
|
|
279
|
+
this.serviceCode = opts.serviceCode;
|
|
280
|
+
this.quotaCode = opts.quotaCode;
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
__name(_ServiceQuotaExceededException, "ServiceQuotaExceededException");
|
|
284
|
+
var ServiceQuotaExceededException = _ServiceQuotaExceededException;
|
|
285
|
+
var _ThrottlingException = class _ThrottlingException extends ManagedBlockchainQueryServiceException {
|
|
286
|
+
/**
|
|
287
|
+
* @internal
|
|
288
|
+
*/
|
|
289
|
+
constructor(opts) {
|
|
290
|
+
super({
|
|
291
|
+
name: "ThrottlingException",
|
|
292
|
+
$fault: "client",
|
|
293
|
+
...opts
|
|
294
|
+
});
|
|
295
|
+
this.name = "ThrottlingException";
|
|
296
|
+
this.$fault = "client";
|
|
297
|
+
this.$retryable = {
|
|
298
|
+
throttling: true
|
|
299
|
+
};
|
|
300
|
+
Object.setPrototypeOf(this, _ThrottlingException.prototype);
|
|
301
|
+
this.serviceCode = opts.serviceCode;
|
|
302
|
+
this.quotaCode = opts.quotaCode;
|
|
303
|
+
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
__name(_ThrottlingException, "ThrottlingException");
|
|
307
|
+
var ThrottlingException = _ThrottlingException;
|
|
308
|
+
var ValidationExceptionReason = {
|
|
309
|
+
CANNOT_PARSE: "cannotParse",
|
|
310
|
+
FIELD_VALIDATION_FAILED: "fieldValidationFailed",
|
|
311
|
+
OTHER: "other",
|
|
312
|
+
UNKNOWN_OPERATION: "unknownOperation"
|
|
313
|
+
};
|
|
314
|
+
var _ValidationException = class _ValidationException extends ManagedBlockchainQueryServiceException {
|
|
315
|
+
/**
|
|
316
|
+
* @internal
|
|
317
|
+
*/
|
|
318
|
+
constructor(opts) {
|
|
319
|
+
super({
|
|
320
|
+
name: "ValidationException",
|
|
321
|
+
$fault: "client",
|
|
322
|
+
...opts
|
|
323
|
+
});
|
|
324
|
+
this.name = "ValidationException";
|
|
325
|
+
this.$fault = "client";
|
|
326
|
+
Object.setPrototypeOf(this, _ValidationException.prototype);
|
|
327
|
+
this.reason = opts.reason;
|
|
328
|
+
this.fieldList = opts.fieldList;
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
__name(_ValidationException, "ValidationException");
|
|
332
|
+
var ValidationException = _ValidationException;
|
|
333
|
+
var ConfirmationStatus = {
|
|
334
|
+
FINAL: "FINAL"
|
|
335
|
+
};
|
|
336
|
+
var ExecutionStatus = {
|
|
337
|
+
FAILED: "FAILED",
|
|
338
|
+
SUCCEEDED: "SUCCEEDED"
|
|
339
|
+
};
|
|
340
|
+
var QueryTransactionStatus = {
|
|
341
|
+
/**
|
|
342
|
+
* The transaction completed on the blockchain, but failed
|
|
343
|
+
*/
|
|
344
|
+
FAILED: "FAILED",
|
|
345
|
+
/**
|
|
346
|
+
* The transaction has been confirmed and is final in the blockchain
|
|
347
|
+
*/
|
|
348
|
+
FINAL: "FINAL"
|
|
349
|
+
};
|
|
350
|
+
var QueryTransactionEventType = {
|
|
351
|
+
/**
|
|
352
|
+
* A Bitcoin Vin transfer type
|
|
353
|
+
*/
|
|
354
|
+
BITCOIN_VIN: "BITCOIN_VIN",
|
|
355
|
+
/**
|
|
356
|
+
* A Bitcoin Vout transfer type
|
|
357
|
+
*/
|
|
358
|
+
BITCOIN_VOUT: "BITCOIN_VOUT",
|
|
359
|
+
/**
|
|
360
|
+
* An ERC1155 transfer type
|
|
361
|
+
*/
|
|
362
|
+
ERC1155_TRANSFER: "ERC1155_TRANSFER",
|
|
363
|
+
/**
|
|
364
|
+
* An ERC20_BURN transfer type
|
|
365
|
+
*/
|
|
366
|
+
ERC20_BURN: "ERC20_BURN",
|
|
367
|
+
/**
|
|
368
|
+
* An ERC20_DEPOSIT transfer type
|
|
369
|
+
*/
|
|
370
|
+
ERC20_DEPOSIT: "ERC20_DEPOSIT",
|
|
371
|
+
/**
|
|
372
|
+
* An ERC20_MINT transfer type
|
|
373
|
+
*/
|
|
374
|
+
ERC20_MINT: "ERC20_MINT",
|
|
375
|
+
/**
|
|
376
|
+
* An ERC20 transfer type
|
|
377
|
+
*/
|
|
378
|
+
ERC20_TRANSFER: "ERC20_TRANSFER",
|
|
379
|
+
/**
|
|
380
|
+
* An ERC20_WITHDRAWAL transfer type
|
|
381
|
+
*/
|
|
382
|
+
ERC20_WITHDRAWAL: "ERC20_WITHDRAWAL",
|
|
383
|
+
/**
|
|
384
|
+
* An ERC721 transfer type
|
|
385
|
+
*/
|
|
386
|
+
ERC721_TRANSFER: "ERC721_TRANSFER",
|
|
387
|
+
/**
|
|
388
|
+
* An ETH transfer type
|
|
389
|
+
*/
|
|
390
|
+
ETH_TRANSFER: "ETH_TRANSFER",
|
|
391
|
+
/**
|
|
392
|
+
* An internal ETH transfer type
|
|
393
|
+
*/
|
|
394
|
+
INTERNAL_ETH_TRANSFER: "INTERNAL_ETH_TRANSFER"
|
|
395
|
+
};
|
|
396
|
+
var ListTransactionsSortBy = {
|
|
397
|
+
/**
|
|
398
|
+
* Timestamp of a transaction
|
|
399
|
+
*/
|
|
400
|
+
TRANSACTION_TIMESTAMP: "TRANSACTION_TIMESTAMP"
|
|
401
|
+
};
|
|
402
|
+
var SortOrder = {
|
|
403
|
+
/**
|
|
404
|
+
* Result sorted in ascending order
|
|
405
|
+
*/
|
|
406
|
+
ASCENDING: "ASCENDING",
|
|
407
|
+
/**
|
|
408
|
+
* Result sorted in descending order
|
|
409
|
+
*/
|
|
410
|
+
DESCENDING: "DESCENDING"
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
// src/protocols/Aws_restJson1.ts
|
|
414
|
+
var se_BatchGetTokenBalanceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
415
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
416
|
+
const headers = {
|
|
417
|
+
"content-type": "application/json"
|
|
418
|
+
};
|
|
419
|
+
b.bp("/batch-get-token-balance");
|
|
420
|
+
let body;
|
|
421
|
+
body = JSON.stringify(
|
|
422
|
+
(0, import_smithy_client.take)(input, {
|
|
423
|
+
getTokenBalanceInputs: (_) => se_GetTokenBalanceInputList(_, context)
|
|
424
|
+
})
|
|
425
|
+
);
|
|
426
|
+
b.m("POST").h(headers).b(body);
|
|
427
|
+
return b.build();
|
|
428
|
+
}, "se_BatchGetTokenBalanceCommand");
|
|
429
|
+
var se_GetAssetContractCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
430
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
431
|
+
const headers = {
|
|
432
|
+
"content-type": "application/json"
|
|
433
|
+
};
|
|
434
|
+
b.bp("/get-asset-contract");
|
|
435
|
+
let body;
|
|
436
|
+
body = JSON.stringify(
|
|
437
|
+
(0, import_smithy_client.take)(input, {
|
|
438
|
+
contractIdentifier: (_) => (0, import_smithy_client._json)(_)
|
|
439
|
+
})
|
|
440
|
+
);
|
|
441
|
+
b.m("POST").h(headers).b(body);
|
|
442
|
+
return b.build();
|
|
443
|
+
}, "se_GetAssetContractCommand");
|
|
444
|
+
var se_GetTokenBalanceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
445
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
446
|
+
const headers = {
|
|
447
|
+
"content-type": "application/json"
|
|
448
|
+
};
|
|
449
|
+
b.bp("/get-token-balance");
|
|
450
|
+
let body;
|
|
451
|
+
body = JSON.stringify(
|
|
452
|
+
(0, import_smithy_client.take)(input, {
|
|
453
|
+
atBlockchainInstant: (_) => se_BlockchainInstant(_, context),
|
|
454
|
+
ownerIdentifier: (_) => (0, import_smithy_client._json)(_),
|
|
455
|
+
tokenIdentifier: (_) => (0, import_smithy_client._json)(_)
|
|
456
|
+
})
|
|
457
|
+
);
|
|
458
|
+
b.m("POST").h(headers).b(body);
|
|
459
|
+
return b.build();
|
|
460
|
+
}, "se_GetTokenBalanceCommand");
|
|
461
|
+
var se_GetTransactionCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
462
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
463
|
+
const headers = {
|
|
464
|
+
"content-type": "application/json"
|
|
465
|
+
};
|
|
466
|
+
b.bp("/get-transaction");
|
|
467
|
+
let body;
|
|
468
|
+
body = JSON.stringify(
|
|
469
|
+
(0, import_smithy_client.take)(input, {
|
|
470
|
+
network: [],
|
|
471
|
+
transactionHash: []
|
|
472
|
+
})
|
|
473
|
+
);
|
|
474
|
+
b.m("POST").h(headers).b(body);
|
|
475
|
+
return b.build();
|
|
476
|
+
}, "se_GetTransactionCommand");
|
|
477
|
+
var se_ListAssetContractsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
478
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
479
|
+
const headers = {
|
|
480
|
+
"content-type": "application/json"
|
|
481
|
+
};
|
|
482
|
+
b.bp("/list-asset-contracts");
|
|
483
|
+
let body;
|
|
484
|
+
body = JSON.stringify(
|
|
485
|
+
(0, import_smithy_client.take)(input, {
|
|
486
|
+
contractFilter: (_) => (0, import_smithy_client._json)(_),
|
|
487
|
+
maxResults: [],
|
|
488
|
+
nextToken: []
|
|
489
|
+
})
|
|
490
|
+
);
|
|
491
|
+
b.m("POST").h(headers).b(body);
|
|
492
|
+
return b.build();
|
|
493
|
+
}, "se_ListAssetContractsCommand");
|
|
494
|
+
var se_ListTokenBalancesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
495
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
496
|
+
const headers = {
|
|
497
|
+
"content-type": "application/json"
|
|
498
|
+
};
|
|
499
|
+
b.bp("/list-token-balances");
|
|
500
|
+
let body;
|
|
501
|
+
body = JSON.stringify(
|
|
502
|
+
(0, import_smithy_client.take)(input, {
|
|
503
|
+
maxResults: [],
|
|
504
|
+
nextToken: [],
|
|
505
|
+
ownerFilter: (_) => (0, import_smithy_client._json)(_),
|
|
506
|
+
tokenFilter: (_) => (0, import_smithy_client._json)(_)
|
|
507
|
+
})
|
|
508
|
+
);
|
|
509
|
+
b.m("POST").h(headers).b(body);
|
|
510
|
+
return b.build();
|
|
511
|
+
}, "se_ListTokenBalancesCommand");
|
|
512
|
+
var se_ListTransactionEventsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
513
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
514
|
+
const headers = {
|
|
515
|
+
"content-type": "application/json"
|
|
516
|
+
};
|
|
517
|
+
b.bp("/list-transaction-events");
|
|
518
|
+
let body;
|
|
519
|
+
body = JSON.stringify(
|
|
520
|
+
(0, import_smithy_client.take)(input, {
|
|
521
|
+
maxResults: [],
|
|
522
|
+
network: [],
|
|
523
|
+
nextToken: [],
|
|
524
|
+
transactionHash: []
|
|
525
|
+
})
|
|
526
|
+
);
|
|
527
|
+
b.m("POST").h(headers).b(body);
|
|
528
|
+
return b.build();
|
|
529
|
+
}, "se_ListTransactionEventsCommand");
|
|
530
|
+
var se_ListTransactionsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
531
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
532
|
+
const headers = {
|
|
533
|
+
"content-type": "application/json"
|
|
534
|
+
};
|
|
535
|
+
b.bp("/list-transactions");
|
|
536
|
+
let body;
|
|
537
|
+
body = JSON.stringify(
|
|
538
|
+
(0, import_smithy_client.take)(input, {
|
|
539
|
+
address: [],
|
|
540
|
+
fromBlockchainInstant: (_) => se_BlockchainInstant(_, context),
|
|
541
|
+
maxResults: [],
|
|
542
|
+
network: [],
|
|
543
|
+
nextToken: [],
|
|
544
|
+
sort: (_) => (0, import_smithy_client._json)(_),
|
|
545
|
+
toBlockchainInstant: (_) => se_BlockchainInstant(_, context)
|
|
546
|
+
})
|
|
547
|
+
);
|
|
548
|
+
b.m("POST").h(headers).b(body);
|
|
549
|
+
return b.build();
|
|
550
|
+
}, "se_ListTransactionsCommand");
|
|
551
|
+
var de_BatchGetTokenBalanceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
552
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
553
|
+
return de_BatchGetTokenBalanceCommandError(output, context);
|
|
554
|
+
}
|
|
555
|
+
const contents = (0, import_smithy_client.map)({
|
|
556
|
+
$metadata: deserializeMetadata(output)
|
|
557
|
+
});
|
|
558
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
559
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
560
|
+
errors: (_) => de_BatchGetTokenBalanceErrors(_, context),
|
|
561
|
+
tokenBalances: (_) => de_BatchGetTokenBalanceOutputList(_, context)
|
|
562
|
+
});
|
|
563
|
+
Object.assign(contents, doc);
|
|
564
|
+
return contents;
|
|
565
|
+
}, "de_BatchGetTokenBalanceCommand");
|
|
566
|
+
var de_BatchGetTokenBalanceCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
567
|
+
const parsedOutput = {
|
|
568
|
+
...output,
|
|
569
|
+
body: await parseErrorBody(output.body, context)
|
|
570
|
+
};
|
|
571
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
572
|
+
switch (errorCode) {
|
|
573
|
+
case "AccessDeniedException":
|
|
574
|
+
case "com.amazonaws.managedblockchainquery#AccessDeniedException":
|
|
575
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
576
|
+
case "InternalServerException":
|
|
577
|
+
case "com.amazonaws.managedblockchainquery#InternalServerException":
|
|
578
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
579
|
+
case "ResourceNotFoundException":
|
|
580
|
+
case "com.amazonaws.managedblockchainquery#ResourceNotFoundException":
|
|
581
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
582
|
+
case "ServiceQuotaExceededException":
|
|
583
|
+
case "com.amazonaws.managedblockchainquery#ServiceQuotaExceededException":
|
|
584
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
585
|
+
case "ThrottlingException":
|
|
586
|
+
case "com.amazonaws.managedblockchainquery#ThrottlingException":
|
|
587
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
588
|
+
case "ValidationException":
|
|
589
|
+
case "com.amazonaws.managedblockchainquery#ValidationException":
|
|
590
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
591
|
+
default:
|
|
592
|
+
const parsedBody = parsedOutput.body;
|
|
593
|
+
return throwDefaultError({
|
|
594
|
+
output,
|
|
595
|
+
parsedBody,
|
|
596
|
+
errorCode
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
}, "de_BatchGetTokenBalanceCommandError");
|
|
600
|
+
var de_GetAssetContractCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
601
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
602
|
+
return de_GetAssetContractCommandError(output, context);
|
|
603
|
+
}
|
|
604
|
+
const contents = (0, import_smithy_client.map)({
|
|
605
|
+
$metadata: deserializeMetadata(output)
|
|
606
|
+
});
|
|
607
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
608
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
609
|
+
contractIdentifier: import_smithy_client._json,
|
|
610
|
+
deployerAddress: import_smithy_client.expectString,
|
|
611
|
+
metadata: import_smithy_client._json,
|
|
612
|
+
tokenStandard: import_smithy_client.expectString
|
|
613
|
+
});
|
|
614
|
+
Object.assign(contents, doc);
|
|
615
|
+
return contents;
|
|
616
|
+
}, "de_GetAssetContractCommand");
|
|
617
|
+
var de_GetAssetContractCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
618
|
+
const parsedOutput = {
|
|
619
|
+
...output,
|
|
620
|
+
body: await parseErrorBody(output.body, context)
|
|
621
|
+
};
|
|
622
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
623
|
+
switch (errorCode) {
|
|
624
|
+
case "AccessDeniedException":
|
|
625
|
+
case "com.amazonaws.managedblockchainquery#AccessDeniedException":
|
|
626
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
627
|
+
case "InternalServerException":
|
|
628
|
+
case "com.amazonaws.managedblockchainquery#InternalServerException":
|
|
629
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
630
|
+
case "ResourceNotFoundException":
|
|
631
|
+
case "com.amazonaws.managedblockchainquery#ResourceNotFoundException":
|
|
632
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
633
|
+
case "ServiceQuotaExceededException":
|
|
634
|
+
case "com.amazonaws.managedblockchainquery#ServiceQuotaExceededException":
|
|
635
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
636
|
+
case "ThrottlingException":
|
|
637
|
+
case "com.amazonaws.managedblockchainquery#ThrottlingException":
|
|
638
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
639
|
+
case "ValidationException":
|
|
640
|
+
case "com.amazonaws.managedblockchainquery#ValidationException":
|
|
641
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
642
|
+
default:
|
|
643
|
+
const parsedBody = parsedOutput.body;
|
|
644
|
+
return throwDefaultError({
|
|
645
|
+
output,
|
|
646
|
+
parsedBody,
|
|
647
|
+
errorCode
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
}, "de_GetAssetContractCommandError");
|
|
651
|
+
var de_GetTokenBalanceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
652
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
653
|
+
return de_GetTokenBalanceCommandError(output, context);
|
|
654
|
+
}
|
|
655
|
+
const contents = (0, import_smithy_client.map)({
|
|
656
|
+
$metadata: deserializeMetadata(output)
|
|
657
|
+
});
|
|
658
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
659
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
660
|
+
atBlockchainInstant: (_) => de_BlockchainInstant(_, context),
|
|
661
|
+
balance: import_smithy_client.expectString,
|
|
662
|
+
lastUpdatedTime: (_) => de_BlockchainInstant(_, context),
|
|
663
|
+
ownerIdentifier: import_smithy_client._json,
|
|
664
|
+
tokenIdentifier: import_smithy_client._json
|
|
665
|
+
});
|
|
666
|
+
Object.assign(contents, doc);
|
|
667
|
+
return contents;
|
|
668
|
+
}, "de_GetTokenBalanceCommand");
|
|
669
|
+
var de_GetTokenBalanceCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
670
|
+
const parsedOutput = {
|
|
671
|
+
...output,
|
|
672
|
+
body: await parseErrorBody(output.body, context)
|
|
673
|
+
};
|
|
674
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
675
|
+
switch (errorCode) {
|
|
676
|
+
case "AccessDeniedException":
|
|
677
|
+
case "com.amazonaws.managedblockchainquery#AccessDeniedException":
|
|
678
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
679
|
+
case "InternalServerException":
|
|
680
|
+
case "com.amazonaws.managedblockchainquery#InternalServerException":
|
|
681
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
682
|
+
case "ResourceNotFoundException":
|
|
683
|
+
case "com.amazonaws.managedblockchainquery#ResourceNotFoundException":
|
|
684
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
685
|
+
case "ServiceQuotaExceededException":
|
|
686
|
+
case "com.amazonaws.managedblockchainquery#ServiceQuotaExceededException":
|
|
687
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
688
|
+
case "ThrottlingException":
|
|
689
|
+
case "com.amazonaws.managedblockchainquery#ThrottlingException":
|
|
690
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
691
|
+
case "ValidationException":
|
|
692
|
+
case "com.amazonaws.managedblockchainquery#ValidationException":
|
|
693
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
694
|
+
default:
|
|
695
|
+
const parsedBody = parsedOutput.body;
|
|
696
|
+
return throwDefaultError({
|
|
697
|
+
output,
|
|
698
|
+
parsedBody,
|
|
699
|
+
errorCode
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
}, "de_GetTokenBalanceCommandError");
|
|
703
|
+
var de_GetTransactionCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
704
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
705
|
+
return de_GetTransactionCommandError(output, context);
|
|
706
|
+
}
|
|
707
|
+
const contents = (0, import_smithy_client.map)({
|
|
708
|
+
$metadata: deserializeMetadata(output)
|
|
709
|
+
});
|
|
710
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
711
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
712
|
+
transaction: (_) => de_Transaction(_, context)
|
|
713
|
+
});
|
|
714
|
+
Object.assign(contents, doc);
|
|
715
|
+
return contents;
|
|
716
|
+
}, "de_GetTransactionCommand");
|
|
717
|
+
var de_GetTransactionCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
718
|
+
const parsedOutput = {
|
|
719
|
+
...output,
|
|
720
|
+
body: await parseErrorBody(output.body, context)
|
|
721
|
+
};
|
|
722
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
723
|
+
switch (errorCode) {
|
|
724
|
+
case "AccessDeniedException":
|
|
725
|
+
case "com.amazonaws.managedblockchainquery#AccessDeniedException":
|
|
726
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
727
|
+
case "InternalServerException":
|
|
728
|
+
case "com.amazonaws.managedblockchainquery#InternalServerException":
|
|
729
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
730
|
+
case "ResourceNotFoundException":
|
|
731
|
+
case "com.amazonaws.managedblockchainquery#ResourceNotFoundException":
|
|
732
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
733
|
+
case "ServiceQuotaExceededException":
|
|
734
|
+
case "com.amazonaws.managedblockchainquery#ServiceQuotaExceededException":
|
|
735
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
736
|
+
case "ThrottlingException":
|
|
737
|
+
case "com.amazonaws.managedblockchainquery#ThrottlingException":
|
|
738
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
739
|
+
case "ValidationException":
|
|
740
|
+
case "com.amazonaws.managedblockchainquery#ValidationException":
|
|
741
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
742
|
+
default:
|
|
743
|
+
const parsedBody = parsedOutput.body;
|
|
744
|
+
return throwDefaultError({
|
|
745
|
+
output,
|
|
746
|
+
parsedBody,
|
|
747
|
+
errorCode
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
}, "de_GetTransactionCommandError");
|
|
751
|
+
var de_ListAssetContractsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
752
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
753
|
+
return de_ListAssetContractsCommandError(output, context);
|
|
754
|
+
}
|
|
755
|
+
const contents = (0, import_smithy_client.map)({
|
|
756
|
+
$metadata: deserializeMetadata(output)
|
|
757
|
+
});
|
|
758
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
759
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
760
|
+
contracts: import_smithy_client._json,
|
|
761
|
+
nextToken: import_smithy_client.expectString
|
|
762
|
+
});
|
|
763
|
+
Object.assign(contents, doc);
|
|
764
|
+
return contents;
|
|
765
|
+
}, "de_ListAssetContractsCommand");
|
|
766
|
+
var de_ListAssetContractsCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
767
|
+
const parsedOutput = {
|
|
768
|
+
...output,
|
|
769
|
+
body: await parseErrorBody(output.body, context)
|
|
770
|
+
};
|
|
771
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
772
|
+
switch (errorCode) {
|
|
773
|
+
case "AccessDeniedException":
|
|
774
|
+
case "com.amazonaws.managedblockchainquery#AccessDeniedException":
|
|
775
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
776
|
+
case "InternalServerException":
|
|
777
|
+
case "com.amazonaws.managedblockchainquery#InternalServerException":
|
|
778
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
779
|
+
case "ServiceQuotaExceededException":
|
|
780
|
+
case "com.amazonaws.managedblockchainquery#ServiceQuotaExceededException":
|
|
781
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
782
|
+
case "ThrottlingException":
|
|
783
|
+
case "com.amazonaws.managedblockchainquery#ThrottlingException":
|
|
784
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
785
|
+
case "ValidationException":
|
|
786
|
+
case "com.amazonaws.managedblockchainquery#ValidationException":
|
|
787
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
788
|
+
default:
|
|
789
|
+
const parsedBody = parsedOutput.body;
|
|
790
|
+
return throwDefaultError({
|
|
791
|
+
output,
|
|
792
|
+
parsedBody,
|
|
793
|
+
errorCode
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
}, "de_ListAssetContractsCommandError");
|
|
797
|
+
var de_ListTokenBalancesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
798
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
799
|
+
return de_ListTokenBalancesCommandError(output, context);
|
|
800
|
+
}
|
|
801
|
+
const contents = (0, import_smithy_client.map)({
|
|
802
|
+
$metadata: deserializeMetadata(output)
|
|
803
|
+
});
|
|
804
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
805
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
806
|
+
nextToken: import_smithy_client.expectString,
|
|
807
|
+
tokenBalances: (_) => de_TokenBalanceList(_, context)
|
|
808
|
+
});
|
|
809
|
+
Object.assign(contents, doc);
|
|
810
|
+
return contents;
|
|
811
|
+
}, "de_ListTokenBalancesCommand");
|
|
812
|
+
var de_ListTokenBalancesCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
813
|
+
const parsedOutput = {
|
|
814
|
+
...output,
|
|
815
|
+
body: await parseErrorBody(output.body, context)
|
|
816
|
+
};
|
|
817
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
818
|
+
switch (errorCode) {
|
|
819
|
+
case "AccessDeniedException":
|
|
820
|
+
case "com.amazonaws.managedblockchainquery#AccessDeniedException":
|
|
821
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
822
|
+
case "InternalServerException":
|
|
823
|
+
case "com.amazonaws.managedblockchainquery#InternalServerException":
|
|
824
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
825
|
+
case "ServiceQuotaExceededException":
|
|
826
|
+
case "com.amazonaws.managedblockchainquery#ServiceQuotaExceededException":
|
|
827
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
828
|
+
case "ThrottlingException":
|
|
829
|
+
case "com.amazonaws.managedblockchainquery#ThrottlingException":
|
|
830
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
831
|
+
case "ValidationException":
|
|
832
|
+
case "com.amazonaws.managedblockchainquery#ValidationException":
|
|
833
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
834
|
+
default:
|
|
835
|
+
const parsedBody = parsedOutput.body;
|
|
836
|
+
return throwDefaultError({
|
|
837
|
+
output,
|
|
838
|
+
parsedBody,
|
|
839
|
+
errorCode
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
}, "de_ListTokenBalancesCommandError");
|
|
843
|
+
var de_ListTransactionEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
844
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
845
|
+
return de_ListTransactionEventsCommandError(output, context);
|
|
846
|
+
}
|
|
847
|
+
const contents = (0, import_smithy_client.map)({
|
|
848
|
+
$metadata: deserializeMetadata(output)
|
|
849
|
+
});
|
|
850
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
851
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
852
|
+
events: import_smithy_client._json,
|
|
853
|
+
nextToken: import_smithy_client.expectString
|
|
854
|
+
});
|
|
855
|
+
Object.assign(contents, doc);
|
|
856
|
+
return contents;
|
|
857
|
+
}, "de_ListTransactionEventsCommand");
|
|
858
|
+
var de_ListTransactionEventsCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
859
|
+
const parsedOutput = {
|
|
860
|
+
...output,
|
|
861
|
+
body: await parseErrorBody(output.body, context)
|
|
862
|
+
};
|
|
863
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
864
|
+
switch (errorCode) {
|
|
865
|
+
case "AccessDeniedException":
|
|
866
|
+
case "com.amazonaws.managedblockchainquery#AccessDeniedException":
|
|
867
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
868
|
+
case "InternalServerException":
|
|
869
|
+
case "com.amazonaws.managedblockchainquery#InternalServerException":
|
|
870
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
871
|
+
case "ServiceQuotaExceededException":
|
|
872
|
+
case "com.amazonaws.managedblockchainquery#ServiceQuotaExceededException":
|
|
873
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
874
|
+
case "ThrottlingException":
|
|
875
|
+
case "com.amazonaws.managedblockchainquery#ThrottlingException":
|
|
876
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
877
|
+
case "ValidationException":
|
|
878
|
+
case "com.amazonaws.managedblockchainquery#ValidationException":
|
|
879
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
880
|
+
default:
|
|
881
|
+
const parsedBody = parsedOutput.body;
|
|
882
|
+
return throwDefaultError({
|
|
883
|
+
output,
|
|
884
|
+
parsedBody,
|
|
885
|
+
errorCode
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
}, "de_ListTransactionEventsCommandError");
|
|
889
|
+
var de_ListTransactionsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
890
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
891
|
+
return de_ListTransactionsCommandError(output, context);
|
|
892
|
+
}
|
|
893
|
+
const contents = (0, import_smithy_client.map)({
|
|
894
|
+
$metadata: deserializeMetadata(output)
|
|
895
|
+
});
|
|
896
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
897
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
898
|
+
nextToken: import_smithy_client.expectString,
|
|
899
|
+
transactions: (_) => de_TransactionOutputList(_, context)
|
|
900
|
+
});
|
|
901
|
+
Object.assign(contents, doc);
|
|
902
|
+
return contents;
|
|
903
|
+
}, "de_ListTransactionsCommand");
|
|
904
|
+
var de_ListTransactionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
905
|
+
const parsedOutput = {
|
|
906
|
+
...output,
|
|
907
|
+
body: await parseErrorBody(output.body, context)
|
|
908
|
+
};
|
|
909
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
910
|
+
switch (errorCode) {
|
|
911
|
+
case "AccessDeniedException":
|
|
912
|
+
case "com.amazonaws.managedblockchainquery#AccessDeniedException":
|
|
913
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
914
|
+
case "InternalServerException":
|
|
915
|
+
case "com.amazonaws.managedblockchainquery#InternalServerException":
|
|
916
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
917
|
+
case "ServiceQuotaExceededException":
|
|
918
|
+
case "com.amazonaws.managedblockchainquery#ServiceQuotaExceededException":
|
|
919
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
920
|
+
case "ThrottlingException":
|
|
921
|
+
case "com.amazonaws.managedblockchainquery#ThrottlingException":
|
|
922
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
923
|
+
case "ValidationException":
|
|
924
|
+
case "com.amazonaws.managedblockchainquery#ValidationException":
|
|
925
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
926
|
+
default:
|
|
927
|
+
const parsedBody = parsedOutput.body;
|
|
928
|
+
return throwDefaultError({
|
|
929
|
+
output,
|
|
930
|
+
parsedBody,
|
|
931
|
+
errorCode
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
}, "de_ListTransactionsCommandError");
|
|
935
|
+
var throwDefaultError = (0, import_smithy_client.withBaseException)(ManagedBlockchainQueryServiceException);
|
|
936
|
+
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
937
|
+
const contents = (0, import_smithy_client.map)({});
|
|
938
|
+
const data = parsedOutput.body;
|
|
939
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
940
|
+
message: import_smithy_client.expectString
|
|
941
|
+
});
|
|
942
|
+
Object.assign(contents, doc);
|
|
943
|
+
const exception = new AccessDeniedException({
|
|
944
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
945
|
+
...contents
|
|
946
|
+
});
|
|
947
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
948
|
+
}, "de_AccessDeniedExceptionRes");
|
|
949
|
+
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
950
|
+
const contents = (0, import_smithy_client.map)({
|
|
951
|
+
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, import_smithy_client.strictParseInt32)(parsedOutput.headers[_ra])]
|
|
952
|
+
});
|
|
953
|
+
const data = parsedOutput.body;
|
|
954
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
955
|
+
message: import_smithy_client.expectString
|
|
956
|
+
});
|
|
957
|
+
Object.assign(contents, doc);
|
|
958
|
+
const exception = new InternalServerException({
|
|
959
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
960
|
+
...contents
|
|
961
|
+
});
|
|
962
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
963
|
+
}, "de_InternalServerExceptionRes");
|
|
964
|
+
var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
965
|
+
const contents = (0, import_smithy_client.map)({});
|
|
966
|
+
const data = parsedOutput.body;
|
|
967
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
968
|
+
message: import_smithy_client.expectString,
|
|
969
|
+
resourceId: import_smithy_client.expectString,
|
|
970
|
+
resourceType: import_smithy_client.expectString
|
|
971
|
+
});
|
|
972
|
+
Object.assign(contents, doc);
|
|
973
|
+
const exception = new ResourceNotFoundException({
|
|
974
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
975
|
+
...contents
|
|
976
|
+
});
|
|
977
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
978
|
+
}, "de_ResourceNotFoundExceptionRes");
|
|
979
|
+
var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
980
|
+
const contents = (0, import_smithy_client.map)({});
|
|
981
|
+
const data = parsedOutput.body;
|
|
982
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
983
|
+
message: import_smithy_client.expectString,
|
|
984
|
+
quotaCode: import_smithy_client.expectString,
|
|
985
|
+
resourceId: import_smithy_client.expectString,
|
|
986
|
+
resourceType: import_smithy_client.expectString,
|
|
987
|
+
serviceCode: import_smithy_client.expectString
|
|
988
|
+
});
|
|
989
|
+
Object.assign(contents, doc);
|
|
990
|
+
const exception = new ServiceQuotaExceededException({
|
|
991
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
992
|
+
...contents
|
|
993
|
+
});
|
|
994
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
995
|
+
}, "de_ServiceQuotaExceededExceptionRes");
|
|
996
|
+
var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
997
|
+
const contents = (0, import_smithy_client.map)({
|
|
998
|
+
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, import_smithy_client.strictParseInt32)(parsedOutput.headers[_ra])]
|
|
999
|
+
});
|
|
1000
|
+
const data = parsedOutput.body;
|
|
1001
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
1002
|
+
message: import_smithy_client.expectString,
|
|
1003
|
+
quotaCode: import_smithy_client.expectString,
|
|
1004
|
+
serviceCode: import_smithy_client.expectString
|
|
1005
|
+
});
|
|
1006
|
+
Object.assign(contents, doc);
|
|
1007
|
+
const exception = new ThrottlingException({
|
|
1008
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1009
|
+
...contents
|
|
1010
|
+
});
|
|
1011
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
1012
|
+
}, "de_ThrottlingExceptionRes");
|
|
1013
|
+
var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
1014
|
+
const contents = (0, import_smithy_client.map)({});
|
|
1015
|
+
const data = parsedOutput.body;
|
|
1016
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
1017
|
+
fieldList: import_smithy_client._json,
|
|
1018
|
+
message: import_smithy_client.expectString,
|
|
1019
|
+
reason: import_smithy_client.expectString
|
|
1020
|
+
});
|
|
1021
|
+
Object.assign(contents, doc);
|
|
1022
|
+
const exception = new ValidationException({
|
|
1023
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1024
|
+
...contents
|
|
1025
|
+
});
|
|
1026
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
1027
|
+
}, "de_ValidationExceptionRes");
|
|
1028
|
+
var se_BatchGetTokenBalanceInputItem = /* @__PURE__ */ __name((input, context) => {
|
|
1029
|
+
return (0, import_smithy_client.take)(input, {
|
|
1030
|
+
atBlockchainInstant: (_) => se_BlockchainInstant(_, context),
|
|
1031
|
+
ownerIdentifier: import_smithy_client._json,
|
|
1032
|
+
tokenIdentifier: import_smithy_client._json
|
|
1033
|
+
});
|
|
1034
|
+
}, "se_BatchGetTokenBalanceInputItem");
|
|
1035
|
+
var se_BlockchainInstant = /* @__PURE__ */ __name((input, context) => {
|
|
1036
|
+
return (0, import_smithy_client.take)(input, {
|
|
1037
|
+
time: (_) => Math.round(_.getTime() / 1e3)
|
|
1038
|
+
});
|
|
1039
|
+
}, "se_BlockchainInstant");
|
|
1040
|
+
var se_GetTokenBalanceInputList = /* @__PURE__ */ __name((input, context) => {
|
|
1041
|
+
return input.filter((e) => e != null).map((entry) => {
|
|
1042
|
+
return se_BatchGetTokenBalanceInputItem(entry, context);
|
|
1043
|
+
});
|
|
1044
|
+
}, "se_GetTokenBalanceInputList");
|
|
1045
|
+
var de_BatchGetTokenBalanceErrorItem = /* @__PURE__ */ __name((output, context) => {
|
|
1046
|
+
return (0, import_smithy_client.take)(output, {
|
|
1047
|
+
atBlockchainInstant: (_) => de_BlockchainInstant(_, context),
|
|
1048
|
+
errorCode: import_smithy_client.expectString,
|
|
1049
|
+
errorMessage: import_smithy_client.expectString,
|
|
1050
|
+
errorType: import_smithy_client.expectString,
|
|
1051
|
+
ownerIdentifier: import_smithy_client._json,
|
|
1052
|
+
tokenIdentifier: import_smithy_client._json
|
|
1053
|
+
});
|
|
1054
|
+
}, "de_BatchGetTokenBalanceErrorItem");
|
|
1055
|
+
var de_BatchGetTokenBalanceErrors = /* @__PURE__ */ __name((output, context) => {
|
|
1056
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1057
|
+
return de_BatchGetTokenBalanceErrorItem(entry, context);
|
|
1058
|
+
});
|
|
1059
|
+
return retVal;
|
|
1060
|
+
}, "de_BatchGetTokenBalanceErrors");
|
|
1061
|
+
var de_BatchGetTokenBalanceOutputItem = /* @__PURE__ */ __name((output, context) => {
|
|
1062
|
+
return (0, import_smithy_client.take)(output, {
|
|
1063
|
+
atBlockchainInstant: (_) => de_BlockchainInstant(_, context),
|
|
1064
|
+
balance: import_smithy_client.expectString,
|
|
1065
|
+
lastUpdatedTime: (_) => de_BlockchainInstant(_, context),
|
|
1066
|
+
ownerIdentifier: import_smithy_client._json,
|
|
1067
|
+
tokenIdentifier: import_smithy_client._json
|
|
1068
|
+
});
|
|
1069
|
+
}, "de_BatchGetTokenBalanceOutputItem");
|
|
1070
|
+
var de_BatchGetTokenBalanceOutputList = /* @__PURE__ */ __name((output, context) => {
|
|
1071
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1072
|
+
return de_BatchGetTokenBalanceOutputItem(entry, context);
|
|
1073
|
+
});
|
|
1074
|
+
return retVal;
|
|
1075
|
+
}, "de_BatchGetTokenBalanceOutputList");
|
|
1076
|
+
var de_BlockchainInstant = /* @__PURE__ */ __name((output, context) => {
|
|
1077
|
+
return (0, import_smithy_client.take)(output, {
|
|
1078
|
+
time: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_)))
|
|
1079
|
+
});
|
|
1080
|
+
}, "de_BlockchainInstant");
|
|
1081
|
+
var de_TokenBalance = /* @__PURE__ */ __name((output, context) => {
|
|
1082
|
+
return (0, import_smithy_client.take)(output, {
|
|
1083
|
+
atBlockchainInstant: (_) => de_BlockchainInstant(_, context),
|
|
1084
|
+
balance: import_smithy_client.expectString,
|
|
1085
|
+
lastUpdatedTime: (_) => de_BlockchainInstant(_, context),
|
|
1086
|
+
ownerIdentifier: import_smithy_client._json,
|
|
1087
|
+
tokenIdentifier: import_smithy_client._json
|
|
1088
|
+
});
|
|
1089
|
+
}, "de_TokenBalance");
|
|
1090
|
+
var de_TokenBalanceList = /* @__PURE__ */ __name((output, context) => {
|
|
1091
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1092
|
+
return de_TokenBalance(entry, context);
|
|
1093
|
+
});
|
|
1094
|
+
return retVal;
|
|
1095
|
+
}, "de_TokenBalanceList");
|
|
1096
|
+
var de_Transaction = /* @__PURE__ */ __name((output, context) => {
|
|
1097
|
+
return (0, import_smithy_client.take)(output, {
|
|
1098
|
+
blockHash: import_smithy_client.expectString,
|
|
1099
|
+
blockNumber: import_smithy_client.expectString,
|
|
1100
|
+
confirmationStatus: import_smithy_client.expectString,
|
|
1101
|
+
contractAddress: import_smithy_client.expectString,
|
|
1102
|
+
cumulativeGasUsed: import_smithy_client.expectString,
|
|
1103
|
+
effectiveGasPrice: import_smithy_client.expectString,
|
|
1104
|
+
executionStatus: import_smithy_client.expectString,
|
|
1105
|
+
from: import_smithy_client.expectString,
|
|
1106
|
+
gasUsed: import_smithy_client.expectString,
|
|
1107
|
+
network: import_smithy_client.expectString,
|
|
1108
|
+
numberOfTransactions: import_smithy_client.expectLong,
|
|
1109
|
+
signatureR: import_smithy_client.expectString,
|
|
1110
|
+
signatureS: import_smithy_client.expectString,
|
|
1111
|
+
signatureV: import_smithy_client.expectInt32,
|
|
1112
|
+
status: import_smithy_client.expectString,
|
|
1113
|
+
to: import_smithy_client.expectString,
|
|
1114
|
+
transactionFee: import_smithy_client.expectString,
|
|
1115
|
+
transactionHash: import_smithy_client.expectString,
|
|
1116
|
+
transactionId: import_smithy_client.expectString,
|
|
1117
|
+
transactionIndex: import_smithy_client.expectLong,
|
|
1118
|
+
transactionTimestamp: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_)))
|
|
1119
|
+
});
|
|
1120
|
+
}, "de_Transaction");
|
|
1121
|
+
var de_TransactionOutputItem = /* @__PURE__ */ __name((output, context) => {
|
|
1122
|
+
return (0, import_smithy_client.take)(output, {
|
|
1123
|
+
network: import_smithy_client.expectString,
|
|
1124
|
+
transactionHash: import_smithy_client.expectString,
|
|
1125
|
+
transactionTimestamp: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_)))
|
|
1126
|
+
});
|
|
1127
|
+
}, "de_TransactionOutputItem");
|
|
1128
|
+
var de_TransactionOutputList = /* @__PURE__ */ __name((output, context) => {
|
|
1129
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1130
|
+
return de_TransactionOutputItem(entry, context);
|
|
1131
|
+
});
|
|
1132
|
+
return retVal;
|
|
1133
|
+
}, "de_TransactionOutputList");
|
|
1134
|
+
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
1135
|
+
httpStatusCode: output.statusCode,
|
|
1136
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1137
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1138
|
+
cfId: output.headers["x-amz-cf-id"]
|
|
1139
|
+
}), "deserializeMetadata");
|
|
1140
|
+
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1141
|
+
var _rAS = "retryAfterSeconds";
|
|
1142
|
+
var _ra = "retry-after";
|
|
1143
|
+
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1144
|
+
if (encoded.length) {
|
|
1145
|
+
return JSON.parse(encoded);
|
|
1146
|
+
}
|
|
1147
|
+
return {};
|
|
1148
|
+
}), "parseBody");
|
|
1149
|
+
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1150
|
+
const value = await parseBody(errorBody, context);
|
|
1151
|
+
value.message = value.message ?? value.Message;
|
|
1152
|
+
return value;
|
|
1153
|
+
}, "parseErrorBody");
|
|
1154
|
+
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1155
|
+
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1156
|
+
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1157
|
+
let cleanValue = rawValue;
|
|
1158
|
+
if (typeof cleanValue === "number") {
|
|
1159
|
+
cleanValue = cleanValue.toString();
|
|
1160
|
+
}
|
|
1161
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
1162
|
+
cleanValue = cleanValue.split(",")[0];
|
|
1163
|
+
}
|
|
1164
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
1165
|
+
cleanValue = cleanValue.split(":")[0];
|
|
1166
|
+
}
|
|
1167
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
1168
|
+
cleanValue = cleanValue.split("#")[1];
|
|
1169
|
+
}
|
|
1170
|
+
return cleanValue;
|
|
1171
|
+
}, "sanitizeErrorCode");
|
|
1172
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1173
|
+
if (headerKey !== void 0) {
|
|
1174
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1175
|
+
}
|
|
1176
|
+
if (data.code !== void 0) {
|
|
1177
|
+
return sanitizeErrorCode(data.code);
|
|
1178
|
+
}
|
|
1179
|
+
if (data["__type"] !== void 0) {
|
|
1180
|
+
return sanitizeErrorCode(data["__type"]);
|
|
1181
|
+
}
|
|
1182
|
+
}, "loadRestJsonErrorCode");
|
|
1183
|
+
|
|
1184
|
+
// src/commands/BatchGetTokenBalanceCommand.ts
|
|
1185
|
+
var _BatchGetTokenBalanceCommand = class _BatchGetTokenBalanceCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1186
|
+
...commonParams
|
|
1187
|
+
}).m(function(Command, cs, config, o) {
|
|
1188
|
+
return [
|
|
1189
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1190
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1191
|
+
];
|
|
1192
|
+
}).s("TietonChainQueryService", "BatchGetTokenBalance", {}).n("ManagedBlockchainQueryClient", "BatchGetTokenBalanceCommand").f(void 0, void 0).ser(se_BatchGetTokenBalanceCommand).de(de_BatchGetTokenBalanceCommand).build() {
|
|
1193
|
+
};
|
|
1194
|
+
__name(_BatchGetTokenBalanceCommand, "BatchGetTokenBalanceCommand");
|
|
1195
|
+
var BatchGetTokenBalanceCommand = _BatchGetTokenBalanceCommand;
|
|
1196
|
+
|
|
1197
|
+
// src/commands/GetAssetContractCommand.ts
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
var _GetAssetContractCommand = class _GetAssetContractCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1203
|
+
...commonParams
|
|
1204
|
+
}).m(function(Command, cs, config, o) {
|
|
1205
|
+
return [
|
|
1206
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1207
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1208
|
+
];
|
|
1209
|
+
}).s("TietonChainQueryService", "GetAssetContract", {}).n("ManagedBlockchainQueryClient", "GetAssetContractCommand").f(void 0, void 0).ser(se_GetAssetContractCommand).de(de_GetAssetContractCommand).build() {
|
|
1210
|
+
};
|
|
1211
|
+
__name(_GetAssetContractCommand, "GetAssetContractCommand");
|
|
1212
|
+
var GetAssetContractCommand = _GetAssetContractCommand;
|
|
1213
|
+
|
|
1214
|
+
// src/commands/GetTokenBalanceCommand.ts
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
var _GetTokenBalanceCommand = class _GetTokenBalanceCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1220
|
+
...commonParams
|
|
1221
|
+
}).m(function(Command, cs, config, o) {
|
|
1222
|
+
return [
|
|
1223
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1224
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1225
|
+
];
|
|
1226
|
+
}).s("TietonChainQueryService", "GetTokenBalance", {}).n("ManagedBlockchainQueryClient", "GetTokenBalanceCommand").f(void 0, void 0).ser(se_GetTokenBalanceCommand).de(de_GetTokenBalanceCommand).build() {
|
|
1227
|
+
};
|
|
1228
|
+
__name(_GetTokenBalanceCommand, "GetTokenBalanceCommand");
|
|
1229
|
+
var GetTokenBalanceCommand = _GetTokenBalanceCommand;
|
|
1230
|
+
|
|
1231
|
+
// src/commands/GetTransactionCommand.ts
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
var _GetTransactionCommand = class _GetTransactionCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1237
|
+
...commonParams
|
|
1238
|
+
}).m(function(Command, cs, config, o) {
|
|
1239
|
+
return [
|
|
1240
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1241
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1242
|
+
];
|
|
1243
|
+
}).s("TietonChainQueryService", "GetTransaction", {}).n("ManagedBlockchainQueryClient", "GetTransactionCommand").f(void 0, void 0).ser(se_GetTransactionCommand).de(de_GetTransactionCommand).build() {
|
|
1244
|
+
};
|
|
1245
|
+
__name(_GetTransactionCommand, "GetTransactionCommand");
|
|
1246
|
+
var GetTransactionCommand = _GetTransactionCommand;
|
|
1247
|
+
|
|
1248
|
+
// src/commands/ListAssetContractsCommand.ts
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
var _ListAssetContractsCommand = class _ListAssetContractsCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1254
|
+
...commonParams
|
|
1255
|
+
}).m(function(Command, cs, config, o) {
|
|
1256
|
+
return [
|
|
1257
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1258
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1259
|
+
];
|
|
1260
|
+
}).s("TietonChainQueryService", "ListAssetContracts", {}).n("ManagedBlockchainQueryClient", "ListAssetContractsCommand").f(void 0, void 0).ser(se_ListAssetContractsCommand).de(de_ListAssetContractsCommand).build() {
|
|
1261
|
+
};
|
|
1262
|
+
__name(_ListAssetContractsCommand, "ListAssetContractsCommand");
|
|
1263
|
+
var ListAssetContractsCommand = _ListAssetContractsCommand;
|
|
1264
|
+
|
|
1265
|
+
// src/commands/ListTokenBalancesCommand.ts
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
|
|
1270
|
+
var _ListTokenBalancesCommand = class _ListTokenBalancesCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1271
|
+
...commonParams
|
|
1272
|
+
}).m(function(Command, cs, config, o) {
|
|
1273
|
+
return [
|
|
1274
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1275
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1276
|
+
];
|
|
1277
|
+
}).s("TietonChainQueryService", "ListTokenBalances", {}).n("ManagedBlockchainQueryClient", "ListTokenBalancesCommand").f(void 0, void 0).ser(se_ListTokenBalancesCommand).de(de_ListTokenBalancesCommand).build() {
|
|
1278
|
+
};
|
|
1279
|
+
__name(_ListTokenBalancesCommand, "ListTokenBalancesCommand");
|
|
1280
|
+
var ListTokenBalancesCommand = _ListTokenBalancesCommand;
|
|
1281
|
+
|
|
1282
|
+
// src/commands/ListTransactionEventsCommand.ts
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
var _ListTransactionEventsCommand = class _ListTransactionEventsCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1288
|
+
...commonParams
|
|
1289
|
+
}).m(function(Command, cs, config, o) {
|
|
1290
|
+
return [
|
|
1291
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1292
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1293
|
+
];
|
|
1294
|
+
}).s("TietonChainQueryService", "ListTransactionEvents", {}).n("ManagedBlockchainQueryClient", "ListTransactionEventsCommand").f(void 0, void 0).ser(se_ListTransactionEventsCommand).de(de_ListTransactionEventsCommand).build() {
|
|
1295
|
+
};
|
|
1296
|
+
__name(_ListTransactionEventsCommand, "ListTransactionEventsCommand");
|
|
1297
|
+
var ListTransactionEventsCommand = _ListTransactionEventsCommand;
|
|
1298
|
+
|
|
1299
|
+
// src/commands/ListTransactionsCommand.ts
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
var _ListTransactionsCommand = class _ListTransactionsCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1305
|
+
...commonParams
|
|
1306
|
+
}).m(function(Command, cs, config, o) {
|
|
1307
|
+
return [
|
|
1308
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1309
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1310
|
+
];
|
|
1311
|
+
}).s("TietonChainQueryService", "ListTransactions", {}).n("ManagedBlockchainQueryClient", "ListTransactionsCommand").f(void 0, void 0).ser(se_ListTransactionsCommand).de(de_ListTransactionsCommand).build() {
|
|
1312
|
+
};
|
|
1313
|
+
__name(_ListTransactionsCommand, "ListTransactionsCommand");
|
|
1314
|
+
var ListTransactionsCommand = _ListTransactionsCommand;
|
|
1315
|
+
|
|
1316
|
+
// src/ManagedBlockchainQuery.ts
|
|
1317
|
+
var commands = {
|
|
1318
|
+
BatchGetTokenBalanceCommand,
|
|
1319
|
+
GetAssetContractCommand,
|
|
1320
|
+
GetTokenBalanceCommand,
|
|
1321
|
+
GetTransactionCommand,
|
|
1322
|
+
ListAssetContractsCommand,
|
|
1323
|
+
ListTokenBalancesCommand,
|
|
1324
|
+
ListTransactionEventsCommand,
|
|
1325
|
+
ListTransactionsCommand
|
|
1326
|
+
};
|
|
1327
|
+
var _ManagedBlockchainQuery = class _ManagedBlockchainQuery extends ManagedBlockchainQueryClient {
|
|
1328
|
+
};
|
|
1329
|
+
__name(_ManagedBlockchainQuery, "ManagedBlockchainQuery");
|
|
1330
|
+
var ManagedBlockchainQuery = _ManagedBlockchainQuery;
|
|
1331
|
+
(0, import_smithy_client.createAggregatedClient)(commands, ManagedBlockchainQuery);
|
|
1332
|
+
|
|
1333
|
+
// src/pagination/ListAssetContractsPaginator.ts
|
|
1334
|
+
|
|
1335
|
+
var paginateListAssetContracts = (0, import_core.createPaginator)(ManagedBlockchainQueryClient, ListAssetContractsCommand, "nextToken", "nextToken", "maxResults");
|
|
1336
|
+
|
|
1337
|
+
// src/pagination/ListTokenBalancesPaginator.ts
|
|
1338
|
+
|
|
1339
|
+
var paginateListTokenBalances = (0, import_core.createPaginator)(ManagedBlockchainQueryClient, ListTokenBalancesCommand, "nextToken", "nextToken", "maxResults");
|
|
1340
|
+
|
|
1341
|
+
// src/pagination/ListTransactionEventsPaginator.ts
|
|
1342
|
+
|
|
1343
|
+
var paginateListTransactionEvents = (0, import_core.createPaginator)(ManagedBlockchainQueryClient, ListTransactionEventsCommand, "nextToken", "nextToken", "maxResults");
|
|
1344
|
+
|
|
1345
|
+
// src/pagination/ListTransactionsPaginator.ts
|
|
1346
|
+
|
|
1347
|
+
var paginateListTransactions = (0, import_core.createPaginator)(ManagedBlockchainQueryClient, ListTransactionsCommand, "nextToken", "nextToken", "maxResults");
|
|
1348
|
+
|
|
1349
|
+
// src/index.ts
|
|
1350
|
+
var import_util_endpoints = require("@aws-sdk/util-endpoints");
|
|
1351
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1352
|
+
|
|
1353
|
+
0 && (module.exports = {
|
|
1354
|
+
AccessDeniedException,
|
|
1355
|
+
BatchGetTokenBalanceCommand,
|
|
1356
|
+
ConfirmationStatus,
|
|
1357
|
+
ErrorType,
|
|
1358
|
+
ExecutionStatus,
|
|
1359
|
+
GetAssetContractCommand,
|
|
1360
|
+
GetTokenBalanceCommand,
|
|
1361
|
+
GetTransactionCommand,
|
|
1362
|
+
InternalServerException,
|
|
1363
|
+
ListAssetContractsCommand,
|
|
1364
|
+
ListTokenBalancesCommand,
|
|
1365
|
+
ListTransactionEventsCommand,
|
|
1366
|
+
ListTransactionsCommand,
|
|
1367
|
+
ListTransactionsSortBy,
|
|
1368
|
+
ManagedBlockchainQuery,
|
|
1369
|
+
ManagedBlockchainQueryClient,
|
|
1370
|
+
ManagedBlockchainQueryServiceException,
|
|
1371
|
+
QueryNetwork,
|
|
1372
|
+
QueryTokenStandard,
|
|
1373
|
+
QueryTransactionEventType,
|
|
1374
|
+
QueryTransactionStatus,
|
|
1375
|
+
ResourceNotFoundException,
|
|
1376
|
+
ResourceType,
|
|
1377
|
+
ServiceQuotaExceededException,
|
|
1378
|
+
SortOrder,
|
|
1379
|
+
ThrottlingException,
|
|
1380
|
+
ValidationException,
|
|
1381
|
+
ValidationExceptionReason,
|
|
1382
|
+
__Client,
|
|
1383
|
+
paginateListAssetContracts,
|
|
1384
|
+
paginateListTokenBalances,
|
|
1385
|
+
paginateListTransactionEvents,
|
|
1386
|
+
paginateListTransactions
|
|
1387
|
+
});
|
|
1388
|
+
|