@aws-sdk/client-managedblockchain-query 3.427.0 → 3.429.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/README.md +16 -0
- package/dist-cjs/ManagedBlockchainQuery.js +4 -0
- package/dist-cjs/commands/GetAssetContractCommand.js +51 -0
- package/dist-cjs/commands/ListAssetContractsCommand.js +51 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +7 -1
- package/dist-cjs/pagination/ListAssetContractsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +144 -1
- package/dist-es/ManagedBlockchainQuery.js +4 -0
- package/dist-es/commands/GetAssetContractCommand.js +47 -0
- package/dist-es/commands/ListAssetContractsCommand.js +47 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +6 -0
- package/dist-es/pagination/ListAssetContractsPaginator.js +25 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +139 -0
- package/dist-types/ManagedBlockchainQuery.d.ts +14 -0
- package/dist-types/ManagedBlockchainQueryClient.d.ts +4 -2
- package/dist-types/commands/BatchGetTokenBalanceCommand.d.ts +1 -1
- package/dist-types/commands/GetAssetContractCommand.d.ts +119 -0
- package/dist-types/commands/ListAssetContractsCommand.d.ts +110 -0
- package/dist-types/commands/ListTokenBalancesCommand.d.ts +2 -2
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +210 -38
- package/dist-types/pagination/ListAssetContractsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/ts3.4/ManagedBlockchainQuery.d.ts +34 -0
- package/dist-types/ts3.4/ManagedBlockchainQueryClient.d.ts +12 -0
- package/dist-types/ts3.4/commands/GetAssetContractCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListAssetContractsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +66 -21
- package/dist-types/ts3.4/pagination/ListAssetContractsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
- package/package.json +31 -31
|
@@ -22,6 +22,26 @@ export const se_BatchGetTokenBalanceCommand = async (input, context) => {
|
|
|
22
22
|
body,
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
|
+
export const se_GetAssetContractCommand = async (input, context) => {
|
|
26
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
27
|
+
const headers = {
|
|
28
|
+
"content-type": "application/json",
|
|
29
|
+
};
|
|
30
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-asset-contract";
|
|
31
|
+
let body;
|
|
32
|
+
body = JSON.stringify(take(input, {
|
|
33
|
+
contractIdentifier: (_) => _json(_),
|
|
34
|
+
}));
|
|
35
|
+
return new __HttpRequest({
|
|
36
|
+
protocol,
|
|
37
|
+
hostname,
|
|
38
|
+
port,
|
|
39
|
+
method: "POST",
|
|
40
|
+
headers,
|
|
41
|
+
path: resolvedPath,
|
|
42
|
+
body,
|
|
43
|
+
});
|
|
44
|
+
};
|
|
25
45
|
export const se_GetTokenBalanceCommand = async (input, context) => {
|
|
26
46
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
27
47
|
const headers = {
|
|
@@ -65,6 +85,28 @@ export const se_GetTransactionCommand = async (input, context) => {
|
|
|
65
85
|
body,
|
|
66
86
|
});
|
|
67
87
|
};
|
|
88
|
+
export const se_ListAssetContractsCommand = async (input, context) => {
|
|
89
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
90
|
+
const headers = {
|
|
91
|
+
"content-type": "application/json",
|
|
92
|
+
};
|
|
93
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-asset-contracts";
|
|
94
|
+
let body;
|
|
95
|
+
body = JSON.stringify(take(input, {
|
|
96
|
+
contractFilter: (_) => _json(_),
|
|
97
|
+
maxResults: [],
|
|
98
|
+
nextToken: [],
|
|
99
|
+
}));
|
|
100
|
+
return new __HttpRequest({
|
|
101
|
+
protocol,
|
|
102
|
+
hostname,
|
|
103
|
+
port,
|
|
104
|
+
method: "POST",
|
|
105
|
+
headers,
|
|
106
|
+
path: resolvedPath,
|
|
107
|
+
body,
|
|
108
|
+
});
|
|
109
|
+
};
|
|
68
110
|
export const se_ListTokenBalancesCommand = async (input, context) => {
|
|
69
111
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
70
112
|
const headers = {
|
|
@@ -186,6 +228,57 @@ const de_BatchGetTokenBalanceCommandError = async (output, context) => {
|
|
|
186
228
|
});
|
|
187
229
|
}
|
|
188
230
|
};
|
|
231
|
+
export const de_GetAssetContractCommand = async (output, context) => {
|
|
232
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
233
|
+
return de_GetAssetContractCommandError(output, context);
|
|
234
|
+
}
|
|
235
|
+
const contents = map({
|
|
236
|
+
$metadata: deserializeMetadata(output),
|
|
237
|
+
});
|
|
238
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
239
|
+
const doc = take(data, {
|
|
240
|
+
contractIdentifier: _json,
|
|
241
|
+
deployerAddress: __expectString,
|
|
242
|
+
metadata: _json,
|
|
243
|
+
tokenStandard: __expectString,
|
|
244
|
+
});
|
|
245
|
+
Object.assign(contents, doc);
|
|
246
|
+
return contents;
|
|
247
|
+
};
|
|
248
|
+
const de_GetAssetContractCommandError = async (output, context) => {
|
|
249
|
+
const parsedOutput = {
|
|
250
|
+
...output,
|
|
251
|
+
body: await parseErrorBody(output.body, context),
|
|
252
|
+
};
|
|
253
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
254
|
+
switch (errorCode) {
|
|
255
|
+
case "AccessDeniedException":
|
|
256
|
+
case "com.amazonaws.managedblockchainquery#AccessDeniedException":
|
|
257
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
258
|
+
case "InternalServerException":
|
|
259
|
+
case "com.amazonaws.managedblockchainquery#InternalServerException":
|
|
260
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
261
|
+
case "ResourceNotFoundException":
|
|
262
|
+
case "com.amazonaws.managedblockchainquery#ResourceNotFoundException":
|
|
263
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
264
|
+
case "ServiceQuotaExceededException":
|
|
265
|
+
case "com.amazonaws.managedblockchainquery#ServiceQuotaExceededException":
|
|
266
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
267
|
+
case "ThrottlingException":
|
|
268
|
+
case "com.amazonaws.managedblockchainquery#ThrottlingException":
|
|
269
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
270
|
+
case "ValidationException":
|
|
271
|
+
case "com.amazonaws.managedblockchainquery#ValidationException":
|
|
272
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
273
|
+
default:
|
|
274
|
+
const parsedBody = parsedOutput.body;
|
|
275
|
+
return throwDefaultError({
|
|
276
|
+
output,
|
|
277
|
+
parsedBody,
|
|
278
|
+
errorCode,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
};
|
|
189
282
|
export const de_GetTokenBalanceCommand = async (output, context) => {
|
|
190
283
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
191
284
|
return de_GetTokenBalanceCommandError(output, context);
|
|
@@ -286,6 +379,52 @@ const de_GetTransactionCommandError = async (output, context) => {
|
|
|
286
379
|
});
|
|
287
380
|
}
|
|
288
381
|
};
|
|
382
|
+
export const de_ListAssetContractsCommand = async (output, context) => {
|
|
383
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
384
|
+
return de_ListAssetContractsCommandError(output, context);
|
|
385
|
+
}
|
|
386
|
+
const contents = map({
|
|
387
|
+
$metadata: deserializeMetadata(output),
|
|
388
|
+
});
|
|
389
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
390
|
+
const doc = take(data, {
|
|
391
|
+
contracts: _json,
|
|
392
|
+
nextToken: __expectString,
|
|
393
|
+
});
|
|
394
|
+
Object.assign(contents, doc);
|
|
395
|
+
return contents;
|
|
396
|
+
};
|
|
397
|
+
const de_ListAssetContractsCommandError = async (output, context) => {
|
|
398
|
+
const parsedOutput = {
|
|
399
|
+
...output,
|
|
400
|
+
body: await parseErrorBody(output.body, context),
|
|
401
|
+
};
|
|
402
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
403
|
+
switch (errorCode) {
|
|
404
|
+
case "AccessDeniedException":
|
|
405
|
+
case "com.amazonaws.managedblockchainquery#AccessDeniedException":
|
|
406
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
407
|
+
case "InternalServerException":
|
|
408
|
+
case "com.amazonaws.managedblockchainquery#InternalServerException":
|
|
409
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
410
|
+
case "ServiceQuotaExceededException":
|
|
411
|
+
case "com.amazonaws.managedblockchainquery#ServiceQuotaExceededException":
|
|
412
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
413
|
+
case "ThrottlingException":
|
|
414
|
+
case "com.amazonaws.managedblockchainquery#ThrottlingException":
|
|
415
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
416
|
+
case "ValidationException":
|
|
417
|
+
case "com.amazonaws.managedblockchainquery#ValidationException":
|
|
418
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
419
|
+
default:
|
|
420
|
+
const parsedBody = parsedOutput.body;
|
|
421
|
+
return throwDefaultError({
|
|
422
|
+
output,
|
|
423
|
+
parsedBody,
|
|
424
|
+
errorCode,
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
};
|
|
289
428
|
export const de_ListTokenBalancesCommand = async (output, context) => {
|
|
290
429
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
291
430
|
return de_ListTokenBalancesCommandError(output, context);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
2
|
import { BatchGetTokenBalanceCommandInput, BatchGetTokenBalanceCommandOutput } from "./commands/BatchGetTokenBalanceCommand";
|
|
3
|
+
import { GetAssetContractCommandInput, GetAssetContractCommandOutput } from "./commands/GetAssetContractCommand";
|
|
3
4
|
import { GetTokenBalanceCommandInput, GetTokenBalanceCommandOutput } from "./commands/GetTokenBalanceCommand";
|
|
4
5
|
import { GetTransactionCommandInput, GetTransactionCommandOutput } from "./commands/GetTransactionCommand";
|
|
6
|
+
import { ListAssetContractsCommandInput, ListAssetContractsCommandOutput } from "./commands/ListAssetContractsCommand";
|
|
5
7
|
import { ListTokenBalancesCommandInput, ListTokenBalancesCommandOutput } from "./commands/ListTokenBalancesCommand";
|
|
6
8
|
import { ListTransactionEventsCommandInput, ListTransactionEventsCommandOutput } from "./commands/ListTransactionEventsCommand";
|
|
7
9
|
import { ListTransactionsCommandInput, ListTransactionsCommandOutput } from "./commands/ListTransactionsCommand";
|
|
@@ -13,6 +15,12 @@ export interface ManagedBlockchainQuery {
|
|
|
13
15
|
batchGetTokenBalance(args: BatchGetTokenBalanceCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetTokenBalanceCommandOutput>;
|
|
14
16
|
batchGetTokenBalance(args: BatchGetTokenBalanceCommandInput, cb: (err: any, data?: BatchGetTokenBalanceCommandOutput) => void): void;
|
|
15
17
|
batchGetTokenBalance(args: BatchGetTokenBalanceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetTokenBalanceCommandOutput) => void): void;
|
|
18
|
+
/**
|
|
19
|
+
* @see {@link GetAssetContractCommand}
|
|
20
|
+
*/
|
|
21
|
+
getAssetContract(args: GetAssetContractCommandInput, options?: __HttpHandlerOptions): Promise<GetAssetContractCommandOutput>;
|
|
22
|
+
getAssetContract(args: GetAssetContractCommandInput, cb: (err: any, data?: GetAssetContractCommandOutput) => void): void;
|
|
23
|
+
getAssetContract(args: GetAssetContractCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAssetContractCommandOutput) => void): void;
|
|
16
24
|
/**
|
|
17
25
|
* @see {@link GetTokenBalanceCommand}
|
|
18
26
|
*/
|
|
@@ -25,6 +33,12 @@ export interface ManagedBlockchainQuery {
|
|
|
25
33
|
getTransaction(args: GetTransactionCommandInput, options?: __HttpHandlerOptions): Promise<GetTransactionCommandOutput>;
|
|
26
34
|
getTransaction(args: GetTransactionCommandInput, cb: (err: any, data?: GetTransactionCommandOutput) => void): void;
|
|
27
35
|
getTransaction(args: GetTransactionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetTransactionCommandOutput) => void): void;
|
|
36
|
+
/**
|
|
37
|
+
* @see {@link ListAssetContractsCommand}
|
|
38
|
+
*/
|
|
39
|
+
listAssetContracts(args: ListAssetContractsCommandInput, options?: __HttpHandlerOptions): Promise<ListAssetContractsCommandOutput>;
|
|
40
|
+
listAssetContracts(args: ListAssetContractsCommandInput, cb: (err: any, data?: ListAssetContractsCommandOutput) => void): void;
|
|
41
|
+
listAssetContracts(args: ListAssetContractsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAssetContractsCommandOutput) => void): void;
|
|
28
42
|
/**
|
|
29
43
|
* @see {@link ListTokenBalancesCommand}
|
|
30
44
|
*/
|
|
@@ -9,8 +9,10 @@ import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
|
|
|
9
9
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
10
10
|
import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
11
11
|
import { BatchGetTokenBalanceCommandInput, BatchGetTokenBalanceCommandOutput } from "./commands/BatchGetTokenBalanceCommand";
|
|
12
|
+
import { GetAssetContractCommandInput, GetAssetContractCommandOutput } from "./commands/GetAssetContractCommand";
|
|
12
13
|
import { GetTokenBalanceCommandInput, GetTokenBalanceCommandOutput } from "./commands/GetTokenBalanceCommand";
|
|
13
14
|
import { GetTransactionCommandInput, GetTransactionCommandOutput } from "./commands/GetTransactionCommand";
|
|
15
|
+
import { ListAssetContractsCommandInput, ListAssetContractsCommandOutput } from "./commands/ListAssetContractsCommand";
|
|
14
16
|
import { ListTokenBalancesCommandInput, ListTokenBalancesCommandOutput } from "./commands/ListTokenBalancesCommand";
|
|
15
17
|
import { ListTransactionEventsCommandInput, ListTransactionEventsCommandOutput } from "./commands/ListTransactionEventsCommand";
|
|
16
18
|
import { ListTransactionsCommandInput, ListTransactionsCommandOutput } from "./commands/ListTransactionsCommand";
|
|
@@ -20,11 +22,11 @@ export { __Client };
|
|
|
20
22
|
/**
|
|
21
23
|
* @public
|
|
22
24
|
*/
|
|
23
|
-
export type ServiceInputTypes = BatchGetTokenBalanceCommandInput | GetTokenBalanceCommandInput | GetTransactionCommandInput | ListTokenBalancesCommandInput | ListTransactionEventsCommandInput | ListTransactionsCommandInput;
|
|
25
|
+
export type ServiceInputTypes = BatchGetTokenBalanceCommandInput | GetAssetContractCommandInput | GetTokenBalanceCommandInput | GetTransactionCommandInput | ListAssetContractsCommandInput | ListTokenBalancesCommandInput | ListTransactionEventsCommandInput | ListTransactionsCommandInput;
|
|
24
26
|
/**
|
|
25
27
|
* @public
|
|
26
28
|
*/
|
|
27
|
-
export type ServiceOutputTypes = BatchGetTokenBalanceCommandOutput | GetTokenBalanceCommandOutput | GetTransactionCommandOutput | ListTokenBalancesCommandOutput | ListTransactionEventsCommandOutput | ListTransactionsCommandOutput;
|
|
29
|
+
export type ServiceOutputTypes = BatchGetTokenBalanceCommandOutput | GetAssetContractCommandOutput | GetTokenBalanceCommandOutput | GetTransactionCommandOutput | ListAssetContractsCommandOutput | ListTokenBalancesCommandOutput | ListTransactionEventsCommandOutput | ListTransactionsCommandOutput;
|
|
28
30
|
/**
|
|
29
31
|
* @public
|
|
30
32
|
*/
|
|
@@ -23,7 +23,7 @@ export interface BatchGetTokenBalanceCommandOutput extends BatchGetTokenBalanceO
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
|
-
* <p>Gets the token balance for a batch of tokens by using the <code>
|
|
26
|
+
* <p>Gets the token balance for a batch of tokens by using the <code>BatchGetTokenBalance</code>
|
|
27
27
|
* action for every token in the request.</p>
|
|
28
28
|
* <note>
|
|
29
29
|
* <p>Only the native tokens BTC,ETH, and the ERC-20,
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
|
+
import { ManagedBlockchainQueryClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ManagedBlockchainQueryClient";
|
|
5
|
+
import { GetAssetContractInput, GetAssetContractOutput } from "../models/models_0";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { __MetadataBearer, $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link GetAssetContractCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetAssetContractCommandInput extends GetAssetContractInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetAssetContractCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetAssetContractCommandOutput extends GetAssetContractOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* <p>Gets the information about a specific contract deployed on the blockchain.</p>
|
|
27
|
+
* <note>
|
|
28
|
+
* <ul>
|
|
29
|
+
* <li>
|
|
30
|
+
* <p>The Bitcoin blockchain networks do not support this
|
|
31
|
+
* operation.</p>
|
|
32
|
+
* </li>
|
|
33
|
+
* <li>
|
|
34
|
+
* <p>Metadata is currently only available for some <code>ERC-20</code> contracts.
|
|
35
|
+
* Metadata will be available for additional contracts in the future.</p>
|
|
36
|
+
* </li>
|
|
37
|
+
* </ul>
|
|
38
|
+
* </note>
|
|
39
|
+
* @example
|
|
40
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
41
|
+
* ```javascript
|
|
42
|
+
* import { ManagedBlockchainQueryClient, GetAssetContractCommand } from "@aws-sdk/client-managedblockchain-query"; // ES Modules import
|
|
43
|
+
* // const { ManagedBlockchainQueryClient, GetAssetContractCommand } = require("@aws-sdk/client-managedblockchain-query"); // CommonJS import
|
|
44
|
+
* const client = new ManagedBlockchainQueryClient(config);
|
|
45
|
+
* const input = { // GetAssetContractInput
|
|
46
|
+
* contractIdentifier: { // ContractIdentifier
|
|
47
|
+
* network: "STRING_VALUE", // required
|
|
48
|
+
* contractAddress: "STRING_VALUE", // required
|
|
49
|
+
* },
|
|
50
|
+
* };
|
|
51
|
+
* const command = new GetAssetContractCommand(input);
|
|
52
|
+
* const response = await client.send(command);
|
|
53
|
+
* // { // GetAssetContractOutput
|
|
54
|
+
* // contractIdentifier: { // ContractIdentifier
|
|
55
|
+
* // network: "STRING_VALUE", // required
|
|
56
|
+
* // contractAddress: "STRING_VALUE", // required
|
|
57
|
+
* // },
|
|
58
|
+
* // tokenStandard: "STRING_VALUE", // required
|
|
59
|
+
* // deployerAddress: "STRING_VALUE", // required
|
|
60
|
+
* // metadata: { // ContractMetadata
|
|
61
|
+
* // name: "STRING_VALUE",
|
|
62
|
+
* // symbol: "STRING_VALUE",
|
|
63
|
+
* // decimals: Number("int"),
|
|
64
|
+
* // },
|
|
65
|
+
* // };
|
|
66
|
+
*
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @param GetAssetContractCommandInput - {@link GetAssetContractCommandInput}
|
|
70
|
+
* @returns {@link GetAssetContractCommandOutput}
|
|
71
|
+
* @see {@link GetAssetContractCommandInput} for command's `input` shape.
|
|
72
|
+
* @see {@link GetAssetContractCommandOutput} for command's `response` shape.
|
|
73
|
+
* @see {@link ManagedBlockchainQueryClientResolvedConfig | config} for ManagedBlockchainQueryClient's `config` shape.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
76
|
+
* <p>The Amazon Web Services account doesn’t have access to this resource. </p>
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link InternalServerException} (server fault)
|
|
79
|
+
* <p>The request processing has failed because of an internal error in the service.</p>
|
|
80
|
+
*
|
|
81
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
82
|
+
* <p>The resource was not found.</p>
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
85
|
+
* <p>The service quota has been exceeded for this resource.</p>
|
|
86
|
+
*
|
|
87
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
88
|
+
* <p>The request or operation couldn't be performed because a service is throttling
|
|
89
|
+
* requests. The most common source of throttling errors is when you create resources
|
|
90
|
+
* that exceed your service limit for this resource type. Request a limit increase or
|
|
91
|
+
* delete unused resources, if possible.</p>
|
|
92
|
+
*
|
|
93
|
+
* @throws {@link ValidationException} (client fault)
|
|
94
|
+
* <p>The resource passed is invalid.</p>
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link ManagedBlockchainQueryServiceException}
|
|
97
|
+
* <p>Base exception class for all service exceptions from ManagedBlockchainQuery service.</p>
|
|
98
|
+
*
|
|
99
|
+
*/
|
|
100
|
+
export declare class GetAssetContractCommand extends $Command<GetAssetContractCommandInput, GetAssetContractCommandOutput, ManagedBlockchainQueryClientResolvedConfig> {
|
|
101
|
+
readonly input: GetAssetContractCommandInput;
|
|
102
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
103
|
+
/**
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
constructor(input: GetAssetContractCommandInput);
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ManagedBlockchainQueryClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetAssetContractCommandInput, GetAssetContractCommandOutput>;
|
|
111
|
+
/**
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
private serialize;
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
private deserialize;
|
|
119
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
|
+
import { ManagedBlockchainQueryClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ManagedBlockchainQueryClient";
|
|
5
|
+
import { ListAssetContractsInput, ListAssetContractsOutput } from "../models/models_0";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { __MetadataBearer, $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link ListAssetContractsCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface ListAssetContractsCommandInput extends ListAssetContractsInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link ListAssetContractsCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface ListAssetContractsCommandOutput extends ListAssetContractsOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* <p>Lists all the contracts for a given contract type deployed by an address
|
|
27
|
+
* (either a contract address or a wallet address).</p>
|
|
28
|
+
* <p>The Bitcoin blockchain networks do not support this
|
|
29
|
+
* operation.</p>
|
|
30
|
+
* @example
|
|
31
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
32
|
+
* ```javascript
|
|
33
|
+
* import { ManagedBlockchainQueryClient, ListAssetContractsCommand } from "@aws-sdk/client-managedblockchain-query"; // ES Modules import
|
|
34
|
+
* // const { ManagedBlockchainQueryClient, ListAssetContractsCommand } = require("@aws-sdk/client-managedblockchain-query"); // CommonJS import
|
|
35
|
+
* const client = new ManagedBlockchainQueryClient(config);
|
|
36
|
+
* const input = { // ListAssetContractsInput
|
|
37
|
+
* contractFilter: { // ContractFilter
|
|
38
|
+
* network: "STRING_VALUE", // required
|
|
39
|
+
* tokenStandard: "STRING_VALUE", // required
|
|
40
|
+
* deployerAddress: "STRING_VALUE", // required
|
|
41
|
+
* },
|
|
42
|
+
* nextToken: "STRING_VALUE",
|
|
43
|
+
* maxResults: Number("int"),
|
|
44
|
+
* };
|
|
45
|
+
* const command = new ListAssetContractsCommand(input);
|
|
46
|
+
* const response = await client.send(command);
|
|
47
|
+
* // { // ListAssetContractsOutput
|
|
48
|
+
* // contracts: [ // AssetContractList // required
|
|
49
|
+
* // { // AssetContract
|
|
50
|
+
* // contractIdentifier: { // ContractIdentifier
|
|
51
|
+
* // network: "STRING_VALUE", // required
|
|
52
|
+
* // contractAddress: "STRING_VALUE", // required
|
|
53
|
+
* // },
|
|
54
|
+
* // tokenStandard: "STRING_VALUE", // required
|
|
55
|
+
* // deployerAddress: "STRING_VALUE", // required
|
|
56
|
+
* // },
|
|
57
|
+
* // ],
|
|
58
|
+
* // nextToken: "STRING_VALUE",
|
|
59
|
+
* // };
|
|
60
|
+
*
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param ListAssetContractsCommandInput - {@link ListAssetContractsCommandInput}
|
|
64
|
+
* @returns {@link ListAssetContractsCommandOutput}
|
|
65
|
+
* @see {@link ListAssetContractsCommandInput} for command's `input` shape.
|
|
66
|
+
* @see {@link ListAssetContractsCommandOutput} for command's `response` shape.
|
|
67
|
+
* @see {@link ManagedBlockchainQueryClientResolvedConfig | config} for ManagedBlockchainQueryClient's `config` shape.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
70
|
+
* <p>The Amazon Web Services account doesn’t have access to this resource. </p>
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link InternalServerException} (server fault)
|
|
73
|
+
* <p>The request processing has failed because of an internal error in the service.</p>
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
76
|
+
* <p>The service quota has been exceeded for this resource.</p>
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
79
|
+
* <p>The request or operation couldn't be performed because a service is throttling
|
|
80
|
+
* requests. The most common source of throttling errors is when you create resources
|
|
81
|
+
* that exceed your service limit for this resource type. Request a limit increase or
|
|
82
|
+
* delete unused resources, if possible.</p>
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link ValidationException} (client fault)
|
|
85
|
+
* <p>The resource passed is invalid.</p>
|
|
86
|
+
*
|
|
87
|
+
* @throws {@link ManagedBlockchainQueryServiceException}
|
|
88
|
+
* <p>Base exception class for all service exceptions from ManagedBlockchainQuery service.</p>
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
91
|
+
export declare class ListAssetContractsCommand extends $Command<ListAssetContractsCommandInput, ListAssetContractsCommandOutput, ManagedBlockchainQueryClientResolvedConfig> {
|
|
92
|
+
readonly input: ListAssetContractsCommandInput;
|
|
93
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
94
|
+
/**
|
|
95
|
+
* @public
|
|
96
|
+
*/
|
|
97
|
+
constructor(input: ListAssetContractsCommandInput);
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ManagedBlockchainQueryClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListAssetContractsCommandInput, ListAssetContractsCommandOutput>;
|
|
102
|
+
/**
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
private serialize;
|
|
106
|
+
/**
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
private deserialize;
|
|
110
|
+
}
|
|
@@ -23,10 +23,10 @@ export interface ListTokenBalancesCommandOutput extends ListTokenBalancesOutput,
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
|
-
* <p>This action returns the following for a given
|
|
26
|
+
* <p>This action returns the following for a given blockchain network:</p>
|
|
27
27
|
* <ul>
|
|
28
28
|
* <li>
|
|
29
|
-
* <p>Lists all token balances owned by an address (either a
|
|
29
|
+
* <p>Lists all token balances owned by an address (either a contract
|
|
30
30
|
* address or a wallet address).</p>
|
|
31
31
|
* </li>
|
|
32
32
|
* <li>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from "./BatchGetTokenBalanceCommand";
|
|
2
|
+
export * from "./GetAssetContractCommand";
|
|
2
3
|
export * from "./GetTokenBalanceCommand";
|
|
3
4
|
export * from "./GetTransactionCommand";
|
|
5
|
+
export * from "./ListAssetContractsCommand";
|
|
4
6
|
export * from "./ListTokenBalancesCommand";
|
|
5
7
|
export * from "./ListTransactionEventsCommand";
|
|
6
8
|
export * from "./ListTransactionsCommand";
|