@aws-sdk/client-managedblockchain-query 3.378.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.
Files changed (107) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +262 -0
  3. package/dist-cjs/ManagedBlockchainQuery.js +23 -0
  4. package/dist-cjs/ManagedBlockchainQueryClient.js +41 -0
  5. package/dist-cjs/commands/BatchGetTokenBalanceCommand.js +46 -0
  6. package/dist-cjs/commands/GetTokenBalanceCommand.js +46 -0
  7. package/dist-cjs/commands/GetTransactionCommand.js +46 -0
  8. package/dist-cjs/commands/ListTokenBalancesCommand.js +46 -0
  9. package/dist-cjs/commands/ListTransactionEventsCommand.js +46 -0
  10. package/dist-cjs/commands/ListTransactionsCommand.js +46 -0
  11. package/dist-cjs/commands/index.js +9 -0
  12. package/dist-cjs/endpoint/EndpointParameters.js +12 -0
  13. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  14. package/dist-cjs/endpoint/ruleset.js +7 -0
  15. package/dist-cjs/index.js +11 -0
  16. package/dist-cjs/models/ManagedBlockchainQueryServiceException.js +12 -0
  17. package/dist-cjs/models/index.js +4 -0
  18. package/dist-cjs/models/models_0.js +139 -0
  19. package/dist-cjs/pagination/Interfaces.js +2 -0
  20. package/dist-cjs/pagination/ListTokenBalancesPaginator.js +29 -0
  21. package/dist-cjs/pagination/ListTransactionEventsPaginator.js +29 -0
  22. package/dist-cjs/pagination/ListTransactionsPaginator.js +29 -0
  23. package/dist-cjs/pagination/index.js +7 -0
  24. package/dist-cjs/protocols/Aws_restJson1.js +706 -0
  25. package/dist-cjs/runtimeConfig.browser.js +39 -0
  26. package/dist-cjs/runtimeConfig.js +48 -0
  27. package/dist-cjs/runtimeConfig.native.js +15 -0
  28. package/dist-cjs/runtimeConfig.shared.js +21 -0
  29. package/dist-es/ManagedBlockchainQuery.js +19 -0
  30. package/dist-es/ManagedBlockchainQueryClient.js +37 -0
  31. package/dist-es/commands/BatchGetTokenBalanceCommand.js +42 -0
  32. package/dist-es/commands/GetTokenBalanceCommand.js +42 -0
  33. package/dist-es/commands/GetTransactionCommand.js +42 -0
  34. package/dist-es/commands/ListTokenBalancesCommand.js +42 -0
  35. package/dist-es/commands/ListTransactionEventsCommand.js +42 -0
  36. package/dist-es/commands/ListTransactionsCommand.js +42 -0
  37. package/dist-es/commands/index.js +6 -0
  38. package/dist-es/endpoint/EndpointParameters.js +8 -0
  39. package/dist-es/endpoint/endpointResolver.js +8 -0
  40. package/dist-es/endpoint/ruleset.js +4 -0
  41. package/dist-es/index.js +6 -0
  42. package/dist-es/models/ManagedBlockchainQueryServiceException.js +8 -0
  43. package/dist-es/models/index.js +1 -0
  44. package/dist-es/models/models_0.js +130 -0
  45. package/dist-es/pagination/Interfaces.js +1 -0
  46. package/dist-es/pagination/ListTokenBalancesPaginator.js +25 -0
  47. package/dist-es/pagination/ListTransactionEventsPaginator.js +25 -0
  48. package/dist-es/pagination/ListTransactionsPaginator.js +25 -0
  49. package/dist-es/pagination/index.js +4 -0
  50. package/dist-es/protocols/Aws_restJson1.js +691 -0
  51. package/dist-es/runtimeConfig.browser.js +34 -0
  52. package/dist-es/runtimeConfig.js +43 -0
  53. package/dist-es/runtimeConfig.native.js +11 -0
  54. package/dist-es/runtimeConfig.shared.js +17 -0
  55. package/dist-types/ManagedBlockchainQuery.d.ts +58 -0
  56. package/dist-types/ManagedBlockchainQueryClient.d.ts +174 -0
  57. package/dist-types/commands/BatchGetTokenBalanceCommand.d.ts +149 -0
  58. package/dist-types/commands/GetTokenBalanceCommand.d.ts +122 -0
  59. package/dist-types/commands/GetTransactionCommand.d.ts +115 -0
  60. package/dist-types/commands/ListTokenBalancesCommand.d.ts +135 -0
  61. package/dist-types/commands/ListTransactionEventsCommand.d.ts +109 -0
  62. package/dist-types/commands/ListTransactionsCommand.d.ts +111 -0
  63. package/dist-types/commands/index.d.ts +6 -0
  64. package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
  65. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  66. package/dist-types/endpoint/ruleset.d.ts +2 -0
  67. package/dist-types/index.d.ts +17 -0
  68. package/dist-types/models/ManagedBlockchainQueryServiceException.d.ts +13 -0
  69. package/dist-types/models/index.d.ts +1 -0
  70. package/dist-types/models/models_0.d.ts +917 -0
  71. package/dist-types/pagination/Interfaces.d.ts +8 -0
  72. package/dist-types/pagination/ListTokenBalancesPaginator.d.ts +7 -0
  73. package/dist-types/pagination/ListTransactionEventsPaginator.d.ts +7 -0
  74. package/dist-types/pagination/ListTransactionsPaginator.d.ts +7 -0
  75. package/dist-types/pagination/index.d.ts +4 -0
  76. package/dist-types/protocols/Aws_restJson1.d.ts +56 -0
  77. package/dist-types/runtimeConfig.browser.d.ts +42 -0
  78. package/dist-types/runtimeConfig.d.ts +42 -0
  79. package/dist-types/runtimeConfig.native.d.ts +41 -0
  80. package/dist-types/runtimeConfig.shared.d.ts +18 -0
  81. package/dist-types/ts3.4/ManagedBlockchainQuery.d.ts +109 -0
  82. package/dist-types/ts3.4/ManagedBlockchainQueryClient.d.ts +149 -0
  83. package/dist-types/ts3.4/commands/BatchGetTokenBalanceCommand.d.ts +42 -0
  84. package/dist-types/ts3.4/commands/GetTokenBalanceCommand.d.ts +38 -0
  85. package/dist-types/ts3.4/commands/GetTransactionCommand.d.ts +35 -0
  86. package/dist-types/ts3.4/commands/ListTokenBalancesCommand.d.ts +38 -0
  87. package/dist-types/ts3.4/commands/ListTransactionEventsCommand.d.ts +42 -0
  88. package/dist-types/ts3.4/commands/ListTransactionsCommand.d.ts +38 -0
  89. package/dist-types/ts3.4/commands/index.d.ts +6 -0
  90. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
  91. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  92. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  93. package/dist-types/ts3.4/index.d.ts +6 -0
  94. package/dist-types/ts3.4/models/ManagedBlockchainQueryServiceException.d.ts +8 -0
  95. package/dist-types/ts3.4/models/index.d.ts +1 -0
  96. package/dist-types/ts3.4/models/models_0.d.ts +264 -0
  97. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  98. package/dist-types/ts3.4/pagination/ListTokenBalancesPaginator.d.ts +11 -0
  99. package/dist-types/ts3.4/pagination/ListTransactionEventsPaginator.d.ts +11 -0
  100. package/dist-types/ts3.4/pagination/ListTransactionsPaginator.d.ts +11 -0
  101. package/dist-types/ts3.4/pagination/index.d.ts +4 -0
  102. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +77 -0
  103. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +91 -0
  104. package/dist-types/ts3.4/runtimeConfig.d.ts +91 -0
  105. package/dist-types/ts3.4/runtimeConfig.native.d.ts +82 -0
  106. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +20 -0
  107. package/package.json +99 -0
@@ -0,0 +1,34 @@
1
+ import packageInfo from "../package.json";
2
+ import { Sha256 } from "@aws-crypto/sha256-browser";
3
+ import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
4
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
6
+ import { invalidProvider } from "@smithy/invalid-dependency";
7
+ import { calculateBodyLength } from "@smithy/util-body-length-browser";
8
+ import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
9
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
10
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
11
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
12
+ export const getRuntimeConfig = (config) => {
13
+ const defaultsMode = resolveDefaultsModeConfig(config);
14
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
+ const clientSharedValues = getSharedRuntimeConfig(config);
16
+ return {
17
+ ...clientSharedValues,
18
+ ...config,
19
+ runtime: "browser",
20
+ defaultsMode,
21
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
22
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
23
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
24
+ defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
25
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
26
+ region: config?.region ?? invalidProvider("Region is missing"),
27
+ requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
28
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
29
+ sha256: config?.sha256 ?? Sha256,
30
+ streamCollector: config?.streamCollector ?? streamCollector,
31
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
32
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
33
+ };
34
+ };
@@ -0,0 +1,43 @@
1
+ import packageInfo from "../package.json";
2
+ import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
3
+ import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
4
+ import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
5
+ import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
6
+ import { Hash } from "@smithy/hash-node";
7
+ import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
8
+ import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
10
+ import { calculateBodyLength } from "@smithy/util-body-length-node";
11
+ import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
12
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
15
+ import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
16
+ export const getRuntimeConfig = (config) => {
17
+ emitWarningIfUnsupportedVersion(process.version);
18
+ const defaultsMode = resolveDefaultsModeConfig(config);
19
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
20
+ const clientSharedValues = getSharedRuntimeConfig(config);
21
+ return {
22
+ ...clientSharedValues,
23
+ ...config,
24
+ runtime: "node",
25
+ defaultsMode,
26
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
27
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
28
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
29
+ defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
30
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
31
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
32
+ requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
33
+ retryMode: config?.retryMode ??
34
+ loadNodeConfig({
35
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
37
+ }),
38
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
39
+ streamCollector: config?.streamCollector ?? streamCollector,
40
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
41
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
42
+ };
43
+ };
@@ -0,0 +1,11 @@
1
+ import { Sha256 } from "@aws-crypto/sha256-js";
2
+ import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
3
+ export const getRuntimeConfig = (config) => {
4
+ const browserDefaults = getBrowserRuntimeConfig(config);
5
+ return {
6
+ ...browserDefaults,
7
+ ...config,
8
+ runtime: "react-native",
9
+ sha256: config?.sha256 ?? Sha256,
10
+ };
11
+ };
@@ -0,0 +1,17 @@
1
+ import { NoOpLogger } from "@smithy/smithy-client";
2
+ import { parseUrl } from "@smithy/url-parser";
3
+ import { fromBase64, toBase64 } from "@smithy/util-base64";
4
+ import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
5
+ import { defaultEndpointResolver } from "./endpoint/endpointResolver";
6
+ export const getRuntimeConfig = (config) => ({
7
+ apiVersion: "2023-05-04",
8
+ base64Decoder: config?.base64Decoder ?? fromBase64,
9
+ base64Encoder: config?.base64Encoder ?? toBase64,
10
+ disableHostPrefix: config?.disableHostPrefix ?? false,
11
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
12
+ logger: config?.logger ?? new NoOpLogger(),
13
+ serviceId: config?.serviceId ?? "ManagedBlockchain Query",
14
+ urlParser: config?.urlParser ?? parseUrl,
15
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
16
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
17
+ });
@@ -0,0 +1,58 @@
1
+ import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
+ import { BatchGetTokenBalanceCommandInput, BatchGetTokenBalanceCommandOutput } from "./commands/BatchGetTokenBalanceCommand";
3
+ import { GetTokenBalanceCommandInput, GetTokenBalanceCommandOutput } from "./commands/GetTokenBalanceCommand";
4
+ import { GetTransactionCommandInput, GetTransactionCommandOutput } from "./commands/GetTransactionCommand";
5
+ import { ListTokenBalancesCommandInput, ListTokenBalancesCommandOutput } from "./commands/ListTokenBalancesCommand";
6
+ import { ListTransactionEventsCommandInput, ListTransactionEventsCommandOutput } from "./commands/ListTransactionEventsCommand";
7
+ import { ListTransactionsCommandInput, ListTransactionsCommandOutput } from "./commands/ListTransactionsCommand";
8
+ import { ManagedBlockchainQueryClient } from "./ManagedBlockchainQueryClient";
9
+ export interface ManagedBlockchainQuery {
10
+ /**
11
+ * @see {@link BatchGetTokenBalanceCommand}
12
+ */
13
+ batchGetTokenBalance(args: BatchGetTokenBalanceCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetTokenBalanceCommandOutput>;
14
+ batchGetTokenBalance(args: BatchGetTokenBalanceCommandInput, cb: (err: any, data?: BatchGetTokenBalanceCommandOutput) => void): void;
15
+ batchGetTokenBalance(args: BatchGetTokenBalanceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetTokenBalanceCommandOutput) => void): void;
16
+ /**
17
+ * @see {@link GetTokenBalanceCommand}
18
+ */
19
+ getTokenBalance(args: GetTokenBalanceCommandInput, options?: __HttpHandlerOptions): Promise<GetTokenBalanceCommandOutput>;
20
+ getTokenBalance(args: GetTokenBalanceCommandInput, cb: (err: any, data?: GetTokenBalanceCommandOutput) => void): void;
21
+ getTokenBalance(args: GetTokenBalanceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetTokenBalanceCommandOutput) => void): void;
22
+ /**
23
+ * @see {@link GetTransactionCommand}
24
+ */
25
+ getTransaction(args: GetTransactionCommandInput, options?: __HttpHandlerOptions): Promise<GetTransactionCommandOutput>;
26
+ getTransaction(args: GetTransactionCommandInput, cb: (err: any, data?: GetTransactionCommandOutput) => void): void;
27
+ getTransaction(args: GetTransactionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetTransactionCommandOutput) => void): void;
28
+ /**
29
+ * @see {@link ListTokenBalancesCommand}
30
+ */
31
+ listTokenBalances(args: ListTokenBalancesCommandInput, options?: __HttpHandlerOptions): Promise<ListTokenBalancesCommandOutput>;
32
+ listTokenBalances(args: ListTokenBalancesCommandInput, cb: (err: any, data?: ListTokenBalancesCommandOutput) => void): void;
33
+ listTokenBalances(args: ListTokenBalancesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTokenBalancesCommandOutput) => void): void;
34
+ /**
35
+ * @see {@link ListTransactionEventsCommand}
36
+ */
37
+ listTransactionEvents(args: ListTransactionEventsCommandInput, options?: __HttpHandlerOptions): Promise<ListTransactionEventsCommandOutput>;
38
+ listTransactionEvents(args: ListTransactionEventsCommandInput, cb: (err: any, data?: ListTransactionEventsCommandOutput) => void): void;
39
+ listTransactionEvents(args: ListTransactionEventsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTransactionEventsCommandOutput) => void): void;
40
+ /**
41
+ * @see {@link ListTransactionsCommand}
42
+ */
43
+ listTransactions(args: ListTransactionsCommandInput, options?: __HttpHandlerOptions): Promise<ListTransactionsCommandOutput>;
44
+ listTransactions(args: ListTransactionsCommandInput, cb: (err: any, data?: ListTransactionsCommandOutput) => void): void;
45
+ listTransactions(args: ListTransactionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTransactionsCommandOutput) => void): void;
46
+ }
47
+ /**
48
+ * @public
49
+ * <p>Amazon Managed Blockchain (AMB) Query provides you with convenient access to multi-blockchain network data, which makes
50
+ * it easier for you to extract contextual data related to blockchain activity. You can use AMB Query to
51
+ * read data from public blockchain networks, such as Bitcoin Mainnet and Ethereum Mainnet. You can
52
+ * also get information such as the current and historical balances of addresses, or you can get a
53
+ * list of blockchain transactions for a given time period. Additionally, you can get details of a
54
+ * given transaction, such as transaction events, which you can further analyze or use in business
55
+ * logic for your applications.</p>
56
+ */
57
+ export declare class ManagedBlockchainQuery extends ManagedBlockchainQueryClient implements ManagedBlockchainQuery {
58
+ }
@@ -0,0 +1,174 @@
1
+ import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
2
+ import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
3
+ import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
4
+ import { Credentials as __Credentials } from "@aws-sdk/types";
5
+ import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
6
+ import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
7
+ import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
8
+ import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
9
+ import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
10
+ import { BodyLengthCalculator as __BodyLengthCalculator, 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
+ import { BatchGetTokenBalanceCommandInput, BatchGetTokenBalanceCommandOutput } from "./commands/BatchGetTokenBalanceCommand";
12
+ import { GetTokenBalanceCommandInput, GetTokenBalanceCommandOutput } from "./commands/GetTokenBalanceCommand";
13
+ import { GetTransactionCommandInput, GetTransactionCommandOutput } from "./commands/GetTransactionCommand";
14
+ import { ListTokenBalancesCommandInput, ListTokenBalancesCommandOutput } from "./commands/ListTokenBalancesCommand";
15
+ import { ListTransactionEventsCommandInput, ListTransactionEventsCommandOutput } from "./commands/ListTransactionEventsCommand";
16
+ import { ListTransactionsCommandInput, ListTransactionsCommandOutput } from "./commands/ListTransactionsCommand";
17
+ import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
18
+ export { __Client };
19
+ /**
20
+ * @public
21
+ */
22
+ export type ServiceInputTypes = BatchGetTokenBalanceCommandInput | GetTokenBalanceCommandInput | GetTransactionCommandInput | ListTokenBalancesCommandInput | ListTransactionEventsCommandInput | ListTransactionsCommandInput;
23
+ /**
24
+ * @public
25
+ */
26
+ export type ServiceOutputTypes = BatchGetTokenBalanceCommandOutput | GetTokenBalanceCommandOutput | GetTransactionCommandOutput | ListTokenBalancesCommandOutput | ListTransactionEventsCommandOutput | ListTransactionsCommandOutput;
27
+ /**
28
+ * @public
29
+ */
30
+ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
31
+ /**
32
+ * The HTTP handler to use. Fetch in browser and Https in Nodejs.
33
+ */
34
+ requestHandler?: __HttpHandler;
35
+ /**
36
+ * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
37
+ * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
38
+ * @internal
39
+ */
40
+ sha256?: __ChecksumConstructor | __HashConstructor;
41
+ /**
42
+ * The function that will be used to convert strings into HTTP endpoints.
43
+ * @internal
44
+ */
45
+ urlParser?: __UrlParser;
46
+ /**
47
+ * A function that can calculate the length of a request body.
48
+ * @internal
49
+ */
50
+ bodyLengthChecker?: __BodyLengthCalculator;
51
+ /**
52
+ * A function that converts a stream into an array of bytes.
53
+ * @internal
54
+ */
55
+ streamCollector?: __StreamCollector;
56
+ /**
57
+ * The function that will be used to convert a base64-encoded string to a byte array.
58
+ * @internal
59
+ */
60
+ base64Decoder?: __Decoder;
61
+ /**
62
+ * The function that will be used to convert binary data to a base64-encoded string.
63
+ * @internal
64
+ */
65
+ base64Encoder?: __Encoder;
66
+ /**
67
+ * The function that will be used to convert a UTF8-encoded string to a byte array.
68
+ * @internal
69
+ */
70
+ utf8Decoder?: __Decoder;
71
+ /**
72
+ * The function that will be used to convert binary data to a UTF-8 encoded string.
73
+ * @internal
74
+ */
75
+ utf8Encoder?: __Encoder;
76
+ /**
77
+ * The runtime environment.
78
+ * @internal
79
+ */
80
+ runtime?: string;
81
+ /**
82
+ * Disable dynamically changing the endpoint of the client based on the hostPrefix
83
+ * trait of an operation.
84
+ */
85
+ disableHostPrefix?: boolean;
86
+ /**
87
+ * Unique service identifier.
88
+ * @internal
89
+ */
90
+ serviceId?: string;
91
+ /**
92
+ * Enables IPv6/IPv4 dualstack endpoint.
93
+ */
94
+ useDualstackEndpoint?: boolean | __Provider<boolean>;
95
+ /**
96
+ * Enables FIPS compatible endpoints.
97
+ */
98
+ useFipsEndpoint?: boolean | __Provider<boolean>;
99
+ /**
100
+ * The AWS region to which this client will send requests
101
+ */
102
+ region?: string | __Provider<string>;
103
+ /**
104
+ * Default credentials provider; Not available in browser runtime.
105
+ * @internal
106
+ */
107
+ credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
108
+ /**
109
+ * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
110
+ * @internal
111
+ */
112
+ defaultUserAgentProvider?: Provider<__UserAgent>;
113
+ /**
114
+ * Value for how many times a request will be made at most in case of retry.
115
+ */
116
+ maxAttempts?: number | __Provider<number>;
117
+ /**
118
+ * Specifies which retry algorithm to use.
119
+ */
120
+ retryMode?: string | __Provider<string>;
121
+ /**
122
+ * Optional logger for logging debug/info/warn/error.
123
+ */
124
+ logger?: __Logger;
125
+ /**
126
+ * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
127
+ */
128
+ defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
129
+ }
130
+ /**
131
+ * @public
132
+ */
133
+ export type ManagedBlockchainQueryClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & ClientInputEndpointParameters;
134
+ /**
135
+ * @public
136
+ *
137
+ * The configuration interface of ManagedBlockchainQueryClient class constructor that set the region, credentials and other options.
138
+ */
139
+ export interface ManagedBlockchainQueryClientConfig extends ManagedBlockchainQueryClientConfigType {
140
+ }
141
+ /**
142
+ * @public
143
+ */
144
+ export type ManagedBlockchainQueryClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
145
+ /**
146
+ * @public
147
+ *
148
+ * The resolved configuration interface of ManagedBlockchainQueryClient class. This is resolved and normalized from the {@link ManagedBlockchainQueryClientConfig | constructor configuration interface}.
149
+ */
150
+ export interface ManagedBlockchainQueryClientResolvedConfig extends ManagedBlockchainQueryClientResolvedConfigType {
151
+ }
152
+ /**
153
+ * @public
154
+ * <p>Amazon Managed Blockchain (AMB) Query provides you with convenient access to multi-blockchain network data, which makes
155
+ * it easier for you to extract contextual data related to blockchain activity. You can use AMB Query to
156
+ * read data from public blockchain networks, such as Bitcoin Mainnet and Ethereum Mainnet. You can
157
+ * also get information such as the current and historical balances of addresses, or you can get a
158
+ * list of blockchain transactions for a given time period. Additionally, you can get details of a
159
+ * given transaction, such as transaction events, which you can further analyze or use in business
160
+ * logic for your applications.</p>
161
+ */
162
+ export declare class ManagedBlockchainQueryClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, ManagedBlockchainQueryClientResolvedConfig> {
163
+ /**
164
+ * The resolved configuration of ManagedBlockchainQueryClient class. This is resolved and normalized from the {@link ManagedBlockchainQueryClientConfig | constructor configuration interface}.
165
+ */
166
+ readonly config: ManagedBlockchainQueryClientResolvedConfig;
167
+ constructor(configuration: ManagedBlockchainQueryClientConfig);
168
+ /**
169
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
170
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
171
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
172
+ */
173
+ destroy(): void;
174
+ }
@@ -0,0 +1,149 @@
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 { BatchGetTokenBalanceInput, BatchGetTokenBalanceOutput } from "../models/models_0";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link BatchGetTokenBalanceCommand}.
14
+ */
15
+ export interface BatchGetTokenBalanceCommandInput extends BatchGetTokenBalanceInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link BatchGetTokenBalanceCommand}.
21
+ */
22
+ export interface BatchGetTokenBalanceCommandOutput extends BatchGetTokenBalanceOutput, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Gets the token balance for a batch of tokens by using the <code>GetTokenBalance</code>
27
+ * action for every token in the request.</p>
28
+ * <note>
29
+ * <p>Only the native tokens BTC,ETH, and the ERC-20,
30
+ * ERC-721, and ERC 1155 token standards are supported.</p>
31
+ * </note>
32
+ * @example
33
+ * Use a bare-bones client and the command you need to make an API call.
34
+ * ```javascript
35
+ * import { ManagedBlockchainQueryClient, BatchGetTokenBalanceCommand } from "@aws-sdk/client-managedblockchain-query"; // ES Modules import
36
+ * // const { ManagedBlockchainQueryClient, BatchGetTokenBalanceCommand } = require("@aws-sdk/client-managedblockchain-query"); // CommonJS import
37
+ * const client = new ManagedBlockchainQueryClient(config);
38
+ * const input = { // BatchGetTokenBalanceInput
39
+ * getTokenBalanceInputs: [ // GetTokenBalanceInputList
40
+ * { // BatchGetTokenBalanceInputItem
41
+ * tokenIdentifier: { // TokenIdentifier
42
+ * network: "STRING_VALUE", // required
43
+ * contractAddress: "STRING_VALUE",
44
+ * tokenId: "STRING_VALUE",
45
+ * },
46
+ * ownerIdentifier: { // OwnerIdentifier
47
+ * address: "STRING_VALUE", // required
48
+ * },
49
+ * atBlockchainInstant: { // BlockchainInstant
50
+ * time: new Date("TIMESTAMP"),
51
+ * },
52
+ * },
53
+ * ],
54
+ * };
55
+ * const command = new BatchGetTokenBalanceCommand(input);
56
+ * const response = await client.send(command);
57
+ * // { // BatchGetTokenBalanceOutput
58
+ * // tokenBalances: [ // BatchGetTokenBalanceOutputList // required
59
+ * // { // BatchGetTokenBalanceOutputItem
60
+ * // ownerIdentifier: { // OwnerIdentifier
61
+ * // address: "STRING_VALUE", // required
62
+ * // },
63
+ * // tokenIdentifier: { // TokenIdentifier
64
+ * // network: "STRING_VALUE", // required
65
+ * // contractAddress: "STRING_VALUE",
66
+ * // tokenId: "STRING_VALUE",
67
+ * // },
68
+ * // balance: "STRING_VALUE", // required
69
+ * // atBlockchainInstant: { // BlockchainInstant
70
+ * // time: new Date("TIMESTAMP"),
71
+ * // },
72
+ * // lastUpdatedTime: {
73
+ * // time: new Date("TIMESTAMP"),
74
+ * // },
75
+ * // },
76
+ * // ],
77
+ * // errors: [ // BatchGetTokenBalanceErrors // required
78
+ * // { // BatchGetTokenBalanceErrorItem
79
+ * // tokenIdentifier: {
80
+ * // network: "STRING_VALUE", // required
81
+ * // contractAddress: "STRING_VALUE",
82
+ * // tokenId: "STRING_VALUE",
83
+ * // },
84
+ * // ownerIdentifier: {
85
+ * // address: "STRING_VALUE", // required
86
+ * // },
87
+ * // atBlockchainInstant: {
88
+ * // time: new Date("TIMESTAMP"),
89
+ * // },
90
+ * // errorCode: "STRING_VALUE", // required
91
+ * // errorMessage: "STRING_VALUE", // required
92
+ * // errorType: "STRING_VALUE", // required
93
+ * // },
94
+ * // ],
95
+ * // };
96
+ *
97
+ * ```
98
+ *
99
+ * @param BatchGetTokenBalanceCommandInput - {@link BatchGetTokenBalanceCommandInput}
100
+ * @returns {@link BatchGetTokenBalanceCommandOutput}
101
+ * @see {@link BatchGetTokenBalanceCommandInput} for command's `input` shape.
102
+ * @see {@link BatchGetTokenBalanceCommandOutput} for command's `response` shape.
103
+ * @see {@link ManagedBlockchainQueryClientResolvedConfig | config} for ManagedBlockchainQueryClient's `config` shape.
104
+ *
105
+ * @throws {@link AccessDeniedException} (client fault)
106
+ * <p>The Amazon Web Services account doesn’t have access to this resource. </p>
107
+ *
108
+ * @throws {@link InternalServerException} (server fault)
109
+ * <p>The request processing has failed because of an internal error in the service.</p>
110
+ *
111
+ * @throws {@link ResourceNotFoundException} (client fault)
112
+ * <p>The resource was not found.</p>
113
+ *
114
+ * @throws {@link ServiceQuotaExceededException} (client fault)
115
+ * <p>The service quota has been exceeded for this resource.</p>
116
+ *
117
+ * @throws {@link ThrottlingException} (client fault)
118
+ * <p>The request or operation couldn't be performed because a service is throttling
119
+ * requests. The most common source of throttling errors is when you create resources
120
+ * that exceed your service limit for this resource type. Request a limit increase or
121
+ * delete unused resources, if possible.</p>
122
+ *
123
+ * @throws {@link ValidationException} (client fault)
124
+ * <p>The resource passed is invalid.</p>
125
+ *
126
+ * @throws {@link ManagedBlockchainQueryServiceException}
127
+ * <p>Base exception class for all service exceptions from ManagedBlockchainQuery service.</p>
128
+ *
129
+ */
130
+ export declare class BatchGetTokenBalanceCommand extends $Command<BatchGetTokenBalanceCommandInput, BatchGetTokenBalanceCommandOutput, ManagedBlockchainQueryClientResolvedConfig> {
131
+ readonly input: BatchGetTokenBalanceCommandInput;
132
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
133
+ /**
134
+ * @public
135
+ */
136
+ constructor(input: BatchGetTokenBalanceCommandInput);
137
+ /**
138
+ * @internal
139
+ */
140
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ManagedBlockchainQueryClientResolvedConfig, options?: __HttpHandlerOptions): Handler<BatchGetTokenBalanceCommandInput, BatchGetTokenBalanceCommandOutput>;
141
+ /**
142
+ * @internal
143
+ */
144
+ private serialize;
145
+ /**
146
+ * @internal
147
+ */
148
+ private deserialize;
149
+ }
@@ -0,0 +1,122 @@
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 { GetTokenBalanceInput, GetTokenBalanceOutput } from "../models/models_0";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link GetTokenBalanceCommand}.
14
+ */
15
+ export interface GetTokenBalanceCommandInput extends GetTokenBalanceInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetTokenBalanceCommand}.
21
+ */
22
+ export interface GetTokenBalanceCommandOutput extends GetTokenBalanceOutput, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Gets the balance of a specific token, including native tokens, for a given address (wallet or contract) on the blockchain.</p>
27
+ * <note>
28
+ * <p>Only the native tokens BTC,ETH, and the ERC-20,
29
+ * ERC-721, and ERC 1155 token standards are supported.</p>
30
+ * </note>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { ManagedBlockchainQueryClient, GetTokenBalanceCommand } from "@aws-sdk/client-managedblockchain-query"; // ES Modules import
35
+ * // const { ManagedBlockchainQueryClient, GetTokenBalanceCommand } = require("@aws-sdk/client-managedblockchain-query"); // CommonJS import
36
+ * const client = new ManagedBlockchainQueryClient(config);
37
+ * const input = { // GetTokenBalanceInput
38
+ * tokenIdentifier: { // TokenIdentifier
39
+ * network: "STRING_VALUE", // required
40
+ * contractAddress: "STRING_VALUE",
41
+ * tokenId: "STRING_VALUE",
42
+ * },
43
+ * ownerIdentifier: { // OwnerIdentifier
44
+ * address: "STRING_VALUE", // required
45
+ * },
46
+ * atBlockchainInstant: { // BlockchainInstant
47
+ * time: new Date("TIMESTAMP"),
48
+ * },
49
+ * };
50
+ * const command = new GetTokenBalanceCommand(input);
51
+ * const response = await client.send(command);
52
+ * // { // GetTokenBalanceOutput
53
+ * // ownerIdentifier: { // OwnerIdentifier
54
+ * // address: "STRING_VALUE", // required
55
+ * // },
56
+ * // tokenIdentifier: { // TokenIdentifier
57
+ * // network: "STRING_VALUE", // required
58
+ * // contractAddress: "STRING_VALUE",
59
+ * // tokenId: "STRING_VALUE",
60
+ * // },
61
+ * // balance: "STRING_VALUE", // required
62
+ * // atBlockchainInstant: { // BlockchainInstant
63
+ * // time: new Date("TIMESTAMP"),
64
+ * // },
65
+ * // lastUpdatedTime: {
66
+ * // time: new Date("TIMESTAMP"),
67
+ * // },
68
+ * // };
69
+ *
70
+ * ```
71
+ *
72
+ * @param GetTokenBalanceCommandInput - {@link GetTokenBalanceCommandInput}
73
+ * @returns {@link GetTokenBalanceCommandOutput}
74
+ * @see {@link GetTokenBalanceCommandInput} for command's `input` shape.
75
+ * @see {@link GetTokenBalanceCommandOutput} for command's `response` shape.
76
+ * @see {@link ManagedBlockchainQueryClientResolvedConfig | config} for ManagedBlockchainQueryClient's `config` shape.
77
+ *
78
+ * @throws {@link AccessDeniedException} (client fault)
79
+ * <p>The Amazon Web Services account doesn’t have access to this resource. </p>
80
+ *
81
+ * @throws {@link InternalServerException} (server fault)
82
+ * <p>The request processing has failed because of an internal error in the service.</p>
83
+ *
84
+ * @throws {@link ResourceNotFoundException} (client fault)
85
+ * <p>The resource was not found.</p>
86
+ *
87
+ * @throws {@link ServiceQuotaExceededException} (client fault)
88
+ * <p>The service quota has been exceeded for this resource.</p>
89
+ *
90
+ * @throws {@link ThrottlingException} (client fault)
91
+ * <p>The request or operation couldn't be performed because a service is throttling
92
+ * requests. The most common source of throttling errors is when you create resources
93
+ * that exceed your service limit for this resource type. Request a limit increase or
94
+ * delete unused resources, if possible.</p>
95
+ *
96
+ * @throws {@link ValidationException} (client fault)
97
+ * <p>The resource passed is invalid.</p>
98
+ *
99
+ * @throws {@link ManagedBlockchainQueryServiceException}
100
+ * <p>Base exception class for all service exceptions from ManagedBlockchainQuery service.</p>
101
+ *
102
+ */
103
+ export declare class GetTokenBalanceCommand extends $Command<GetTokenBalanceCommandInput, GetTokenBalanceCommandOutput, ManagedBlockchainQueryClientResolvedConfig> {
104
+ readonly input: GetTokenBalanceCommandInput;
105
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
106
+ /**
107
+ * @public
108
+ */
109
+ constructor(input: GetTokenBalanceCommandInput);
110
+ /**
111
+ * @internal
112
+ */
113
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ManagedBlockchainQueryClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetTokenBalanceCommandInput, GetTokenBalanceCommandOutput>;
114
+ /**
115
+ * @internal
116
+ */
117
+ private serialize;
118
+ /**
119
+ * @internal
120
+ */
121
+ private deserialize;
122
+ }