managedblockchainquery.d.ts 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743
  1. import {Request} from '../lib/request';
  2. import {Response} from '../lib/response';
  3. import {AWSError} from '../lib/error';
  4. import {Service} from '../lib/service';
  5. import {ServiceConfigurationOptions} from '../lib/service';
  6. import {ConfigBase as Config} from '../lib/config-base';
  7. interface Blob {}
  8. declare class ManagedBlockchainQuery extends Service {
  9. /**
  10. * Constructs a service object. This object has one method for each API operation.
  11. */
  12. constructor(options?: ManagedBlockchainQuery.Types.ClientConfiguration)
  13. config: Config & ManagedBlockchainQuery.Types.ClientConfiguration;
  14. /**
  15. * Gets the token balance for a batch of tokens by using the BatchGetTokenBalance action for every token in the request. Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.
  16. */
  17. batchGetTokenBalance(params: ManagedBlockchainQuery.Types.BatchGetTokenBalanceInput, callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.BatchGetTokenBalanceOutput) => void): Request<ManagedBlockchainQuery.Types.BatchGetTokenBalanceOutput, AWSError>;
  18. /**
  19. * Gets the token balance for a batch of tokens by using the BatchGetTokenBalance action for every token in the request. Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.
  20. */
  21. batchGetTokenBalance(callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.BatchGetTokenBalanceOutput) => void): Request<ManagedBlockchainQuery.Types.BatchGetTokenBalanceOutput, AWSError>;
  22. /**
  23. * Gets the information about a specific contract deployed on the blockchain. The Bitcoin blockchain networks do not support this operation. Metadata is currently only available for some ERC-20 contracts. Metadata will be available for additional contracts in the future.
  24. */
  25. getAssetContract(params: ManagedBlockchainQuery.Types.GetAssetContractInput, callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.GetAssetContractOutput) => void): Request<ManagedBlockchainQuery.Types.GetAssetContractOutput, AWSError>;
  26. /**
  27. * Gets the information about a specific contract deployed on the blockchain. The Bitcoin blockchain networks do not support this operation. Metadata is currently only available for some ERC-20 contracts. Metadata will be available for additional contracts in the future.
  28. */
  29. getAssetContract(callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.GetAssetContractOutput) => void): Request<ManagedBlockchainQuery.Types.GetAssetContractOutput, AWSError>;
  30. /**
  31. * Gets the balance of a specific token, including native tokens, for a given address (wallet or contract) on the blockchain. Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.
  32. */
  33. getTokenBalance(params: ManagedBlockchainQuery.Types.GetTokenBalanceInput, callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.GetTokenBalanceOutput) => void): Request<ManagedBlockchainQuery.Types.GetTokenBalanceOutput, AWSError>;
  34. /**
  35. * Gets the balance of a specific token, including native tokens, for a given address (wallet or contract) on the blockchain. Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.
  36. */
  37. getTokenBalance(callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.GetTokenBalanceOutput) => void): Request<ManagedBlockchainQuery.Types.GetTokenBalanceOutput, AWSError>;
  38. /**
  39. * Gets the details of a transaction. This action will return transaction details for all transactions that are confirmed on the blockchain, even if they have not reached finality.
  40. */
  41. getTransaction(params: ManagedBlockchainQuery.Types.GetTransactionInput, callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.GetTransactionOutput) => void): Request<ManagedBlockchainQuery.Types.GetTransactionOutput, AWSError>;
  42. /**
  43. * Gets the details of a transaction. This action will return transaction details for all transactions that are confirmed on the blockchain, even if they have not reached finality.
  44. */
  45. getTransaction(callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.GetTransactionOutput) => void): Request<ManagedBlockchainQuery.Types.GetTransactionOutput, AWSError>;
  46. /**
  47. * Lists all the contracts for a given contract type deployed by an address (either a contract address or a wallet address). The Bitcoin blockchain networks do not support this operation.
  48. */
  49. listAssetContracts(params: ManagedBlockchainQuery.Types.ListAssetContractsInput, callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.ListAssetContractsOutput) => void): Request<ManagedBlockchainQuery.Types.ListAssetContractsOutput, AWSError>;
  50. /**
  51. * Lists all the contracts for a given contract type deployed by an address (either a contract address or a wallet address). The Bitcoin blockchain networks do not support this operation.
  52. */
  53. listAssetContracts(callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.ListAssetContractsOutput) => void): Request<ManagedBlockchainQuery.Types.ListAssetContractsOutput, AWSError>;
  54. /**
  55. * Lists all the transaction events for an address on the blockchain. This operation is only supported on the Bitcoin networks.
  56. */
  57. listFilteredTransactionEvents(params: ManagedBlockchainQuery.Types.ListFilteredTransactionEventsInput, callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.ListFilteredTransactionEventsOutput) => void): Request<ManagedBlockchainQuery.Types.ListFilteredTransactionEventsOutput, AWSError>;
  58. /**
  59. * Lists all the transaction events for an address on the blockchain. This operation is only supported on the Bitcoin networks.
  60. */
  61. listFilteredTransactionEvents(callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.ListFilteredTransactionEventsOutput) => void): Request<ManagedBlockchainQuery.Types.ListFilteredTransactionEventsOutput, AWSError>;
  62. /**
  63. * This action returns the following for a given blockchain network: Lists all token balances owned by an address (either a contract address or a wallet address). Lists all token balances for all tokens created by a contract. Lists all token balances for a given token. You must always specify the network property of the tokenFilter when using this operation.
  64. */
  65. listTokenBalances(params: ManagedBlockchainQuery.Types.ListTokenBalancesInput, callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.ListTokenBalancesOutput) => void): Request<ManagedBlockchainQuery.Types.ListTokenBalancesOutput, AWSError>;
  66. /**
  67. * This action returns the following for a given blockchain network: Lists all token balances owned by an address (either a contract address or a wallet address). Lists all token balances for all tokens created by a contract. Lists all token balances for a given token. You must always specify the network property of the tokenFilter when using this operation.
  68. */
  69. listTokenBalances(callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.ListTokenBalancesOutput) => void): Request<ManagedBlockchainQuery.Types.ListTokenBalancesOutput, AWSError>;
  70. /**
  71. * Lists all the transaction events for a transaction This action will return transaction details for all transactions that are confirmed on the blockchain, even if they have not reached finality.
  72. */
  73. listTransactionEvents(params: ManagedBlockchainQuery.Types.ListTransactionEventsInput, callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.ListTransactionEventsOutput) => void): Request<ManagedBlockchainQuery.Types.ListTransactionEventsOutput, AWSError>;
  74. /**
  75. * Lists all the transaction events for a transaction This action will return transaction details for all transactions that are confirmed on the blockchain, even if they have not reached finality.
  76. */
  77. listTransactionEvents(callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.ListTransactionEventsOutput) => void): Request<ManagedBlockchainQuery.Types.ListTransactionEventsOutput, AWSError>;
  78. /**
  79. * Lists all the transaction events for a transaction.
  80. */
  81. listTransactions(params: ManagedBlockchainQuery.Types.ListTransactionsInput, callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.ListTransactionsOutput) => void): Request<ManagedBlockchainQuery.Types.ListTransactionsOutput, AWSError>;
  82. /**
  83. * Lists all the transaction events for a transaction.
  84. */
  85. listTransactions(callback?: (err: AWSError, data: ManagedBlockchainQuery.Types.ListTransactionsOutput) => void): Request<ManagedBlockchainQuery.Types.ListTransactionsOutput, AWSError>;
  86. }
  87. declare namespace ManagedBlockchainQuery {
  88. export interface AddressIdentifierFilter {
  89. /**
  90. * The container for the recipient address of the transaction.
  91. */
  92. transactionEventToAddress: AddressIdentifierFilterTransactionEventToAddressList;
  93. }
  94. export type AddressIdentifierFilterTransactionEventToAddressList = ChainAddress[];
  95. export interface AssetContract {
  96. /**
  97. * The container for the contract identifier containing its blockchain network and address.
  98. */
  99. contractIdentifier: ContractIdentifier;
  100. /**
  101. * The token standard of the contract.
  102. */
  103. tokenStandard: QueryTokenStandard;
  104. /**
  105. * The address of the contract deployer.
  106. */
  107. deployerAddress: ChainAddress;
  108. }
  109. export type AssetContractList = AssetContract[];
  110. export interface BatchGetTokenBalanceErrorItem {
  111. tokenIdentifier?: TokenIdentifier;
  112. ownerIdentifier?: OwnerIdentifier;
  113. atBlockchainInstant?: BlockchainInstant;
  114. /**
  115. * The error code associated with the error.
  116. */
  117. errorCode: String;
  118. /**
  119. * The message associated with the error.
  120. */
  121. errorMessage: String;
  122. /**
  123. * The type of error.
  124. */
  125. errorType: ErrorType;
  126. }
  127. export type BatchGetTokenBalanceErrors = BatchGetTokenBalanceErrorItem[];
  128. export interface BatchGetTokenBalanceInput {
  129. /**
  130. * An array of BatchGetTokenBalanceInputItem objects whose balance is being requested.
  131. */
  132. getTokenBalanceInputs?: GetTokenBalanceInputList;
  133. }
  134. export interface BatchGetTokenBalanceInputItem {
  135. tokenIdentifier: TokenIdentifier;
  136. ownerIdentifier: OwnerIdentifier;
  137. atBlockchainInstant?: BlockchainInstant;
  138. }
  139. export interface BatchGetTokenBalanceOutput {
  140. /**
  141. * An array of BatchGetTokenBalanceOutputItem objects returned by the response.
  142. */
  143. tokenBalances: BatchGetTokenBalanceOutputList;
  144. /**
  145. * An array of BatchGetTokenBalanceErrorItem objects returned from the request.
  146. */
  147. errors: BatchGetTokenBalanceErrors;
  148. }
  149. export interface BatchGetTokenBalanceOutputItem {
  150. ownerIdentifier?: OwnerIdentifier;
  151. tokenIdentifier?: TokenIdentifier;
  152. /**
  153. * The container for the token balance.
  154. */
  155. balance: String;
  156. atBlockchainInstant: BlockchainInstant;
  157. lastUpdatedTime?: BlockchainInstant;
  158. }
  159. export type BatchGetTokenBalanceOutputList = BatchGetTokenBalanceOutputItem[];
  160. export type BlockHash = string;
  161. export interface BlockchainInstant {
  162. /**
  163. * The container of the Timestamp of the blockchain instant. This timestamp will only be recorded up to the second.
  164. */
  165. time?: Timestamp;
  166. }
  167. export type Boolean = boolean;
  168. export type ChainAddress = string;
  169. export type ConfirmationStatus = "FINAL"|"NONFINAL"|string;
  170. export interface ConfirmationStatusFilter {
  171. /**
  172. * The container to determine whether to list results that have only reached finality . Transactions that have reached finality are always part of the response.
  173. */
  174. include: ConfirmationStatusIncludeList;
  175. }
  176. export type ConfirmationStatusIncludeList = ConfirmationStatus[];
  177. export interface ContractFilter {
  178. /**
  179. * The blockchain network of the contract.
  180. */
  181. network: QueryNetwork;
  182. /**
  183. * The container for the token standard.
  184. */
  185. tokenStandard: QueryTokenStandard;
  186. /**
  187. * The network address of the deployer.
  188. */
  189. deployerAddress: ChainAddress;
  190. }
  191. export interface ContractIdentifier {
  192. /**
  193. * The blockchain network of the contract.
  194. */
  195. network: QueryNetwork;
  196. /**
  197. * Container for the blockchain address about a contract.
  198. */
  199. contractAddress: ChainAddress;
  200. }
  201. export interface ContractMetadata {
  202. /**
  203. * The name of the token contract.
  204. */
  205. name?: String;
  206. /**
  207. * The symbol of the token contract.
  208. */
  209. symbol?: String;
  210. /**
  211. * The decimals used by the token contract.
  212. */
  213. decimals?: Integer;
  214. }
  215. export type ErrorType = "VALIDATION_EXCEPTION"|"RESOURCE_NOT_FOUND_EXCEPTION"|string;
  216. export type ExecutionStatus = "FAILED"|"SUCCEEDED"|string;
  217. export interface GetAssetContractInput {
  218. /**
  219. * Contains the blockchain address and network information about the contract.
  220. */
  221. contractIdentifier: ContractIdentifier;
  222. }
  223. export interface GetAssetContractOutput {
  224. /**
  225. * Contains the blockchain address and network information about the contract.
  226. */
  227. contractIdentifier: ContractIdentifier;
  228. /**
  229. * The token standard of the contract requested.
  230. */
  231. tokenStandard: QueryTokenStandard;
  232. /**
  233. * The address of the deployer of contract.
  234. */
  235. deployerAddress: ChainAddress;
  236. metadata?: ContractMetadata;
  237. }
  238. export interface GetTokenBalanceInput {
  239. /**
  240. * The container for the identifier for the token, including the unique token ID and its blockchain network.
  241. */
  242. tokenIdentifier: TokenIdentifier;
  243. /**
  244. * The container for the identifier for the owner.
  245. */
  246. ownerIdentifier: OwnerIdentifier;
  247. /**
  248. * The time for when the TokenBalance is requested or the current time if a time is not provided in the request. This time will only be recorded up to the second.
  249. */
  250. atBlockchainInstant?: BlockchainInstant;
  251. }
  252. export type GetTokenBalanceInputList = BatchGetTokenBalanceInputItem[];
  253. export interface GetTokenBalanceOutput {
  254. ownerIdentifier?: OwnerIdentifier;
  255. tokenIdentifier?: TokenIdentifier;
  256. /**
  257. * The container for the token balance.
  258. */
  259. balance: String;
  260. atBlockchainInstant: BlockchainInstant;
  261. lastUpdatedTime?: BlockchainInstant;
  262. }
  263. export interface GetTransactionInput {
  264. /**
  265. * The hash of a transaction. It is generated when a transaction is created.
  266. */
  267. transactionHash?: QueryTransactionHash;
  268. /**
  269. * The identifier of a Bitcoin transaction. It is generated when a transaction is created. transactionId is only supported on the Bitcoin networks.
  270. */
  271. transactionId?: QueryTransactionId;
  272. /**
  273. * The blockchain network where the transaction occurred.
  274. */
  275. network: QueryNetwork;
  276. }
  277. export interface GetTransactionOutput {
  278. /**
  279. * Contains the details of the transaction.
  280. */
  281. transaction: Transaction;
  282. }
  283. export type Integer = number;
  284. export interface ListAssetContractsInput {
  285. /**
  286. * Contains the filter parameter for the request.
  287. */
  288. contractFilter: ContractFilter;
  289. /**
  290. * The pagination token that indicates the next set of results to retrieve.
  291. */
  292. nextToken?: NextToken;
  293. /**
  294. * The maximum number of contracts to list. Default: 100 Even if additional results can be retrieved, the request can return less results than maxResults or an empty array of results. To retrieve the next set of results, make another request with the returned nextToken value. The value of nextToken is null when there are no more results to return
  295. */
  296. maxResults?: ListAssetContractsInputMaxResultsInteger;
  297. }
  298. export type ListAssetContractsInputMaxResultsInteger = number;
  299. export interface ListAssetContractsOutput {
  300. /**
  301. * An array of contract objects that contain the properties for each contract.
  302. */
  303. contracts: AssetContractList;
  304. /**
  305. * The pagination token that indicates the next set of results to retrieve.
  306. */
  307. nextToken?: NextToken;
  308. }
  309. export interface ListFilteredTransactionEventsInput {
  310. /**
  311. * The blockchain network where the transaction occurred. Valid Values: BITCOIN_MAINNET | BITCOIN_TESTNET
  312. */
  313. network: String;
  314. /**
  315. * This is the unique public address on the blockchain for which the transaction events are being requested.
  316. */
  317. addressIdentifierFilter: AddressIdentifierFilter;
  318. /**
  319. * This container specifies the time frame for the transaction events returned in the response.
  320. */
  321. timeFilter?: TimeFilter;
  322. /**
  323. * This container specifies filtering attributes related to BITCOIN_VOUT event types
  324. */
  325. voutFilter?: VoutFilter;
  326. confirmationStatusFilter?: ConfirmationStatusFilter;
  327. /**
  328. * The order by which the results will be sorted.
  329. */
  330. sort?: ListFilteredTransactionEventsSort;
  331. /**
  332. * The pagination token that indicates the next set of results to retrieve.
  333. */
  334. nextToken?: NextToken;
  335. /**
  336. * The maximum number of transaction events to list. Default: 100 Even if additional results can be retrieved, the request can return less results than maxResults or an empty array of results. To retrieve the next set of results, make another request with the returned nextToken value. The value of nextToken is null when there are no more results to return
  337. */
  338. maxResults?: ListFilteredTransactionEventsInputMaxResultsInteger;
  339. }
  340. export type ListFilteredTransactionEventsInputMaxResultsInteger = number;
  341. export interface ListFilteredTransactionEventsOutput {
  342. /**
  343. * The transaction events returned by the request.
  344. */
  345. events: TransactionEventList;
  346. /**
  347. * The pagination token that indicates the next set of results to retrieve.
  348. */
  349. nextToken?: NextToken;
  350. }
  351. export interface ListFilteredTransactionEventsSort {
  352. /**
  353. * Container on how the results will be sorted by?
  354. */
  355. sortBy?: ListFilteredTransactionEventsSortBy;
  356. /**
  357. * The container for the sort order for ListFilteredTransactionEvents. The SortOrder field only accepts the values ASCENDING and DESCENDING. Not providing SortOrder will default to ASCENDING.
  358. */
  359. sortOrder?: SortOrder;
  360. }
  361. export type ListFilteredTransactionEventsSortBy = "blockchainInstant"|string;
  362. export interface ListTokenBalancesInput {
  363. /**
  364. * The contract or wallet address on the blockchain network by which to filter the request. You must specify the address property of the ownerFilter when listing balances of tokens owned by the address.
  365. */
  366. ownerFilter?: OwnerFilter;
  367. /**
  368. * The contract address or a token identifier on the blockchain network by which to filter the request. You must specify the contractAddress property of this container when listing tokens minted by a contract. You must always specify the network property of this container when using this operation.
  369. */
  370. tokenFilter: TokenFilter;
  371. /**
  372. * The pagination token that indicates the next set of results to retrieve.
  373. */
  374. nextToken?: NextToken;
  375. /**
  376. * The maximum number of token balances to return. Default: 100 Even if additional results can be retrieved, the request can return less results than maxResults or an empty array of results. To retrieve the next set of results, make another request with the returned nextToken value. The value of nextToken is null when there are no more results to return
  377. */
  378. maxResults?: ListTokenBalancesInputMaxResultsInteger;
  379. }
  380. export type ListTokenBalancesInputMaxResultsInteger = number;
  381. export interface ListTokenBalancesOutput {
  382. /**
  383. * An array of TokenBalance objects. Each object contains details about the token balance.
  384. */
  385. tokenBalances: TokenBalanceList;
  386. /**
  387. * The pagination token that indicates the next set of results to retrieve.
  388. */
  389. nextToken?: NextToken;
  390. }
  391. export interface ListTransactionEventsInput {
  392. /**
  393. * The hash of a transaction. It is generated when a transaction is created.
  394. */
  395. transactionHash?: QueryTransactionHash;
  396. /**
  397. * The identifier of a Bitcoin transaction. It is generated when a transaction is created. transactionId is only supported on the Bitcoin networks.
  398. */
  399. transactionId?: QueryTransactionId;
  400. /**
  401. * The blockchain network where the transaction events occurred.
  402. */
  403. network: QueryNetwork;
  404. /**
  405. * The pagination token that indicates the next set of results to retrieve.
  406. */
  407. nextToken?: NextToken;
  408. /**
  409. * The maximum number of transaction events to list. Default: 100 Even if additional results can be retrieved, the request can return less results than maxResults or an empty array of results. To retrieve the next set of results, make another request with the returned nextToken value. The value of nextToken is null when there are no more results to return
  410. */
  411. maxResults?: ListTransactionEventsInputMaxResultsInteger;
  412. }
  413. export type ListTransactionEventsInputMaxResultsInteger = number;
  414. export interface ListTransactionEventsOutput {
  415. /**
  416. * An array of TransactionEvent objects. Each object contains details about the transaction events.
  417. */
  418. events: TransactionEventList;
  419. /**
  420. * The pagination token that indicates the next set of results to retrieve.
  421. */
  422. nextToken?: NextToken;
  423. }
  424. export interface ListTransactionsInput {
  425. /**
  426. * The address (either a contract or wallet), whose transactions are being requested.
  427. */
  428. address: ChainAddress;
  429. /**
  430. * The blockchain network where the transactions occurred.
  431. */
  432. network: QueryNetwork;
  433. fromBlockchainInstant?: BlockchainInstant;
  434. toBlockchainInstant?: BlockchainInstant;
  435. /**
  436. * The order by which the results will be sorted.
  437. */
  438. sort?: ListTransactionsSort;
  439. /**
  440. * The pagination token that indicates the next set of results to retrieve.
  441. */
  442. nextToken?: NextToken;
  443. /**
  444. * The maximum number of transactions to list. Default: 100 Even if additional results can be retrieved, the request can return less results than maxResults or an empty array of results. To retrieve the next set of results, make another request with the returned nextToken value. The value of nextToken is null when there are no more results to return
  445. */
  446. maxResults?: ListTransactionsInputMaxResultsInteger;
  447. /**
  448. * This filter is used to include transactions in the response that haven't reached finality . Transactions that have reached finality are always part of the response.
  449. */
  450. confirmationStatusFilter?: ConfirmationStatusFilter;
  451. }
  452. export type ListTransactionsInputMaxResultsInteger = number;
  453. export interface ListTransactionsOutput {
  454. /**
  455. * The array of transactions returned by the request.
  456. */
  457. transactions: TransactionOutputList;
  458. /**
  459. * The pagination token that indicates the next set of results to retrieve.
  460. */
  461. nextToken?: NextToken;
  462. }
  463. export interface ListTransactionsSort {
  464. /**
  465. * Defaults to the value TRANSACTION_TIMESTAMP.
  466. */
  467. sortBy?: ListTransactionsSortBy;
  468. /**
  469. * The container for the sort order for ListTransactions. The SortOrder field only accepts the values ASCENDING and DESCENDING. Not providing SortOrder will default to ASCENDING.
  470. */
  471. sortOrder?: SortOrder;
  472. }
  473. export type ListTransactionsSortBy = "TRANSACTION_TIMESTAMP"|string;
  474. export type Long = number;
  475. export type NextToken = string;
  476. export interface OwnerFilter {
  477. /**
  478. * The contract or wallet address.
  479. */
  480. address: ChainAddress;
  481. }
  482. export interface OwnerIdentifier {
  483. /**
  484. * The contract or wallet address for the owner.
  485. */
  486. address: ChainAddress;
  487. }
  488. export type QueryNetwork = "ETHEREUM_MAINNET"|"ETHEREUM_SEPOLIA_TESTNET"|"BITCOIN_MAINNET"|"BITCOIN_TESTNET"|string;
  489. export type QueryTokenId = string;
  490. export type QueryTokenStandard = "ERC20"|"ERC721"|"ERC1155"|string;
  491. export type QueryTransactionEventType = "ERC20_TRANSFER"|"ERC20_MINT"|"ERC20_BURN"|"ERC20_DEPOSIT"|"ERC20_WITHDRAWAL"|"ERC721_TRANSFER"|"ERC1155_TRANSFER"|"BITCOIN_VIN"|"BITCOIN_VOUT"|"INTERNAL_ETH_TRANSFER"|"ETH_TRANSFER"|string;
  492. export type QueryTransactionHash = string;
  493. export type QueryTransactionId = string;
  494. export type SortOrder = "ASCENDING"|"DESCENDING"|string;
  495. export type String = string;
  496. export interface TimeFilter {
  497. from?: BlockchainInstant;
  498. to?: BlockchainInstant;
  499. }
  500. export type Timestamp = Date;
  501. export interface TokenBalance {
  502. /**
  503. * The container for the identifier of the owner.
  504. */
  505. ownerIdentifier?: OwnerIdentifier;
  506. /**
  507. * The identifier for the token, including the unique token ID and its blockchain network.
  508. */
  509. tokenIdentifier?: TokenIdentifier;
  510. /**
  511. * The container of the token balance.
  512. */
  513. balance: String;
  514. /**
  515. * The time for when the TokenBalance is requested or the current time if a time is not provided in the request. This time will only be recorded up to the second.
  516. */
  517. atBlockchainInstant: BlockchainInstant;
  518. /**
  519. * The Timestamp of the last transaction at which the balance for the token in the wallet was updated.
  520. */
  521. lastUpdatedTime?: BlockchainInstant;
  522. }
  523. export type TokenBalanceList = TokenBalance[];
  524. export interface TokenFilter {
  525. /**
  526. * The blockchain network of the token.
  527. */
  528. network: QueryNetwork;
  529. /**
  530. * This is the address of the contract.
  531. */
  532. contractAddress?: ChainAddress;
  533. /**
  534. * The unique identifier of the token.
  535. */
  536. tokenId?: QueryTokenId;
  537. }
  538. export interface TokenIdentifier {
  539. /**
  540. * The blockchain network of the token.
  541. */
  542. network: QueryNetwork;
  543. /**
  544. * This is the token's contract address.
  545. */
  546. contractAddress?: ChainAddress;
  547. /**
  548. * The unique identifier of the token. For native tokens, use the 3 character abbreviation that best matches your token. For example, btc for Bitcoin, eth for Ether, etc. For all other token types you must specify the tokenId in the 64 character hexadecimal tokenid format.
  549. */
  550. tokenId?: QueryTokenId;
  551. }
  552. export interface Transaction {
  553. /**
  554. * The blockchain network where the transaction occurred.
  555. */
  556. network: QueryNetwork;
  557. /**
  558. * The block hash is a unique identifier for a block. It is a fixed-size string that is calculated by using the information in the block. The block hash is used to verify the integrity of the data in the block.
  559. */
  560. blockHash?: BlockHash;
  561. /**
  562. * The hash of a transaction. It is generated when a transaction is created.
  563. */
  564. transactionHash: QueryTransactionHash;
  565. /**
  566. * The block number in which the transaction is recorded.
  567. */
  568. blockNumber?: String;
  569. /**
  570. * The Timestamp of the transaction.
  571. */
  572. transactionTimestamp: Timestamp;
  573. /**
  574. * The index of the transaction within a blockchain.
  575. */
  576. transactionIndex: Long;
  577. /**
  578. * The number of transactions in the block.
  579. */
  580. numberOfTransactions: Long;
  581. /**
  582. * The identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain.
  583. */
  584. to: ChainAddress;
  585. /**
  586. * The initiator of the transaction. It is either in the form a public key or a contract address.
  587. */
  588. from?: ChainAddress;
  589. /**
  590. * The blockchain address for the contract.
  591. */
  592. contractAddress?: ChainAddress;
  593. /**
  594. * The amount of gas used for the transaction.
  595. */
  596. gasUsed?: String;
  597. /**
  598. * The amount of gas used up to the specified point in the block.
  599. */
  600. cumulativeGasUsed?: String;
  601. /**
  602. * The effective gas price.
  603. */
  604. effectiveGasPrice?: String;
  605. /**
  606. * The signature of the transaction. The Z coordinate of a point V.
  607. */
  608. signatureV?: Integer;
  609. /**
  610. * The signature of the transaction. The X coordinate of a point R.
  611. */
  612. signatureR?: String;
  613. /**
  614. * The signature of the transaction. The Y coordinate of a point S.
  615. */
  616. signatureS?: String;
  617. /**
  618. * The transaction fee.
  619. */
  620. transactionFee?: String;
  621. /**
  622. * The identifier of a Bitcoin transaction. It is generated when a transaction is created.
  623. */
  624. transactionId?: String;
  625. /**
  626. * Specifies whether the transaction has reached Finality.
  627. */
  628. confirmationStatus?: ConfirmationStatus;
  629. /**
  630. * Identifies whether the transaction has succeeded or failed.
  631. */
  632. executionStatus?: ExecutionStatus;
  633. }
  634. export interface TransactionEvent {
  635. /**
  636. * The blockchain network where the transaction occurred.
  637. */
  638. network: QueryNetwork;
  639. /**
  640. * The hash of a transaction. It is generated when a transaction is created.
  641. */
  642. transactionHash: QueryTransactionHash;
  643. /**
  644. * The type of transaction event.
  645. */
  646. eventType: QueryTransactionEventType;
  647. /**
  648. * The wallet address initiating the transaction. It can either be a public key or a contract.
  649. */
  650. from?: ChainAddress;
  651. /**
  652. * The wallet address receiving the transaction. It can either be a public key or a contract.
  653. */
  654. to?: ChainAddress;
  655. /**
  656. * The value that was transacted.
  657. */
  658. value?: String;
  659. /**
  660. * The blockchain address for the contract
  661. */
  662. contractAddress?: ChainAddress;
  663. /**
  664. * The unique identifier for the token involved in the transaction.
  665. */
  666. tokenId?: QueryTokenId;
  667. /**
  668. * The identifier of a Bitcoin transaction. It is generated when a transaction is created.
  669. */
  670. transactionId?: String;
  671. /**
  672. * The position of the transaction output in the transaction output list.
  673. */
  674. voutIndex?: Integer;
  675. /**
  676. * Specifies if the transaction output is spent or unspent. This is only returned for BITCOIN_VOUT event types. This is only returned for BITCOIN_VOUT event types.
  677. */
  678. voutSpent?: Boolean;
  679. /**
  680. * The transactionId that created the spent transaction output. This is only returned for BITCOIN_VIN event types.
  681. */
  682. spentVoutTransactionId?: String;
  683. /**
  684. * The transactionHash that created the spent transaction output. This is only returned for BITCOIN_VIN event types.
  685. */
  686. spentVoutTransactionHash?: String;
  687. /**
  688. * The position of the spent transaction output in the output list of the creating transaction. This is only returned for BITCOIN_VIN event types.
  689. */
  690. spentVoutIndex?: Integer;
  691. blockchainInstant?: BlockchainInstant;
  692. /**
  693. * This container specifies whether the transaction has reached Finality.
  694. */
  695. confirmationStatus?: ConfirmationStatus;
  696. }
  697. export type TransactionEventList = TransactionEvent[];
  698. export interface TransactionOutputItem {
  699. /**
  700. * The hash of a transaction. It is generated when a transaction is created.
  701. */
  702. transactionHash: QueryTransactionHash;
  703. /**
  704. * The identifier of a Bitcoin transaction. It is generated when a transaction is created.
  705. */
  706. transactionId?: QueryTransactionId;
  707. /**
  708. * The blockchain network where the transaction occurred.
  709. */
  710. network: QueryNetwork;
  711. /**
  712. * The time when the transaction occurred.
  713. */
  714. transactionTimestamp: Timestamp;
  715. /**
  716. * Specifies whether to list transactions that have not reached Finality.
  717. */
  718. confirmationStatus?: ConfirmationStatus;
  719. }
  720. export type TransactionOutputList = TransactionOutputItem[];
  721. export interface VoutFilter {
  722. /**
  723. * Specifies if the transaction output is spent or unspent.
  724. */
  725. voutSpent: Boolean;
  726. }
  727. /**
  728. * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
  729. */
  730. export type apiVersion = "2023-05-04"|"latest"|string;
  731. export interface ClientApiVersions {
  732. /**
  733. * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
  734. */
  735. apiVersion?: apiVersion;
  736. }
  737. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  738. /**
  739. * Contains interfaces for use with the ManagedBlockchainQuery client.
  740. */
  741. export import Types = ManagedBlockchainQuery;
  742. }
  743. export = ManagedBlockchainQuery;