@avalabs/glacier-sdk 2.8.0-alpha.80 → 2.8.0-alpha.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2614 -1012
- package/dist/index.js +1428 -207
- package/esm/generated/Glacier.d.ts +18 -0
- package/esm/generated/Glacier.js +28 -0
- package/esm/generated/core/ApiError.d.ts +13 -0
- package/esm/generated/core/ApiError.js +13 -0
- package/esm/generated/core/ApiRequestOptions.d.ts +15 -0
- package/esm/generated/core/ApiResult.d.ts +9 -0
- package/esm/generated/core/BaseHttpRequest.d.ts +11 -0
- package/esm/generated/core/BaseHttpRequest.js +7 -0
- package/esm/generated/core/CancelablePromise.d.ts +28 -0
- package/esm/generated/core/CancelablePromise.js +86 -0
- package/esm/generated/core/FetchHttpRequest.js +13 -0
- package/esm/generated/core/OpenAPI.d.ts +18 -0
- package/esm/generated/core/OpenAPI.js +13 -0
- package/esm/generated/core/request.js +244 -0
- package/esm/generated/models/Address.d.ts +8 -0
- package/esm/generated/models/Asset.d.ts +28 -0
- package/esm/generated/models/AssetType.d.ts +8 -0
- package/esm/generated/models/AssetType.js +9 -0
- package/esm/generated/models/Block.d.ts +15 -0
- package/esm/generated/models/BlockchainId.d.ts +9 -0
- package/esm/generated/models/BlockchainId.js +10 -0
- package/esm/generated/models/CChainAtomicBalances.d.ts +8 -0
- package/esm/generated/models/CChainExportTransaction.d.ts +58 -0
- package/esm/generated/models/CChainExportTransaction.js +8 -0
- package/esm/generated/models/CChainImportTransaction.d.ts +58 -0
- package/esm/generated/models/CChainImportTransaction.js +8 -0
- package/esm/generated/models/CChainSharedAssetBalance.d.ts +30 -0
- package/esm/generated/models/CPBlockchainId.d.ts +7 -0
- package/esm/generated/models/CPBlockchainId.js +8 -0
- package/esm/generated/models/CancelListingEventResponse.d.ts +5 -0
- package/esm/generated/models/ChainAddressChainIdMap.d.ts +8 -0
- package/esm/generated/models/ChainAddressChainIdMapListResponse.d.ts +7 -0
- package/esm/generated/models/ChainInfo.d.ts +22 -0
- package/esm/generated/models/CloseAuctionEventResponse.d.ts +6 -0
- package/esm/generated/models/CollectionMetrics.d.ts +40 -0
- package/esm/generated/models/CollectionSortByOption.d.ts +8 -0
- package/esm/generated/models/CollectionSortByOption.js +9 -0
- package/esm/generated/models/ContractType.d.ts +7 -0
- package/esm/generated/models/ContractType.js +8 -0
- package/esm/generated/models/CreateTransactionExportRequest.d.ts +11 -0
- package/esm/generated/models/CurrencyCode.d.ts +18 -0
- package/esm/generated/models/CurrencyCode.js +19 -0
- package/esm/generated/models/EVMInput.d.ts +14 -0
- package/esm/generated/models/EVMOutput.d.ts +14 -0
- package/esm/generated/models/Erc1155Token.d.ts +19 -0
- package/esm/generated/models/Erc1155Token.js +8 -0
- package/esm/generated/models/Erc1155TokenBalance.d.ts +28 -0
- package/esm/generated/models/Erc1155TokenBalance.js +8 -0
- package/esm/generated/models/Erc1155TokenMetadata.d.ts +20 -0
- package/esm/generated/models/Erc1155Transfer.d.ts +27 -0
- package/esm/generated/models/Erc1155TransferDetails.d.ts +11 -0
- package/esm/generated/models/Erc20Token.d.ts +38 -0
- package/esm/generated/models/Erc20Token.js +8 -0
- package/esm/generated/models/Erc20TokenBalance.d.ts +51 -0
- package/esm/generated/models/Erc20TokenBalance.js +8 -0
- package/esm/generated/models/Erc20Transfer.d.ts +27 -0
- package/esm/generated/models/Erc20TransferDetails.d.ts +11 -0
- package/esm/generated/models/Erc721Token.d.ts +27 -0
- package/esm/generated/models/Erc721Token.js +8 -0
- package/esm/generated/models/Erc721TokenBalance.d.ts +31 -0
- package/esm/generated/models/Erc721TokenBalance.js +8 -0
- package/esm/generated/models/Erc721TokenMetadata.d.ts +19 -0
- package/esm/generated/models/Erc721Transfer.d.ts +26 -0
- package/esm/generated/models/Erc721TransferDetails.d.ts +10 -0
- package/esm/generated/models/ErcType.d.ts +8 -0
- package/esm/generated/models/ErcType.js +9 -0
- package/esm/generated/models/EvmNetworkOptions.d.ts +6 -0
- package/esm/generated/models/FullNativeTransactionDetails.d.ts +62 -0
- package/esm/generated/models/GetBlockResponse.d.ts +49 -0
- package/esm/generated/models/GetChainResponse.d.ts +22 -0
- package/esm/generated/models/GetContractInformationResponse.d.ts +58 -0
- package/esm/generated/models/GetNativeBalanceResponse.d.ts +10 -0
- package/esm/generated/models/GetTransactionResponse.d.ts +35 -0
- package/esm/generated/models/InternalTransaction.d.ts +33 -0
- package/esm/generated/models/InternalTransactionDetails.d.ts +17 -0
- package/esm/generated/models/InternalTransactionOpCall.d.ts +11 -0
- package/esm/generated/models/InternalTransactionOpCall.js +12 -0
- package/esm/generated/models/ListBlocksResponse.d.ts +11 -0
- package/esm/generated/models/ListCChainAtomicBalancesResponse.d.ts +7 -0
- package/esm/generated/models/ListCChainExportTxsResponse.d.ts +11 -0
- package/esm/generated/models/ListCChainImportTxsResponse.d.ts +11 -0
- package/esm/generated/models/ListChainsResponse.d.ts +7 -0
- package/esm/generated/models/ListCollectibleBalancesResponse.d.ts +16 -0
- package/esm/generated/models/ListErc1155BalancesResponse.d.ts +14 -0
- package/esm/generated/models/ListErc1155TransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListErc20BalancesResponse.d.ts +14 -0
- package/esm/generated/models/ListErc20TransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListErc721BalancesResponse.d.ts +14 -0
- package/esm/generated/models/ListErc721TransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListInternalTransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListListingsResponse.d.ts +11 -0
- package/esm/generated/models/ListNativeTransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListNftCollectionWithMetricsResponse.d.ts +11 -0
- package/esm/generated/models/ListPChainBalancesResponse.d.ts +7 -0
- package/esm/generated/models/ListPChainTransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListPChainUtxosResponse.d.ts +11 -0
- package/esm/generated/models/ListTransactionDetailsResponse.d.ts +11 -0
- package/esm/generated/models/ListTransfersResponse.d.ts +13 -0
- package/esm/generated/models/ListUtxosResponse.d.ts +11 -0
- package/esm/generated/models/ListXChainBalancesResponse.d.ts +7 -0
- package/esm/generated/models/ListXChainTransactionsResponse.d.ts +11 -0
- package/esm/generated/models/ListXChainVerticesResponse.d.ts +11 -0
- package/esm/generated/models/ListingCurrencyType.d.ts +6 -0
- package/esm/generated/models/ListingCurrencyType.js +7 -0
- package/esm/generated/models/ListingEventType.d.ts +8 -0
- package/esm/generated/models/ListingEventType.js +9 -0
- package/esm/generated/models/ListingResponse.d.ts +19 -0
- package/esm/generated/models/ListingType.d.ts +6 -0
- package/esm/generated/models/ListingType.js +7 -0
- package/esm/generated/models/ListingsSortByOption.d.ts +5 -0
- package/esm/generated/models/ListingsSortByOption.js +6 -0
- package/esm/generated/models/Method.d.ts +24 -0
- package/esm/generated/models/Money.d.ts +14 -0
- package/esm/generated/models/NativeTokenBalance.d.ts +41 -0
- package/esm/generated/models/NativeTransaction.d.ts +55 -0
- package/esm/generated/models/Network.d.ts +6 -0
- package/esm/generated/models/Network.js +7 -0
- package/esm/generated/models/NetworkToken.d.ts +23 -0
- package/esm/generated/models/NetworkTokenDetails.d.ts +18 -0
- package/esm/generated/models/NftCollection.d.ts +22 -0
- package/esm/generated/models/NftCollectionWithMetrics.d.ts +24 -0
- package/esm/generated/models/NftFilterOptionsProperty.d.ts +10 -0
- package/esm/generated/models/NftSearchBody.d.ts +10 -0
- package/esm/generated/models/NftSearchResultTypeOption.d.ts +6 -0
- package/esm/generated/models/NftSearchResultTypeOption.js +7 -0
- package/esm/generated/models/NftTokenMetadataStatus.d.ts +15 -0
- package/esm/generated/models/NftTokenMetadataStatus.js +16 -0
- package/esm/generated/models/OpenListingEventResponse.d.ts +17 -0
- package/esm/generated/models/OperationMetadata.d.ts +3 -0
- package/esm/generated/models/OperationStatusResponse.d.ts +14 -0
- package/esm/generated/models/PChainAsset.d.ts +6 -0
- package/esm/generated/models/PChainBalance.d.ts +30 -0
- package/esm/generated/models/PChainConsumedUtxo.d.ts +9 -0
- package/esm/generated/models/PChainEmittedUtxo.d.ts +13 -0
- package/esm/generated/models/PChainId.d.ts +6 -0
- package/esm/generated/models/PChainId.js +7 -0
- package/esm/generated/models/PChainTransaction.d.ts +45 -0
- package/esm/generated/models/PChainUtxo.d.ts +20 -0
- package/esm/generated/models/PaginationParams.d.ts +13 -0
- package/esm/generated/models/PrimaryNetworkOptions.d.ts +6 -0
- package/esm/generated/models/ProposerDetails.d.ts +9 -0
- package/esm/generated/models/PurchaseListingEventResponse.d.ts +17 -0
- package/esm/generated/models/ResourceLink.d.ts +8 -0
- package/esm/generated/models/ResourceLinkType.d.ts +18 -0
- package/esm/generated/models/ResourceLinkType.js +19 -0
- package/esm/generated/models/ReviewStatus.d.ts +6 -0
- package/esm/generated/models/ReviewStatus.js +7 -0
- package/esm/generated/models/RichAddress.d.ts +26 -0
- package/esm/generated/models/SortOrder.d.ts +6 -0
- package/esm/generated/models/SortOrder.js +7 -0
- package/esm/generated/models/TokenWithPrice.d.ts +28 -0
- package/esm/generated/models/TransactionDetails.d.ts +36 -0
- package/esm/generated/models/TransactionMethodType.d.ts +7 -0
- package/esm/generated/models/TransactionMethodType.js +8 -0
- package/esm/generated/models/TransactionStatus.d.ts +6 -0
- package/esm/generated/models/TransactionStatus.js +7 -0
- package/esm/generated/models/TransactionVertexDetail.d.ts +16 -0
- package/esm/generated/models/TrendingTimeframe.d.ts +7 -0
- package/esm/generated/models/TrendingTimeframe.js +8 -0
- package/esm/generated/models/UtilityAddresses.d.ts +5 -0
- package/esm/generated/models/Utxo.d.ts +60 -0
- package/esm/generated/models/UtxoCredential.d.ts +12 -0
- package/esm/generated/models/VmName.d.ts +7 -0
- package/esm/generated/models/VmName.js +8 -0
- package/esm/generated/models/XChainAssetBalance.d.ts +29 -0
- package/esm/generated/models/XChainAssetDetails.d.ts +32 -0
- package/esm/generated/models/XChainBalances.d.ts +17 -0
- package/esm/generated/models/XChainId.d.ts +6 -0
- package/esm/generated/models/XChainId.js +7 -0
- package/esm/generated/models/XChainSharedAssetBalance.d.ts +30 -0
- package/esm/generated/models/XChainTransaction.d.ts +51 -0
- package/esm/generated/models/XChainVertex.d.ts +12 -0
- package/esm/generated/services/EvmService.d.ts +734 -0
- package/esm/generated/services/EvmService.js +518 -0
- package/esm/generated/services/HealthCheckService.d.ts +20 -0
- package/esm/generated/services/HealthCheckService.js +16 -0
- package/esm/generated/services/OperationsService.d.ts +30 -0
- package/esm/generated/services/OperationsService.js +28 -0
- package/esm/generated/services/PrimaryNetworkService.d.ts +359 -0
- package/esm/generated/services/PrimaryNetworkService.js +252 -0
- package/esm/index.d.ts +135 -2
- package/esm/index.js +41 -2
- package/package.json +6 -6
- package/esm/generated/models.d.ts +0 -1351
- package/esm/generated/models.js +0 -148
- package/esm/glacierClient.d.ts +0 -128
- package/esm/glacierClient.js +0 -94
- package/esm/types.d.ts +0 -14
package/dist/index.d.ts
CHANGED
|
@@ -1,127 +1,89 @@
|
|
|
1
|
-
|
|
1
|
+
type ApiRequestOptions = {
|
|
2
|
+
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
|
|
3
|
+
readonly url: string;
|
|
4
|
+
readonly path?: Record<string, any>;
|
|
5
|
+
readonly cookies?: Record<string, any>;
|
|
6
|
+
readonly headers?: Record<string, any>;
|
|
7
|
+
readonly query?: Record<string, any>;
|
|
8
|
+
readonly formData?: Record<string, any>;
|
|
9
|
+
readonly body?: any;
|
|
10
|
+
readonly mediaType?: string;
|
|
11
|
+
readonly responseHeader?: string;
|
|
12
|
+
readonly errors?: Record<number, string>;
|
|
13
|
+
};
|
|
2
14
|
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*/
|
|
29
|
-
value: number;
|
|
30
|
-
}
|
|
31
|
-
interface NativeTokenBalance {
|
|
32
|
-
/**
|
|
33
|
-
* The contract name.
|
|
34
|
-
* @example "Wrapped AVAX"
|
|
35
|
-
*/
|
|
36
|
-
name: string;
|
|
37
|
-
/**
|
|
38
|
-
* The contract symbol.
|
|
39
|
-
* @example "WAVAX"
|
|
40
|
-
*/
|
|
41
|
-
symbol: string;
|
|
42
|
-
/**
|
|
43
|
-
* The number of decimals the token uses. For example `6`,
|
|
44
|
-
* means to divide the token amount by `1000000` to get its user
|
|
45
|
-
* representation.
|
|
46
|
-
* @example 18
|
|
47
|
-
*/
|
|
48
|
-
decimals: number;
|
|
49
|
-
/**
|
|
50
|
-
* The logo uri for the address.
|
|
51
|
-
* @example "https://glacier-api.avax.network/proxy/chain-assets/main/chains/43114/token-logo.png"
|
|
52
|
-
*/
|
|
53
|
-
logoUri?: string;
|
|
54
|
-
/**
|
|
55
|
-
* The evm chain id.
|
|
56
|
-
* @example "43114"
|
|
57
|
-
*/
|
|
58
|
-
chainId: string;
|
|
59
|
-
/** The token price, if available. */
|
|
60
|
-
price?: Money;
|
|
61
|
-
/**
|
|
62
|
-
* The address balance for the token, in units specified by the
|
|
63
|
-
* `decimals` value for the contract.
|
|
64
|
-
* @example "2000000000000000000"
|
|
65
|
-
*/
|
|
66
|
-
balance: string;
|
|
67
|
-
/** The monetary value of the balance, if a price is available for the token. */
|
|
68
|
-
balanceValue?: Money;
|
|
15
|
+
declare class CancelError extends Error {
|
|
16
|
+
constructor(message: string);
|
|
17
|
+
get isCancelled(): boolean;
|
|
18
|
+
}
|
|
19
|
+
interface OnCancel {
|
|
20
|
+
readonly isResolved: boolean;
|
|
21
|
+
readonly isRejected: boolean;
|
|
22
|
+
readonly isCancelled: boolean;
|
|
23
|
+
(cancelHandler: () => void): void;
|
|
24
|
+
}
|
|
25
|
+
declare class CancelablePromise<T> implements Promise<T> {
|
|
26
|
+
readonly [Symbol.toStringTag]: string;
|
|
27
|
+
private _isResolved;
|
|
28
|
+
private _isRejected;
|
|
29
|
+
private _isCancelled;
|
|
30
|
+
private readonly _cancelHandlers;
|
|
31
|
+
private readonly _promise;
|
|
32
|
+
private _resolve?;
|
|
33
|
+
private _reject?;
|
|
34
|
+
constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
|
|
35
|
+
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
36
|
+
catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
|
|
37
|
+
finally(onFinally?: (() => void) | null): Promise<T>;
|
|
38
|
+
cancel(): void;
|
|
39
|
+
get isCancelled(): boolean;
|
|
69
40
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
41
|
+
|
|
42
|
+
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
43
|
+
type Headers = Record<string, string>;
|
|
44
|
+
type OpenAPIConfig = {
|
|
45
|
+
BASE: string;
|
|
46
|
+
VERSION: string;
|
|
47
|
+
WITH_CREDENTIALS: boolean;
|
|
48
|
+
CREDENTIALS: 'include' | 'omit' | 'same-origin';
|
|
49
|
+
TOKEN?: string | Resolver<string>;
|
|
50
|
+
USERNAME?: string | Resolver<string>;
|
|
51
|
+
PASSWORD?: string | Resolver<string>;
|
|
52
|
+
HEADERS?: Headers | Resolver<Headers>;
|
|
53
|
+
ENCODE_PATH?: (path: string) => string;
|
|
54
|
+
};
|
|
55
|
+
declare const OpenAPI: OpenAPIConfig;
|
|
56
|
+
|
|
57
|
+
declare abstract class BaseHttpRequest {
|
|
58
|
+
readonly config: OpenAPIConfig;
|
|
59
|
+
constructor(config: OpenAPIConfig);
|
|
60
|
+
abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
|
|
73
61
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* The contract name.
|
|
82
|
-
* @example "Wrapped AVAX"
|
|
83
|
-
*/
|
|
84
|
-
name: string;
|
|
85
|
-
/**
|
|
86
|
-
* The contract symbol.
|
|
87
|
-
* @example "WAVAX"
|
|
88
|
-
*/
|
|
89
|
-
symbol: string;
|
|
90
|
-
/**
|
|
91
|
-
* The number of decimals the token uses. For example `6`,
|
|
92
|
-
* means to divide the token amount by `1000000` to get its user
|
|
93
|
-
* representation.
|
|
94
|
-
* @example 18
|
|
95
|
-
*/
|
|
96
|
-
decimals: number;
|
|
97
|
-
/**
|
|
98
|
-
* The logo uri for the address.
|
|
99
|
-
* @example "https://glacier-api.avax.network/proxy/chain-assets/main/chains/43114/token-logo.png"
|
|
100
|
-
*/
|
|
101
|
-
logoUri?: string;
|
|
102
|
-
ercType: 'ERC-20';
|
|
103
|
-
/** The token price, if available. */
|
|
104
|
-
price?: Money;
|
|
105
|
-
/**
|
|
106
|
-
* The evm chain id.
|
|
107
|
-
* @example "43114"
|
|
108
|
-
*/
|
|
109
|
-
chainId: string;
|
|
110
|
-
/**
|
|
111
|
-
* The address balance for the token, in units specified by the
|
|
112
|
-
* `decimals` value for the contract.
|
|
113
|
-
* @example "2000000000000000000"
|
|
114
|
-
*/
|
|
115
|
-
balance: string;
|
|
116
|
-
/** The monetary value of the balance, if a price is available for the token. */
|
|
117
|
-
balanceValue?: Money;
|
|
62
|
+
|
|
63
|
+
declare enum CollectionSortByOption {
|
|
64
|
+
SALE_TIMESTAMP = "saleTimestamp",
|
|
65
|
+
VOLUME = "volume",
|
|
66
|
+
VOLUME_CHANGE = "volumeChange",
|
|
67
|
+
FLOOR_PRICE = "floorPrice"
|
|
118
68
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
69
|
+
|
|
70
|
+
declare enum CurrencyCode {
|
|
71
|
+
USD = "usd",
|
|
72
|
+
EUR = "eur",
|
|
73
|
+
AUD = "aud",
|
|
74
|
+
CAD = "cad",
|
|
75
|
+
CHF = "chf",
|
|
76
|
+
CLP = "clp",
|
|
77
|
+
CNY = "cny",
|
|
78
|
+
CZK = "czk",
|
|
79
|
+
DKK = "dkk",
|
|
80
|
+
GBP = "gbp",
|
|
81
|
+
HKD = "hkd",
|
|
82
|
+
HUF = "huf",
|
|
83
|
+
JPY = "jpy",
|
|
84
|
+
NZD = "nzd"
|
|
124
85
|
}
|
|
86
|
+
|
|
125
87
|
declare enum NftTokenMetadataStatus {
|
|
126
88
|
UNKNOWN = "UNKNOWN",
|
|
127
89
|
MISSING_TOKEN = "MISSING_TOKEN",
|
|
@@ -135,10 +97,10 @@ declare enum NftTokenMetadataStatus {
|
|
|
135
97
|
INDEXED = "INDEXED",
|
|
136
98
|
UNINDEXED = "UNINDEXED"
|
|
137
99
|
}
|
|
138
|
-
|
|
100
|
+
|
|
101
|
+
type Erc1155TokenMetadata = {
|
|
139
102
|
/**
|
|
140
103
|
* The metadata indexing status of the nft.
|
|
141
|
-
* @example "indexed"
|
|
142
104
|
*/
|
|
143
105
|
indexStatus: NftTokenMetadataStatus;
|
|
144
106
|
metadataLastUpdatedTimestamp?: number;
|
|
@@ -149,44 +111,29 @@ interface Erc721TokenMetadata {
|
|
|
149
111
|
animationUri?: string;
|
|
150
112
|
externalUrl?: string;
|
|
151
113
|
background?: string;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
114
|
+
decimals?: number;
|
|
115
|
+
properties?: string;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
type Erc1155Token = {
|
|
155
119
|
/**
|
|
156
120
|
* A wallet or contract address in mixed-case checksum encoding.
|
|
157
|
-
* @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
158
121
|
*/
|
|
159
122
|
address: string;
|
|
160
|
-
|
|
161
|
-
* The contract name.
|
|
162
|
-
* @example "Wrapped AVAX"
|
|
163
|
-
*/
|
|
164
|
-
name: string;
|
|
165
|
-
/**
|
|
166
|
-
* The contract symbol.
|
|
167
|
-
* @example "WAVAX"
|
|
168
|
-
*/
|
|
169
|
-
symbol: string;
|
|
170
|
-
ercType: 'ERC-721';
|
|
123
|
+
ercType: Erc1155Token.ercType;
|
|
171
124
|
tokenId: string;
|
|
172
125
|
tokenUri: string;
|
|
173
|
-
metadata:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
interface ListErc721BalancesResponse {
|
|
181
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
182
|
-
nextPageToken?: string;
|
|
183
|
-
/** The list of ERC-721 token balances for the address. */
|
|
184
|
-
erc721TokenBalances: Erc721TokenBalance[];
|
|
126
|
+
metadata: Erc1155TokenMetadata;
|
|
127
|
+
};
|
|
128
|
+
declare namespace Erc1155Token {
|
|
129
|
+
enum ercType {
|
|
130
|
+
ERC_1155 = "ERC-1155"
|
|
131
|
+
}
|
|
185
132
|
}
|
|
186
|
-
|
|
133
|
+
|
|
134
|
+
type Erc721TokenMetadata = {
|
|
187
135
|
/**
|
|
188
136
|
* The metadata indexing status of the nft.
|
|
189
|
-
* @example "indexed"
|
|
190
137
|
*/
|
|
191
138
|
indexStatus: NftTokenMetadataStatus;
|
|
192
139
|
metadataLastUpdatedTimestamp?: number;
|
|
@@ -197,1038 +144,920 @@ interface Erc1155TokenMetadata {
|
|
|
197
144
|
animationUri?: string;
|
|
198
145
|
externalUrl?: string;
|
|
199
146
|
background?: string;
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
147
|
+
attributes?: string;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
type Erc721Token = {
|
|
204
151
|
/**
|
|
205
152
|
* A wallet or contract address in mixed-case checksum encoding.
|
|
206
|
-
* @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
207
153
|
*/
|
|
208
154
|
address: string;
|
|
209
|
-
ercType: 'ERC-1155';
|
|
210
|
-
tokenId: string;
|
|
211
|
-
tokenUri: string;
|
|
212
|
-
metadata: Erc1155TokenMetadata;
|
|
213
|
-
/**
|
|
214
|
-
* The evm chain id.
|
|
215
|
-
* @example "43114"
|
|
216
|
-
*/
|
|
217
|
-
chainId: string;
|
|
218
155
|
/**
|
|
219
|
-
* The
|
|
220
|
-
* `decimals` value for the contract.
|
|
221
|
-
* @example "2000000000000000000"
|
|
156
|
+
* The contract name.
|
|
222
157
|
*/
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
interface ListErc1155BalancesResponse {
|
|
226
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
227
|
-
nextPageToken?: string;
|
|
228
|
-
/** The list of ERC-1155 token balances for the address. */
|
|
229
|
-
erc1155TokenBalances: Erc1155TokenBalance[];
|
|
230
|
-
}
|
|
231
|
-
interface ListCollectibleBalancesResponse {
|
|
232
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
233
|
-
nextPageToken?: string;
|
|
158
|
+
name: string;
|
|
234
159
|
/**
|
|
235
|
-
* The
|
|
236
|
-
* address.
|
|
160
|
+
* The contract symbol.
|
|
237
161
|
*/
|
|
238
|
-
|
|
162
|
+
symbol: string;
|
|
163
|
+
ercType: Erc721Token.ercType;
|
|
164
|
+
tokenId: string;
|
|
165
|
+
tokenUri: string;
|
|
166
|
+
metadata: Erc721TokenMetadata;
|
|
167
|
+
};
|
|
168
|
+
declare namespace Erc721Token {
|
|
169
|
+
enum ercType {
|
|
170
|
+
ERC_721 = "ERC-721"
|
|
171
|
+
}
|
|
239
172
|
}
|
|
240
|
-
|
|
173
|
+
|
|
174
|
+
type GetBlockResponse = {
|
|
241
175
|
/**
|
|
242
176
|
* The block number on the chain.
|
|
243
|
-
* @example "339"
|
|
244
177
|
*/
|
|
245
178
|
blockNumber: string;
|
|
246
179
|
/**
|
|
247
180
|
* The block finality timestamp.
|
|
248
|
-
* @example 1648672486
|
|
249
181
|
*/
|
|
250
182
|
blockTimestamp: number;
|
|
251
183
|
/**
|
|
252
184
|
* The block hash identifier.
|
|
253
|
-
* @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
|
|
254
185
|
*/
|
|
255
186
|
blockHash: string;
|
|
256
|
-
/**
|
|
187
|
+
/**
|
|
188
|
+
* The number of evm transactions in the block.
|
|
189
|
+
*/
|
|
257
190
|
txCount: number;
|
|
258
|
-
/**
|
|
191
|
+
/**
|
|
192
|
+
* The number of atomic transactions in the block.
|
|
193
|
+
*/
|
|
259
194
|
atomicTxCount: number;
|
|
260
|
-
/**
|
|
195
|
+
/**
|
|
196
|
+
* The base gas fee for a transaction to be included in the block.
|
|
197
|
+
*/
|
|
261
198
|
baseFee: string;
|
|
262
|
-
/**
|
|
199
|
+
/**
|
|
200
|
+
* The gas used for transactions in the block.
|
|
201
|
+
*/
|
|
263
202
|
gasUsed: string;
|
|
264
|
-
/**
|
|
203
|
+
/**
|
|
204
|
+
* The total gas limit set for transactions in the block.
|
|
205
|
+
*/
|
|
265
206
|
gasLimit: string;
|
|
266
207
|
gasCost: string;
|
|
267
|
-
/**
|
|
208
|
+
/**
|
|
209
|
+
* The hash of the parent block.
|
|
210
|
+
*/
|
|
268
211
|
parentHash: string;
|
|
269
|
-
/**
|
|
212
|
+
/**
|
|
213
|
+
* The amount of fees spent/burned for transactions in the block.
|
|
214
|
+
*/
|
|
270
215
|
feesSpent: string;
|
|
271
|
-
/**
|
|
216
|
+
/**
|
|
217
|
+
* The cumulative number of transactions for the chain including this block.
|
|
218
|
+
*/
|
|
272
219
|
cumulativeTransactions: string;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
type NetworkToken = {
|
|
223
|
+
/**
|
|
224
|
+
* The contract name.
|
|
225
|
+
*/
|
|
226
|
+
name: string;
|
|
227
|
+
/**
|
|
228
|
+
* The contract symbol.
|
|
229
|
+
*/
|
|
230
|
+
symbol: string;
|
|
231
|
+
/**
|
|
232
|
+
* The number of decimals the token uses. For example `6`,
|
|
233
|
+
* means to divide the token amount by `1000000` to get its user
|
|
234
|
+
* representation.
|
|
235
|
+
*/
|
|
236
|
+
decimals: number;
|
|
237
|
+
/**
|
|
238
|
+
* The logo uri for the address.
|
|
239
|
+
*/
|
|
240
|
+
logoUri?: string;
|
|
241
|
+
description?: string;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
type UtilityAddresses = {
|
|
245
|
+
multicall?: string;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
declare enum VmName {
|
|
249
|
+
EVM = "EVM",
|
|
250
|
+
BITCOIN = "BITCOIN",
|
|
251
|
+
ETHEREUM = "ETHEREUM"
|
|
273
252
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
253
|
+
|
|
254
|
+
type GetChainResponse = {
|
|
255
|
+
chainId: string;
|
|
256
|
+
chainName: string;
|
|
257
|
+
description: string;
|
|
258
|
+
platformChainId?: string;
|
|
259
|
+
subnetId?: string;
|
|
260
|
+
vmId?: string;
|
|
261
|
+
vmName: VmName;
|
|
262
|
+
explorerUrl?: string;
|
|
263
|
+
rpcUrl: string;
|
|
264
|
+
wsUrl?: string;
|
|
265
|
+
isTestnet: boolean;
|
|
266
|
+
utilityAddresses?: UtilityAddresses;
|
|
267
|
+
networkToken: NetworkToken;
|
|
268
|
+
chainLogoUri?: string;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
declare enum AssetType {
|
|
272
|
+
FIXED_CAP = "Fixed Cap",
|
|
273
|
+
UNLIMITED_CAP = "Unlimited Cap",
|
|
274
|
+
STABLECOIN = "Stablecoin",
|
|
275
|
+
NFT = "NFT"
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
declare enum ContractType {
|
|
279
|
+
ERC_20 = "ERC-20",
|
|
280
|
+
ERC_721 = "ERC-721",
|
|
281
|
+
OTHER = "Other"
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
declare enum ResourceLinkType {
|
|
285
|
+
TWITTER = "Twitter",
|
|
286
|
+
FACEBOOK = "Facebook",
|
|
287
|
+
DISCORD = "Discord",
|
|
288
|
+
TELEGRAM = "Telegram",
|
|
289
|
+
BLOG = "Blog",
|
|
290
|
+
MEDIUM = "Medium",
|
|
291
|
+
WHITEPAPER = "Whitepaper",
|
|
292
|
+
COIN_GECKO = "CoinGecko",
|
|
293
|
+
COIN_MARKET_CAP = "CoinMarketCap",
|
|
294
|
+
LINKED_IN = "LinkedIn",
|
|
295
|
+
REDDIT = "Reddit",
|
|
296
|
+
SUPPORT = "Support",
|
|
297
|
+
GITHUB = "Github",
|
|
298
|
+
DOCUMENTATION = "Documentation"
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
type ResourceLink = {
|
|
302
|
+
type: ResourceLinkType;
|
|
303
|
+
url: string;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
declare enum ReviewStatus {
|
|
307
|
+
PENDING = "Pending",
|
|
308
|
+
APPROVED = "Approved"
|
|
278
309
|
}
|
|
279
|
-
|
|
310
|
+
|
|
311
|
+
type GetContractInformationResponse = {
|
|
312
|
+
/**
|
|
313
|
+
* A wallet or contract address in mixed-case checksum encoding.
|
|
314
|
+
*/
|
|
315
|
+
address: string;
|
|
316
|
+
description?: string;
|
|
280
317
|
/**
|
|
281
318
|
* The contract name.
|
|
282
|
-
* @example "Wrapped AVAX"
|
|
283
319
|
*/
|
|
284
320
|
name?: string;
|
|
285
321
|
/**
|
|
286
322
|
* The contract symbol.
|
|
287
|
-
* @example "WAVAX"
|
|
288
323
|
*/
|
|
289
324
|
symbol?: string;
|
|
325
|
+
contractType: ContractType;
|
|
326
|
+
assetType?: AssetType;
|
|
327
|
+
officialSite?: string;
|
|
328
|
+
/**
|
|
329
|
+
* Any labels given to the contract.
|
|
330
|
+
*/
|
|
331
|
+
tags?: Array<any[]>;
|
|
332
|
+
email?: string;
|
|
333
|
+
/**
|
|
334
|
+
* The evm chain id.
|
|
335
|
+
*/
|
|
336
|
+
chainId: number;
|
|
290
337
|
/**
|
|
291
338
|
* The number of decimals the token uses. For example `6`,
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
* @example 18
|
|
339
|
+
* means to divide the token amount by `1000000` to get its user
|
|
340
|
+
* representation.
|
|
295
341
|
*/
|
|
296
342
|
decimals?: number;
|
|
297
343
|
/**
|
|
298
344
|
* The logo uri for the address.
|
|
299
|
-
* @example "https://glacier-api.avax.network/proxy/chain-assets/main/chains/43114/token-logo.png"
|
|
300
345
|
*/
|
|
301
346
|
logoUri?: string;
|
|
302
347
|
/**
|
|
303
|
-
*
|
|
304
|
-
* @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
348
|
+
* The hex color code assigned to the token.
|
|
305
349
|
*/
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
-
interface Erc20Token {
|
|
350
|
+
tokenColor?: string;
|
|
309
351
|
/**
|
|
310
|
-
*
|
|
311
|
-
* @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
352
|
+
* Array of resource links.
|
|
312
353
|
*/
|
|
313
|
-
|
|
354
|
+
resourceLinks?: Array<ResourceLink>;
|
|
355
|
+
/**
|
|
356
|
+
* Status of contract information submission. All submitted
|
|
357
|
+
* contracts will be reviewed for approval before being inserted into the
|
|
358
|
+
* Glacier repository.
|
|
359
|
+
*/
|
|
360
|
+
reviewStatus: ReviewStatus;
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
type Money = {
|
|
364
|
+
/**
|
|
365
|
+
* ISO 4217 currency code.
|
|
366
|
+
*/
|
|
367
|
+
currencyCode: CurrencyCode;
|
|
368
|
+
/**
|
|
369
|
+
* Monetary value in base 10 decimals.
|
|
370
|
+
*/
|
|
371
|
+
value: number;
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
type NativeTokenBalance = {
|
|
314
375
|
/**
|
|
315
376
|
* The contract name.
|
|
316
|
-
* @example "Wrapped AVAX"
|
|
317
377
|
*/
|
|
318
378
|
name: string;
|
|
319
379
|
/**
|
|
320
380
|
* The contract symbol.
|
|
321
|
-
* @example "WAVAX"
|
|
322
381
|
*/
|
|
323
382
|
symbol: string;
|
|
324
383
|
/**
|
|
325
384
|
* The number of decimals the token uses. For example `6`,
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
* @example 18
|
|
385
|
+
* means to divide the token amount by `1000000` to get its user
|
|
386
|
+
* representation.
|
|
329
387
|
*/
|
|
330
388
|
decimals: number;
|
|
331
389
|
/**
|
|
332
390
|
* The logo uri for the address.
|
|
333
|
-
* @example "https://glacier-api.avax.network/proxy/chain-assets/main/chains/43114/token-logo.png"
|
|
334
391
|
*/
|
|
335
392
|
logoUri?: string;
|
|
336
|
-
|
|
337
|
-
|
|
393
|
+
/**
|
|
394
|
+
* The evm chain id.
|
|
395
|
+
*/
|
|
396
|
+
chainId: string;
|
|
397
|
+
/**
|
|
398
|
+
* The token price, if available.
|
|
399
|
+
*/
|
|
338
400
|
price?: Money;
|
|
339
|
-
}
|
|
340
|
-
interface Erc20TransferDetails {
|
|
341
|
-
from: RichAddress;
|
|
342
|
-
to: RichAddress;
|
|
343
|
-
/** @example "10000000000000000000" */
|
|
344
|
-
value: string;
|
|
345
|
-
erc20Token: Erc20Token;
|
|
346
|
-
}
|
|
347
|
-
interface Erc721Token {
|
|
348
401
|
/**
|
|
349
|
-
*
|
|
350
|
-
*
|
|
402
|
+
* The address balance for the token, in units specified by the
|
|
403
|
+
* `decimals` value for the contract.
|
|
351
404
|
*/
|
|
352
|
-
|
|
405
|
+
balance: string;
|
|
353
406
|
/**
|
|
354
|
-
* The
|
|
355
|
-
* @example "Wrapped AVAX"
|
|
407
|
+
* The monetary value of the balance, if a price is available for the token.
|
|
356
408
|
*/
|
|
357
|
-
|
|
409
|
+
balanceValue?: Money;
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
type GetNativeBalanceResponse = {
|
|
358
413
|
/**
|
|
359
|
-
* The
|
|
360
|
-
* @example "WAVAX"
|
|
414
|
+
* The native token balance for the address.
|
|
361
415
|
*/
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
416
|
+
nativeTokenBalance: NativeTokenBalance;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
type RichAddress = {
|
|
420
|
+
/**
|
|
421
|
+
* The contract name.
|
|
422
|
+
*/
|
|
423
|
+
name?: string;
|
|
424
|
+
/**
|
|
425
|
+
* The contract symbol.
|
|
426
|
+
*/
|
|
427
|
+
symbol?: string;
|
|
428
|
+
/**
|
|
429
|
+
* The number of decimals the token uses. For example `6`,
|
|
430
|
+
* means to divide the token amount by `1000000` to get its user
|
|
431
|
+
* representation.
|
|
432
|
+
*/
|
|
433
|
+
decimals?: number;
|
|
434
|
+
/**
|
|
435
|
+
* The logo uri for the address.
|
|
436
|
+
*/
|
|
437
|
+
logoUri?: string;
|
|
374
438
|
/**
|
|
375
439
|
* A wallet or contract address in mixed-case checksum encoding.
|
|
376
|
-
* @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
377
440
|
*/
|
|
378
441
|
address: string;
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
metadata: Erc1155TokenMetadata;
|
|
383
|
-
}
|
|
384
|
-
interface Erc1155TransferDetails {
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
type Erc1155TransferDetails = {
|
|
385
445
|
from: RichAddress;
|
|
386
446
|
to: RichAddress;
|
|
387
|
-
/** @example "10000000000000000000" */
|
|
388
447
|
value: string;
|
|
389
448
|
erc1155Token: Erc1155Token;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
DELEGATECALL = "DELEGATECALL",
|
|
398
|
-
STATICCALL = "STATICCALL"
|
|
399
|
-
}
|
|
400
|
-
interface InternalTransactionDetails {
|
|
401
|
-
from: RichAddress;
|
|
402
|
-
to: RichAddress;
|
|
403
|
-
internalTxType: InternalTransactionOpCall;
|
|
404
|
-
/** @example "10000000000000000000" */
|
|
405
|
-
value: string;
|
|
406
|
-
/** True if the internal transaction was reverted. */
|
|
407
|
-
isReverted: boolean;
|
|
408
|
-
gasUsed: string;
|
|
409
|
-
gasLimit: string;
|
|
410
|
-
}
|
|
411
|
-
interface NetworkToken {
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
type Erc20Token = {
|
|
452
|
+
/**
|
|
453
|
+
* A wallet or contract address in mixed-case checksum encoding.
|
|
454
|
+
*/
|
|
455
|
+
address: string;
|
|
412
456
|
/**
|
|
413
457
|
* The contract name.
|
|
414
|
-
* @example "Wrapped AVAX"
|
|
415
458
|
*/
|
|
416
459
|
name: string;
|
|
417
460
|
/**
|
|
418
461
|
* The contract symbol.
|
|
419
|
-
* @example "WAVAX"
|
|
420
462
|
*/
|
|
421
463
|
symbol: string;
|
|
422
464
|
/**
|
|
423
465
|
* The number of decimals the token uses. For example `6`,
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
* @example 18
|
|
466
|
+
* means to divide the token amount by `1000000` to get its user
|
|
467
|
+
* representation.
|
|
427
468
|
*/
|
|
428
469
|
decimals: number;
|
|
429
470
|
/**
|
|
430
471
|
* The logo uri for the address.
|
|
431
|
-
* @example "https://glacier-api.avax.network/proxy/chain-assets/main/chains/43114/token-logo.png"
|
|
432
472
|
*/
|
|
433
473
|
logoUri?: string;
|
|
434
|
-
|
|
435
|
-
}
|
|
436
|
-
interface NetworkTokenDetails {
|
|
437
|
-
networkToken: NetworkToken;
|
|
438
|
-
/** The current token price, if available. */
|
|
439
|
-
currentPrice?: Money;
|
|
474
|
+
ercType: Erc20Token.ercType;
|
|
440
475
|
/**
|
|
441
|
-
* The
|
|
442
|
-
* occured, if available. Note, this is only provided if the transaction
|
|
443
|
-
* occured more than 24 hours ago.
|
|
476
|
+
* The token price, if available.
|
|
444
477
|
*/
|
|
445
|
-
|
|
478
|
+
price?: Money;
|
|
479
|
+
};
|
|
480
|
+
declare namespace Erc20Token {
|
|
481
|
+
enum ercType {
|
|
482
|
+
ERC_20 = "ERC-20"
|
|
483
|
+
}
|
|
446
484
|
}
|
|
485
|
+
|
|
486
|
+
type Erc20TransferDetails = {
|
|
487
|
+
from: RichAddress;
|
|
488
|
+
to: RichAddress;
|
|
489
|
+
value: string;
|
|
490
|
+
erc20Token: Erc20Token;
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
type Erc721TransferDetails = {
|
|
494
|
+
from: RichAddress;
|
|
495
|
+
to: RichAddress;
|
|
496
|
+
erc721Token: Erc721Token;
|
|
497
|
+
};
|
|
498
|
+
|
|
447
499
|
declare enum TransactionMethodType {
|
|
448
500
|
NATIVE_TRANSFER = "NATIVE_TRANSFER",
|
|
449
501
|
CONTRACT_CALL = "CONTRACT_CALL",
|
|
450
502
|
CONTRACT_CREATION = "CONTRACT_CREATION"
|
|
451
503
|
}
|
|
452
|
-
|
|
504
|
+
|
|
505
|
+
type Method = {
|
|
453
506
|
/**
|
|
454
507
|
* The contract call type.
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
* @example "CONTRACT_CALL"
|
|
508
|
+
* NATIVE_TRANSFER indicates a transfer of the
|
|
509
|
+
* native token without any smart-contract interaction.
|
|
510
|
+
* CONTRACT_CALL indicates a smart-contract
|
|
511
|
+
* interaction.
|
|
512
|
+
* CONTRACT_CREATION indicates a smart-contract
|
|
513
|
+
* creation.
|
|
462
514
|
*/
|
|
463
515
|
callType: TransactionMethodType;
|
|
464
516
|
/**
|
|
465
517
|
* The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`.
|
|
466
|
-
* @example "0xa9059cbb"
|
|
467
518
|
*/
|
|
468
519
|
methodHash: string;
|
|
469
520
|
/**
|
|
470
521
|
* The contract method name including parameter types. If the `callType` is `NATIVE_TRANSFER` this is set to 'Native Transfer'. If the `callType` is `CONTRACT_CREATION` this is set to 'Contract Created'.
|
|
471
|
-
* @example "transfer(address,uint256)"
|
|
472
522
|
*/
|
|
473
523
|
methodName?: string;
|
|
474
|
-
}
|
|
475
|
-
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
type FullNativeTransactionDetails = {
|
|
476
527
|
/**
|
|
477
528
|
* The block number on the chain.
|
|
478
|
-
* @example "339"
|
|
479
529
|
*/
|
|
480
530
|
blockNumber: string;
|
|
481
531
|
/**
|
|
482
532
|
* The block finality timestamp.
|
|
483
|
-
* @example 1648672486
|
|
484
533
|
*/
|
|
485
534
|
blockTimestamp: number;
|
|
486
535
|
/**
|
|
487
536
|
* The block hash identifier.
|
|
488
|
-
* @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
|
|
489
537
|
*/
|
|
490
538
|
blockHash: string;
|
|
491
539
|
/**
|
|
492
540
|
* The index at which the transaction occured in the block (0-indexed).
|
|
493
|
-
* @example 0
|
|
494
541
|
*/
|
|
495
542
|
blockIndex: number;
|
|
496
543
|
/**
|
|
497
544
|
* The transaction hash identifier.
|
|
498
|
-
* @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
|
|
499
545
|
*/
|
|
500
546
|
txHash: string;
|
|
501
547
|
/**
|
|
502
548
|
* The transaction status, which is either 0 (failed) or 1 (successful).
|
|
503
|
-
* @example "1"
|
|
504
549
|
*/
|
|
505
550
|
txStatus: string;
|
|
506
551
|
/**
|
|
507
552
|
* The transaction type.
|
|
508
|
-
* @example 1
|
|
509
553
|
*/
|
|
510
554
|
txType: number;
|
|
511
555
|
/**
|
|
512
556
|
* The gas limit set for the transaction.
|
|
513
|
-
* @example "51373"
|
|
514
557
|
*/
|
|
515
558
|
gasLimit: string;
|
|
516
559
|
/**
|
|
517
560
|
* The amount of gas used.
|
|
518
|
-
* @example "51373"
|
|
519
561
|
*/
|
|
520
562
|
gasUsed: string;
|
|
521
563
|
/**
|
|
522
564
|
* The gas price denominated by the number of decimals of the native token.
|
|
523
|
-
* @example "470000000000"
|
|
524
565
|
*/
|
|
525
566
|
gasPrice: string;
|
|
526
567
|
/**
|
|
527
568
|
* The nonce used by the sender of the transaction.
|
|
528
|
-
* @example "1"
|
|
529
569
|
*/
|
|
530
570
|
nonce: string;
|
|
531
571
|
from: RichAddress;
|
|
532
572
|
to: RichAddress;
|
|
533
573
|
method?: Method;
|
|
534
|
-
/** @example "10000000000000000000" */
|
|
535
574
|
value: string;
|
|
536
|
-
/**
|
|
575
|
+
/**
|
|
576
|
+
* The data sent for the transaction.
|
|
577
|
+
*/
|
|
537
578
|
input: string;
|
|
538
579
|
baseFeePerGas: string;
|
|
539
580
|
maxFeePerGas?: string;
|
|
540
581
|
maxPriorityFeePerGas?: string;
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
declare enum InternalTransactionOpCall {
|
|
585
|
+
UNKNOWN = "UNKNOWN",
|
|
586
|
+
CALL = "CALL",
|
|
587
|
+
CREATE = "CREATE",
|
|
588
|
+
CREATE2 = "CREATE2",
|
|
589
|
+
CALLCODE = "CALLCODE",
|
|
590
|
+
DELEGATECALL = "DELEGATECALL",
|
|
591
|
+
STATICCALL = "STATICCALL"
|
|
541
592
|
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
erc1155Transfers?: Erc1155TransferDetails[];
|
|
593
|
+
|
|
594
|
+
type InternalTransactionDetails = {
|
|
595
|
+
from: RichAddress;
|
|
596
|
+
to: RichAddress;
|
|
597
|
+
internalTxType: InternalTransactionOpCall;
|
|
598
|
+
value: string;
|
|
549
599
|
/**
|
|
550
|
-
*
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
networkTokenDetails: NetworkTokenDetails;
|
|
560
|
-
nativeTransaction: FullNativeTransactionDetails;
|
|
561
|
-
}
|
|
562
|
-
declare enum ContractType {
|
|
563
|
-
ERC20 = "ERC-20",
|
|
564
|
-
ERC721 = "ERC-721",
|
|
565
|
-
Other = "Other"
|
|
566
|
-
}
|
|
567
|
-
declare enum AssetType {
|
|
568
|
-
FixedCap = "Fixed Cap",
|
|
569
|
-
UnlimitedCap = "Unlimited Cap",
|
|
570
|
-
Stablecoin = "Stablecoin",
|
|
571
|
-
NFT = "NFT"
|
|
572
|
-
}
|
|
573
|
-
declare enum ResourceLinkType {
|
|
574
|
-
Twitter = "Twitter",
|
|
575
|
-
Facebook = "Facebook",
|
|
576
|
-
Discord = "Discord",
|
|
577
|
-
Telegram = "Telegram",
|
|
578
|
-
Blog = "Blog",
|
|
579
|
-
Medium = "Medium",
|
|
580
|
-
Whitepaper = "Whitepaper",
|
|
581
|
-
CoinGecko = "CoinGecko",
|
|
582
|
-
CoinMarketCap = "CoinMarketCap",
|
|
583
|
-
LinkedIn = "LinkedIn",
|
|
584
|
-
Reddit = "Reddit",
|
|
585
|
-
Support = "Support",
|
|
586
|
-
Github = "Github",
|
|
587
|
-
Documentation = "Documentation"
|
|
588
|
-
}
|
|
589
|
-
interface ResourceLink {
|
|
590
|
-
type: ResourceLinkType;
|
|
591
|
-
url: string;
|
|
592
|
-
}
|
|
593
|
-
declare enum ReviewStatus {
|
|
594
|
-
Pending = "Pending",
|
|
595
|
-
Approved = "Approved"
|
|
596
|
-
}
|
|
597
|
-
interface GetContractInformationResponse {
|
|
600
|
+
* True if the internal transaction was reverted.
|
|
601
|
+
*/
|
|
602
|
+
isReverted: boolean;
|
|
603
|
+
gasUsed: string;
|
|
604
|
+
gasLimit: string;
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
type NetworkTokenDetails = {
|
|
608
|
+
networkToken: NetworkToken;
|
|
598
609
|
/**
|
|
599
|
-
*
|
|
600
|
-
* @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
610
|
+
* The current token price, if available.
|
|
601
611
|
*/
|
|
602
|
-
|
|
603
|
-
description?: string;
|
|
612
|
+
currentPrice?: Money;
|
|
604
613
|
/**
|
|
605
|
-
* The
|
|
606
|
-
*
|
|
614
|
+
* The historical token price at the time the transaction
|
|
615
|
+
* occured, if available. Note, this is only provided if the transaction
|
|
616
|
+
* occured more than 24 hours ago.
|
|
607
617
|
*/
|
|
608
|
-
|
|
618
|
+
historicalPrice?: Money;
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
type GetTransactionResponse = {
|
|
609
622
|
/**
|
|
610
|
-
* The
|
|
611
|
-
* @example "WAVAX"
|
|
623
|
+
* The list of ERC-20 transfers.
|
|
612
624
|
*/
|
|
613
|
-
|
|
614
|
-
contractType: ContractType;
|
|
615
|
-
assetType?: AssetType;
|
|
616
|
-
officialSite?: string;
|
|
617
|
-
/** Any labels given to the contract. */
|
|
618
|
-
tags?: any[][];
|
|
619
|
-
email?: string;
|
|
625
|
+
erc20Transfers?: Array<Erc20TransferDetails>;
|
|
620
626
|
/**
|
|
621
|
-
* The
|
|
622
|
-
* @example "43114"
|
|
627
|
+
* The list of ERC-721 transfers.
|
|
623
628
|
*/
|
|
624
|
-
|
|
629
|
+
erc721Transfers?: Array<Erc721TransferDetails>;
|
|
625
630
|
/**
|
|
626
|
-
* The
|
|
627
|
-
* means to divide the token amount by `1000000` to get its user
|
|
628
|
-
* representation.
|
|
629
|
-
* @example 18
|
|
631
|
+
* The list of ERC-1155 transfers.
|
|
630
632
|
*/
|
|
631
|
-
|
|
633
|
+
erc1155Transfers?: Array<Erc1155TransferDetails>;
|
|
632
634
|
/**
|
|
633
|
-
* The
|
|
634
|
-
*
|
|
635
|
+
* The list of internal transactions. Note that this list only
|
|
636
|
+
* includes CALL and
|
|
637
|
+
* CALLCODE internal transactions that had a
|
|
638
|
+
* non-zero value and
|
|
639
|
+
* CREATE/CREATE2
|
|
640
|
+
* calls. Use a client provider to recieve a full debug trace of the
|
|
641
|
+
* transaction.
|
|
642
|
+
*/
|
|
643
|
+
internalTransactions?: Array<InternalTransactionDetails>;
|
|
644
|
+
networkTokenDetails: NetworkTokenDetails;
|
|
645
|
+
nativeTransaction: FullNativeTransactionDetails;
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
type ProposerDetails = {
|
|
649
|
+
proposerId?: string;
|
|
650
|
+
proposerParentId?: string;
|
|
651
|
+
proposerNodeId?: string;
|
|
652
|
+
proposerPChainHeight?: number;
|
|
653
|
+
proposerTimestamp?: number;
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
type Block = {
|
|
657
|
+
blockNumber: string;
|
|
658
|
+
blockHash: string;
|
|
659
|
+
parentHash: string;
|
|
660
|
+
blockTimestamp: number;
|
|
661
|
+
blockType: string;
|
|
662
|
+
txCount: number;
|
|
663
|
+
transactions?: Array<string>;
|
|
664
|
+
blockSizeBytes: number;
|
|
665
|
+
proposerDetails?: ProposerDetails;
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
type ListBlocksResponse = {
|
|
669
|
+
/**
|
|
670
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
635
671
|
*/
|
|
636
|
-
|
|
672
|
+
nextPageToken?: string;
|
|
673
|
+
blocks: Array<Block>;
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
type ChainInfo = {
|
|
677
|
+
chainId: string;
|
|
678
|
+
chainName: string;
|
|
679
|
+
description: string;
|
|
680
|
+
platformChainId?: string;
|
|
681
|
+
subnetId?: string;
|
|
682
|
+
vmId?: string;
|
|
683
|
+
vmName: VmName;
|
|
684
|
+
explorerUrl?: string;
|
|
685
|
+
rpcUrl: string;
|
|
686
|
+
wsUrl?: string;
|
|
687
|
+
isTestnet: boolean;
|
|
688
|
+
utilityAddresses?: UtilityAddresses;
|
|
689
|
+
networkToken: NetworkToken;
|
|
690
|
+
chainLogoUri?: string;
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
type ListChainsResponse = {
|
|
694
|
+
chains: Array<ChainInfo>;
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
type Erc1155TokenBalance = {
|
|
637
698
|
/**
|
|
638
|
-
*
|
|
639
|
-
* @example "#d6db60"
|
|
699
|
+
* A wallet or contract address in mixed-case checksum encoding.
|
|
640
700
|
*/
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
701
|
+
address: string;
|
|
702
|
+
ercType: Erc1155TokenBalance.ercType;
|
|
703
|
+
tokenId: string;
|
|
704
|
+
tokenUri: string;
|
|
705
|
+
metadata: Erc1155TokenMetadata;
|
|
644
706
|
/**
|
|
645
|
-
*
|
|
646
|
-
* contracts will be reviewed for approval before being inserted into the
|
|
647
|
-
* Glacier repository.
|
|
707
|
+
* The evm chain id.
|
|
648
708
|
*/
|
|
649
|
-
|
|
709
|
+
chainId: string;
|
|
710
|
+
/**
|
|
711
|
+
* The address balance for the token, in units specified by the
|
|
712
|
+
* `decimals` value for the contract.
|
|
713
|
+
*/
|
|
714
|
+
balance: string;
|
|
715
|
+
};
|
|
716
|
+
declare namespace Erc1155TokenBalance {
|
|
717
|
+
enum ercType {
|
|
718
|
+
ERC_1155 = "ERC-1155"
|
|
719
|
+
}
|
|
650
720
|
}
|
|
651
|
-
|
|
721
|
+
|
|
722
|
+
type Erc721TokenBalance = {
|
|
652
723
|
/**
|
|
653
|
-
*
|
|
654
|
-
* @example "339"
|
|
724
|
+
* A wallet or contract address in mixed-case checksum encoding.
|
|
655
725
|
*/
|
|
656
|
-
|
|
726
|
+
address: string;
|
|
657
727
|
/**
|
|
658
|
-
* The
|
|
659
|
-
* @example 1648672486
|
|
728
|
+
* The contract name.
|
|
660
729
|
*/
|
|
661
|
-
|
|
730
|
+
name: string;
|
|
662
731
|
/**
|
|
663
|
-
* The
|
|
664
|
-
* @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
|
|
732
|
+
* The contract symbol.
|
|
665
733
|
*/
|
|
666
|
-
|
|
734
|
+
symbol: string;
|
|
735
|
+
ercType: Erc721TokenBalance.ercType;
|
|
736
|
+
tokenId: string;
|
|
737
|
+
tokenUri: string;
|
|
738
|
+
metadata: Erc721TokenMetadata;
|
|
667
739
|
/**
|
|
668
|
-
* The
|
|
669
|
-
* @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
|
|
740
|
+
* The evm chain id.
|
|
670
741
|
*/
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
742
|
+
chainId: string;
|
|
743
|
+
};
|
|
744
|
+
declare namespace Erc721TokenBalance {
|
|
745
|
+
enum ercType {
|
|
746
|
+
ERC_721 = "ERC-721"
|
|
747
|
+
}
|
|
677
748
|
}
|
|
678
|
-
|
|
749
|
+
|
|
750
|
+
type ListCollectibleBalancesResponse = {
|
|
679
751
|
/**
|
|
680
|
-
*
|
|
681
|
-
* @example "339"
|
|
752
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
682
753
|
*/
|
|
683
|
-
|
|
754
|
+
nextPageToken?: string;
|
|
684
755
|
/**
|
|
685
|
-
* The
|
|
686
|
-
*
|
|
756
|
+
* The list of ERC-721 and ERC-1155 token balances for the
|
|
757
|
+
* address.
|
|
687
758
|
*/
|
|
688
|
-
|
|
759
|
+
collectibleBalances: Array<(Erc721TokenBalance | Erc1155TokenBalance)>;
|
|
760
|
+
};
|
|
761
|
+
|
|
762
|
+
type ListErc1155BalancesResponse = {
|
|
689
763
|
/**
|
|
690
|
-
*
|
|
691
|
-
* @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
|
|
764
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
692
765
|
*/
|
|
693
|
-
|
|
766
|
+
nextPageToken?: string;
|
|
694
767
|
/**
|
|
695
|
-
* The
|
|
696
|
-
* @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
|
|
768
|
+
* The list of ERC-1155 token balances for the address.
|
|
697
769
|
*/
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}
|
|
703
|
-
interface Erc1155Transfer {
|
|
770
|
+
erc1155TokenBalances: Array<Erc1155TokenBalance>;
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
type Erc1155Transfer = {
|
|
704
774
|
/**
|
|
705
775
|
* The block number on the chain.
|
|
706
|
-
* @example "339"
|
|
707
776
|
*/
|
|
708
777
|
blockNumber: string;
|
|
709
778
|
/**
|
|
710
779
|
* The block finality timestamp.
|
|
711
|
-
* @example 1648672486
|
|
712
780
|
*/
|
|
713
781
|
blockTimestamp: number;
|
|
714
782
|
/**
|
|
715
783
|
* The block hash identifier.
|
|
716
|
-
* @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
|
|
717
784
|
*/
|
|
718
785
|
blockHash: string;
|
|
719
786
|
/**
|
|
720
787
|
* The transaction hash identifier.
|
|
721
|
-
* @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
|
|
722
788
|
*/
|
|
723
789
|
txHash: string;
|
|
724
790
|
from: RichAddress;
|
|
725
791
|
to: RichAddress;
|
|
726
|
-
/** @example "10000000000000000000" */
|
|
727
792
|
value: string;
|
|
728
793
|
erc1155Token: Erc1155Token;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
nextPageToken?: string;
|
|
733
|
-
transfers: Erc20Transfer[] | Erc721Transfer[] | Erc1155Transfer[];
|
|
734
|
-
}
|
|
735
|
-
interface NativeTransaction {
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
type ListErc1155TransactionsResponse = {
|
|
736
797
|
/**
|
|
737
|
-
*
|
|
738
|
-
* @example "339"
|
|
798
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
739
799
|
*/
|
|
740
|
-
|
|
800
|
+
nextPageToken?: string;
|
|
801
|
+
transactions: Array<Erc1155Transfer>;
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
type Erc20TokenBalance = {
|
|
741
805
|
/**
|
|
742
|
-
*
|
|
743
|
-
* @example 1648672486
|
|
806
|
+
* A wallet or contract address in mixed-case checksum encoding.
|
|
744
807
|
*/
|
|
745
|
-
|
|
808
|
+
address: string;
|
|
746
809
|
/**
|
|
747
|
-
* The
|
|
748
|
-
* @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
|
|
810
|
+
* The contract name.
|
|
749
811
|
*/
|
|
750
|
-
|
|
812
|
+
name: string;
|
|
751
813
|
/**
|
|
752
|
-
* The
|
|
753
|
-
* @example 0
|
|
814
|
+
* The contract symbol.
|
|
754
815
|
*/
|
|
755
|
-
|
|
816
|
+
symbol: string;
|
|
756
817
|
/**
|
|
757
|
-
* The
|
|
758
|
-
*
|
|
818
|
+
* The number of decimals the token uses. For example `6`,
|
|
819
|
+
* means to divide the token amount by `1000000` to get its user
|
|
820
|
+
* representation.
|
|
759
821
|
*/
|
|
760
|
-
|
|
822
|
+
decimals: number;
|
|
761
823
|
/**
|
|
762
|
-
* The
|
|
763
|
-
* @example "1"
|
|
824
|
+
* The logo uri for the address.
|
|
764
825
|
*/
|
|
765
|
-
|
|
826
|
+
logoUri?: string;
|
|
827
|
+
ercType: Erc20TokenBalance.ercType;
|
|
766
828
|
/**
|
|
767
|
-
* The
|
|
768
|
-
* @example 1
|
|
769
|
-
*/
|
|
770
|
-
txType: number;
|
|
771
|
-
/**
|
|
772
|
-
* The gas limit set for the transaction.
|
|
773
|
-
* @example "51373"
|
|
829
|
+
* The token price, if available.
|
|
774
830
|
*/
|
|
775
|
-
|
|
831
|
+
price?: Money;
|
|
776
832
|
/**
|
|
777
|
-
* The
|
|
778
|
-
* @example "51373"
|
|
833
|
+
* The evm chain id.
|
|
779
834
|
*/
|
|
780
|
-
|
|
835
|
+
chainId: string;
|
|
781
836
|
/**
|
|
782
|
-
* The
|
|
783
|
-
*
|
|
837
|
+
* The address balance for the token, in units specified by the
|
|
838
|
+
* `decimals` value for the contract.
|
|
784
839
|
*/
|
|
785
|
-
|
|
840
|
+
balance: string;
|
|
786
841
|
/**
|
|
787
|
-
* The
|
|
788
|
-
* @example "1"
|
|
842
|
+
* The monetary value of the balance, if a price is available for the token.
|
|
789
843
|
*/
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
844
|
+
balanceValue?: Money;
|
|
845
|
+
};
|
|
846
|
+
declare namespace Erc20TokenBalance {
|
|
847
|
+
enum ercType {
|
|
848
|
+
ERC_20 = "ERC-20"
|
|
849
|
+
}
|
|
796
850
|
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
nativeTransaction: NativeTransaction;
|
|
800
|
-
/** The list of ERC-20 transfers. */
|
|
801
|
-
erc20Transfers?: Erc20TransferDetails[];
|
|
802
|
-
/** The list of ERC-721 transfers. */
|
|
803
|
-
erc721Transfers?: Erc721TransferDetails[];
|
|
804
|
-
/** The list of ERC-1155 transfers. */
|
|
805
|
-
erc1155Transfers?: Erc1155TransferDetails[];
|
|
851
|
+
|
|
852
|
+
type ListErc20BalancesResponse = {
|
|
806
853
|
/**
|
|
807
|
-
*
|
|
808
|
-
|
|
809
|
-
* CALLCODE internal transactions that had a
|
|
810
|
-
* non-zero value and
|
|
811
|
-
* CREATE/CREATE2
|
|
812
|
-
* calls. Use a client provider to recieve a full debug trace of the
|
|
813
|
-
* transaction.
|
|
814
|
-
*/
|
|
815
|
-
internalTransactions?: InternalTransactionDetails[];
|
|
816
|
-
}
|
|
817
|
-
interface ListTransactionDetailsResponse {
|
|
818
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
819
|
-
nextPageToken?: string;
|
|
820
|
-
transactions: TransactionDetails[];
|
|
821
|
-
}
|
|
822
|
-
interface ListNativeTransactionsResponse {
|
|
823
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
824
|
-
nextPageToken?: string;
|
|
825
|
-
transactions: NativeTransaction[];
|
|
826
|
-
}
|
|
827
|
-
interface ListErc20TransactionsResponse {
|
|
828
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
829
|
-
nextPageToken?: string;
|
|
830
|
-
transactions: Erc20Transfer[];
|
|
831
|
-
}
|
|
832
|
-
interface ListErc721TransactionsResponse {
|
|
833
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
834
|
-
nextPageToken?: string;
|
|
835
|
-
transactions: Erc721Transfer[];
|
|
836
|
-
}
|
|
837
|
-
interface ListErc1155TransactionsResponse {
|
|
838
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
854
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
855
|
+
*/
|
|
839
856
|
nextPageToken?: string;
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
857
|
+
/**
|
|
858
|
+
* The list of ERC-20 token balances for the address.
|
|
859
|
+
*/
|
|
860
|
+
erc20TokenBalances: Array<Erc20TokenBalance>;
|
|
861
|
+
};
|
|
862
|
+
|
|
863
|
+
type Erc20Transfer = {
|
|
843
864
|
/**
|
|
844
865
|
* The block number on the chain.
|
|
845
|
-
* @example "339"
|
|
846
866
|
*/
|
|
847
867
|
blockNumber: string;
|
|
848
868
|
/**
|
|
849
869
|
* The block finality timestamp.
|
|
850
|
-
* @example 1648672486
|
|
851
870
|
*/
|
|
852
871
|
blockTimestamp: number;
|
|
853
872
|
/**
|
|
854
873
|
* The block hash identifier.
|
|
855
|
-
* @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
|
|
856
874
|
*/
|
|
857
875
|
blockHash: string;
|
|
858
876
|
/**
|
|
859
877
|
* The transaction hash identifier.
|
|
860
|
-
* @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
|
|
861
878
|
*/
|
|
862
879
|
txHash: string;
|
|
863
880
|
from: RichAddress;
|
|
864
881
|
to: RichAddress;
|
|
865
|
-
internalTxType: InternalTransactionOpCall;
|
|
866
|
-
/** @example "10000000000000000000" */
|
|
867
882
|
value: string;
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
883
|
+
erc20Token: Erc20Token;
|
|
884
|
+
};
|
|
885
|
+
|
|
886
|
+
type ListErc20TransactionsResponse = {
|
|
887
|
+
/**
|
|
888
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
889
|
+
*/
|
|
875
890
|
nextPageToken?: string;
|
|
876
|
-
transactions:
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
Success = "success"
|
|
881
|
-
}
|
|
882
|
-
declare enum VmName {
|
|
883
|
-
EVM = "EVM",
|
|
884
|
-
BITCOIN = "BITCOIN",
|
|
885
|
-
ETHEREUM = "ETHEREUM"
|
|
886
|
-
}
|
|
887
|
-
interface UtilityAddresses {
|
|
888
|
-
multicall?: string;
|
|
889
|
-
}
|
|
890
|
-
interface ChainInfo {
|
|
891
|
-
chainId: string;
|
|
892
|
-
chainName: string;
|
|
893
|
-
description: string;
|
|
894
|
-
platformChainId?: string;
|
|
895
|
-
subnetId?: string;
|
|
896
|
-
vmId?: string;
|
|
897
|
-
vmName: VmName;
|
|
898
|
-
explorerUrl?: string;
|
|
899
|
-
rpcUrl: string;
|
|
900
|
-
wsUrl?: string;
|
|
901
|
-
isTestnet: boolean;
|
|
902
|
-
utilityAddresses?: UtilityAddresses;
|
|
903
|
-
networkToken: NetworkToken;
|
|
904
|
-
chainLogoUri?: string;
|
|
905
|
-
}
|
|
906
|
-
interface ListChainsResponse {
|
|
907
|
-
chains: ChainInfo[];
|
|
908
|
-
}
|
|
909
|
-
interface GetChainResponse {
|
|
910
|
-
chainId: string;
|
|
911
|
-
chainName: string;
|
|
912
|
-
description: string;
|
|
913
|
-
platformChainId?: string;
|
|
914
|
-
subnetId?: string;
|
|
915
|
-
vmId?: string;
|
|
916
|
-
vmName: VmName;
|
|
917
|
-
explorerUrl?: string;
|
|
918
|
-
rpcUrl: string;
|
|
919
|
-
wsUrl?: string;
|
|
920
|
-
isTestnet: boolean;
|
|
921
|
-
utilityAddresses?: UtilityAddresses;
|
|
922
|
-
networkToken: NetworkToken;
|
|
923
|
-
chainLogoUri?: string;
|
|
924
|
-
}
|
|
925
|
-
declare enum BlockchainId {
|
|
926
|
-
Value11111111111111111111111111111111LpoYY = "11111111111111111111111111111111LpoYY",
|
|
927
|
-
Value2OYMBNV4ENHyqk2FjjV5NVQLDbtmNJzq5S3Qs3Lo6FtnC6FByM = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM"
|
|
928
|
-
}
|
|
929
|
-
declare enum Network {
|
|
930
|
-
Mainnet = "mainnet",
|
|
931
|
-
Fuji = "fuji"
|
|
932
|
-
}
|
|
933
|
-
interface PChainConsumedUtxo {
|
|
934
|
-
addresses: string[];
|
|
935
|
-
amount: string;
|
|
936
|
-
assetId: string;
|
|
937
|
-
utxoId: string;
|
|
938
|
-
fromTx: string;
|
|
939
|
-
}
|
|
940
|
-
interface PChainEmittedUtxo {
|
|
941
|
-
addresses: string[];
|
|
942
|
-
amount: string;
|
|
943
|
-
assetId: string;
|
|
944
|
-
utxoId: string;
|
|
945
|
-
staked: boolean;
|
|
946
|
-
/** This field is only present if the UTXO has been consumed by another transaction. */
|
|
947
|
-
toTx?: string;
|
|
948
|
-
}
|
|
949
|
-
interface PChainAsset {
|
|
950
|
-
assetId: string;
|
|
951
|
-
amount: string;
|
|
952
|
-
}
|
|
953
|
-
interface GetPChainTransactionResponse {
|
|
891
|
+
transactions: Array<Erc20Transfer>;
|
|
892
|
+
};
|
|
893
|
+
|
|
894
|
+
type ListErc721BalancesResponse = {
|
|
954
895
|
/**
|
|
955
|
-
* A
|
|
956
|
-
* @example "3P91K6nuDFvDodcRuJTsgdf9SvYe5pMiKk38HppsoeAiEztCP"
|
|
896
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
957
897
|
*/
|
|
958
|
-
|
|
959
|
-
txType: string;
|
|
898
|
+
nextPageToken?: string;
|
|
960
899
|
/**
|
|
961
|
-
* The
|
|
962
|
-
* @example 1648672486
|
|
900
|
+
* The list of ERC-721 token balances for the address.
|
|
963
901
|
*/
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
902
|
+
erc721TokenBalances: Array<Erc721TokenBalance>;
|
|
903
|
+
};
|
|
904
|
+
|
|
905
|
+
type Erc721Transfer = {
|
|
967
906
|
/**
|
|
968
|
-
*
|
|
969
|
-
* @example [{"fromTx":"2PcqHRFugJdjDApByTFFUaNpKkjPnUa4QKX4pzgZWJwcVwQWaC","addresses":["avax19wf84mm09uxld37v6sgky6l7028pr092l0g6tv"],"amount":"22500000000000","assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","utxoId":"17zW4hNQ3SWW7jvq2mv4ausNZN8Zt6MiaTALDcDkydrDsyPod"}]
|
|
907
|
+
* The block number on the chain.
|
|
970
908
|
*/
|
|
971
|
-
|
|
909
|
+
blockNumber: string;
|
|
972
910
|
/**
|
|
973
|
-
*
|
|
974
|
-
* @example [{"toTx":"2PcqHRFugJdjDApByTFFUaNpKkjPnUa4QKX4pzgZWJwcVwQWaC","addresses":["avax19wf84mm09uxld37v6sgky6l7028pr092l0g6tv"],"amount":"22500000000000","assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","utxoId":"17zW4hNQ3SWW7jvq2mv4ausNZN8Zt6MiaTALDcDkydrDsyPod"}]
|
|
911
|
+
* The block finality timestamp.
|
|
975
912
|
*/
|
|
976
|
-
|
|
913
|
+
blockTimestamp: number;
|
|
977
914
|
/**
|
|
978
|
-
*
|
|
979
|
-
* @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
|
|
915
|
+
* The block hash identifier.
|
|
980
916
|
*/
|
|
981
|
-
|
|
917
|
+
blockHash: string;
|
|
982
918
|
/**
|
|
983
|
-
*
|
|
984
|
-
* @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
|
|
919
|
+
* The transaction hash identifier.
|
|
985
920
|
*/
|
|
986
|
-
|
|
921
|
+
txHash: string;
|
|
922
|
+
from: RichAddress;
|
|
923
|
+
to: RichAddress;
|
|
924
|
+
erc721Token: Erc721Token;
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
type ListErc721TransactionsResponse = {
|
|
987
928
|
/**
|
|
988
|
-
* A
|
|
989
|
-
* @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
|
|
929
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
990
930
|
*/
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
931
|
+
nextPageToken?: string;
|
|
932
|
+
transactions: Array<Erc721Transfer>;
|
|
933
|
+
};
|
|
934
|
+
|
|
935
|
+
declare enum ListingEventType {
|
|
936
|
+
OPEN_LISTING = "OPEN_LISTING",
|
|
937
|
+
CANCEL_LISTING = "CANCEL_LISTING",
|
|
938
|
+
PURCHASE_LISTING = "PURCHASE_LISTING",
|
|
939
|
+
CLOSE_AUCTION = "CLOSE_AUCTION"
|
|
998
940
|
}
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
941
|
+
|
|
942
|
+
declare enum ListingsSortByOption {
|
|
943
|
+
LAST_EVENT_TIMESTAMP = "lastEventTimestamp"
|
|
1002
944
|
}
|
|
1003
|
-
|
|
945
|
+
|
|
946
|
+
type InternalTransaction = {
|
|
1004
947
|
/**
|
|
1005
|
-
*
|
|
1006
|
-
* @example "3P91K6nuDFvDodcRuJTsgdf9SvYe5pMiKk38HppsoeAiEztCP"
|
|
948
|
+
* The block number on the chain.
|
|
1007
949
|
*/
|
|
1008
|
-
|
|
1009
|
-
txType: string;
|
|
950
|
+
blockNumber: string;
|
|
1010
951
|
/**
|
|
1011
952
|
* The block finality timestamp.
|
|
1012
|
-
* @example 1648672486
|
|
1013
953
|
*/
|
|
1014
954
|
blockTimestamp: number;
|
|
1015
|
-
blockNumber: string;
|
|
1016
|
-
blockHash: string;
|
|
1017
|
-
/**
|
|
1018
|
-
* A list of objects containing consumed UTXO info pertaining to a given transaction.
|
|
1019
|
-
* @example [{"fromTx":"2PcqHRFugJdjDApByTFFUaNpKkjPnUa4QKX4pzgZWJwcVwQWaC","addresses":["avax19wf84mm09uxld37v6sgky6l7028pr092l0g6tv"],"amount":"22500000000000","assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","utxoId":"17zW4hNQ3SWW7jvq2mv4ausNZN8Zt6MiaTALDcDkydrDsyPod"}]
|
|
1020
|
-
*/
|
|
1021
|
-
consumedUtxos?: PChainConsumedUtxo[];
|
|
1022
|
-
/**
|
|
1023
|
-
* A list of objects containing emitted UTXO info pertaining to a given transaction.
|
|
1024
|
-
* @example [{"toTx":"2PcqHRFugJdjDApByTFFUaNpKkjPnUa4QKX4pzgZWJwcVwQWaC","addresses":["avax19wf84mm09uxld37v6sgky6l7028pr092l0g6tv"],"amount":"22500000000000","assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","utxoId":"17zW4hNQ3SWW7jvq2mv4ausNZN8Zt6MiaTALDcDkydrDsyPod"}]
|
|
1025
|
-
*/
|
|
1026
|
-
emittedUtxos?: PChainEmittedUtxo[];
|
|
1027
955
|
/**
|
|
1028
|
-
*
|
|
1029
|
-
* @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
|
|
1030
|
-
*/
|
|
1031
|
-
value?: PChainAsset[];
|
|
1032
|
-
/**
|
|
1033
|
-
* A list of objects containing Asset ID and the amount of that Asset ID.
|
|
1034
|
-
* @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
|
|
1035
|
-
*/
|
|
1036
|
-
amountBurned?: PChainAsset[];
|
|
1037
|
-
/**
|
|
1038
|
-
* A list of objects containing Asset ID and the amount of that Asset ID.
|
|
1039
|
-
* @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
|
|
956
|
+
* The block hash identifier.
|
|
1040
957
|
*/
|
|
1041
|
-
|
|
1042
|
-
startTimestamp?: number;
|
|
1043
|
-
endTimestamp?: number;
|
|
1044
|
-
delegationFeePercent?: string;
|
|
1045
|
-
nodeId?: string;
|
|
1046
|
-
subnetId?: string;
|
|
1047
|
-
estimatedReward?: string;
|
|
1048
|
-
}
|
|
1049
|
-
interface ListPChainTransactionsResponse {
|
|
1050
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
1051
|
-
nextPageToken?: string;
|
|
1052
|
-
transactions: PChainTransaction[];
|
|
1053
|
-
}
|
|
1054
|
-
interface PChainUtxo {
|
|
958
|
+
blockHash: string;
|
|
1055
959
|
/**
|
|
1056
|
-
*
|
|
1057
|
-
* @example ["avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg"]
|
|
960
|
+
* The transaction hash identifier.
|
|
1058
961
|
*/
|
|
1059
|
-
addresses: string[];
|
|
1060
|
-
utxoId: string;
|
|
1061
962
|
txHash: string;
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
assetId: string;
|
|
1067
|
-
utxoType: string;
|
|
1068
|
-
amount: string;
|
|
1069
|
-
stakeableLocktime?: number;
|
|
1070
|
-
platformLocktime?: number;
|
|
1071
|
-
threshold?: number;
|
|
1072
|
-
}
|
|
1073
|
-
interface ListPChainUtxosResponse {
|
|
1074
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
1075
|
-
nextPageToken?: string;
|
|
1076
|
-
utxos: PChainUtxo[];
|
|
1077
|
-
}
|
|
1078
|
-
interface PChainBalance {
|
|
1079
|
-
/**
|
|
1080
|
-
* A list of objects containing Asset ID and the amount of that Asset ID.
|
|
1081
|
-
* @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
|
|
1082
|
-
*/
|
|
1083
|
-
unlockedUnstaked?: PChainAsset[];
|
|
1084
|
-
/**
|
|
1085
|
-
* A list of objects containing Asset ID and the amount of that Asset ID.
|
|
1086
|
-
* @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
|
|
1087
|
-
*/
|
|
1088
|
-
unlockedStaked?: PChainAsset[];
|
|
963
|
+
from: RichAddress;
|
|
964
|
+
to: RichAddress;
|
|
965
|
+
internalTxType: InternalTransactionOpCall;
|
|
966
|
+
value: string;
|
|
1089
967
|
/**
|
|
1090
|
-
*
|
|
1091
|
-
* @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
|
|
968
|
+
* True if the internal transaction was reverted.
|
|
1092
969
|
*/
|
|
1093
|
-
|
|
970
|
+
isReverted: boolean;
|
|
971
|
+
gasUsed: string;
|
|
972
|
+
gasLimit: string;
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
type ListInternalTransactionsResponse = {
|
|
1094
976
|
/**
|
|
1095
|
-
* A
|
|
1096
|
-
* @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
|
|
977
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
1097
978
|
*/
|
|
1098
|
-
lockedStaked?: PChainAsset[];
|
|
1099
|
-
}
|
|
1100
|
-
interface ListPChainBalancesResponse {
|
|
1101
|
-
balances: PChainBalance;
|
|
1102
|
-
}
|
|
1103
|
-
interface ProposerDetails {
|
|
1104
|
-
proposerId?: string;
|
|
1105
|
-
proposerParentId?: string;
|
|
1106
|
-
proposerNodeId?: string;
|
|
1107
|
-
proposerPChainHeight?: number;
|
|
1108
|
-
proposerTimestamp?: number;
|
|
1109
|
-
}
|
|
1110
|
-
interface GetPChainBlockResponse {
|
|
1111
|
-
blockNumber: string;
|
|
1112
|
-
blockHash: string;
|
|
1113
|
-
parentHash: string;
|
|
1114
|
-
blockTimestamp: number;
|
|
1115
|
-
blockType: string;
|
|
1116
|
-
txCount: number;
|
|
1117
|
-
transactions?: string[];
|
|
1118
|
-
blockSizeBytes: number;
|
|
1119
|
-
proposerDetails?: ProposerDetails;
|
|
1120
|
-
}
|
|
1121
|
-
interface PChainBlock {
|
|
1122
|
-
blockNumber: string;
|
|
1123
|
-
blockHash: string;
|
|
1124
|
-
parentHash: string;
|
|
1125
|
-
blockTimestamp: number;
|
|
1126
|
-
blockType: string;
|
|
1127
|
-
txCount: number;
|
|
1128
|
-
transactions?: string[];
|
|
1129
|
-
blockSizeBytes: number;
|
|
1130
|
-
proposerDetails?: ProposerDetails;
|
|
1131
|
-
}
|
|
1132
|
-
interface ListPChainBlocksResponse {
|
|
1133
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
1134
|
-
nextPageToken?: string;
|
|
1135
|
-
blocks: PChainBlock[];
|
|
1136
|
-
}
|
|
1137
|
-
interface XChainVertex {
|
|
1138
|
-
vertexHash: string;
|
|
1139
|
-
parents: string[];
|
|
1140
|
-
vertexHeight: number;
|
|
1141
|
-
vertexIndex: number;
|
|
1142
|
-
blockchainId: string;
|
|
1143
|
-
networkId: number;
|
|
1144
|
-
vertexTimestamp: number;
|
|
1145
|
-
txCount: number;
|
|
1146
|
-
transactions: string[];
|
|
1147
|
-
vertexSize: number;
|
|
1148
|
-
}
|
|
1149
|
-
interface ListXChainVerticesResponse {
|
|
1150
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
1151
979
|
nextPageToken?: string;
|
|
1152
|
-
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
980
|
+
transactions: Array<InternalTransaction>;
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
type CancelListingEventResponse = {
|
|
984
|
+
eventTimestamp: number;
|
|
985
|
+
};
|
|
986
|
+
|
|
987
|
+
type CloseAuctionEventResponse = {
|
|
988
|
+
eventTimestamp: number;
|
|
989
|
+
purchaseTxHash?: string;
|
|
990
|
+
};
|
|
991
|
+
|
|
1161
992
|
declare enum ErcType {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
993
|
+
ERC_20 = "ERC-20",
|
|
994
|
+
ERC_721 = "ERC-721",
|
|
995
|
+
ERC_1155 = "ERC-1155",
|
|
996
|
+
UNKNOWN = "UNKNOWN"
|
|
1165
997
|
}
|
|
1166
|
-
|
|
998
|
+
|
|
999
|
+
type NftCollection = {
|
|
1167
1000
|
/**
|
|
1168
1001
|
* A wallet or contract address in mixed-case checksum encoding.
|
|
1169
|
-
* @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
1170
1002
|
*/
|
|
1171
1003
|
address: string;
|
|
1172
1004
|
/**
|
|
1173
1005
|
* The contract name.
|
|
1174
|
-
* @example "Wrapped AVAX"
|
|
1175
1006
|
*/
|
|
1176
1007
|
name: string;
|
|
1177
1008
|
/**
|
|
1178
1009
|
* The contract symbol.
|
|
1179
|
-
* @example "WAVAX"
|
|
1180
1010
|
*/
|
|
1181
1011
|
symbol: string;
|
|
1182
1012
|
ercType: ErcType;
|
|
1183
1013
|
bannerUri?: string;
|
|
1184
1014
|
logoUri?: string;
|
|
1185
1015
|
description?: string;
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
}
|
|
1190
|
-
interface Address {
|
|
1016
|
+
};
|
|
1017
|
+
|
|
1018
|
+
type Address = {
|
|
1191
1019
|
/**
|
|
1192
1020
|
* A wallet or contract address in mixed-case checksum encoding.
|
|
1193
|
-
* @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
1194
1021
|
*/
|
|
1195
1022
|
address: string;
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
SALE = "SALE",
|
|
1199
|
-
AUCTION = "AUCTION"
|
|
1200
|
-
}
|
|
1023
|
+
};
|
|
1024
|
+
|
|
1201
1025
|
declare enum ListingCurrencyType {
|
|
1202
1026
|
NATIVE = "NATIVE",
|
|
1203
1027
|
ERC20 = "ERC20"
|
|
1204
1028
|
}
|
|
1205
|
-
|
|
1029
|
+
|
|
1030
|
+
declare enum ListingType {
|
|
1031
|
+
SALE = "SALE",
|
|
1032
|
+
AUCTION = "AUCTION"
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
type TokenWithPrice = {
|
|
1206
1036
|
/**
|
|
1207
1037
|
* A wallet or contract address in mixed-case checksum encoding.
|
|
1208
|
-
* @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
1209
1038
|
*/
|
|
1210
1039
|
address?: string;
|
|
1211
1040
|
/**
|
|
1212
1041
|
* The contract name.
|
|
1213
|
-
* @example "Wrapped AVAX"
|
|
1214
1042
|
*/
|
|
1215
1043
|
name: string;
|
|
1216
1044
|
/**
|
|
1217
1045
|
* The contract symbol.
|
|
1218
|
-
* @example "WAVAX"
|
|
1219
1046
|
*/
|
|
1220
1047
|
symbol: string;
|
|
1221
1048
|
/**
|
|
1222
1049
|
* The number of decimals the token uses. For example `6`,
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
1225
|
-
* @example 18
|
|
1050
|
+
* means to divide the token amount by `1000000` to get its user
|
|
1051
|
+
* representation.
|
|
1226
1052
|
*/
|
|
1227
1053
|
decimals: number;
|
|
1228
|
-
/**
|
|
1054
|
+
/**
|
|
1055
|
+
* The token price, if available.
|
|
1056
|
+
*/
|
|
1229
1057
|
price?: Money;
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1058
|
+
};
|
|
1059
|
+
|
|
1060
|
+
type OpenListingEventResponse = {
|
|
1232
1061
|
eventTimestamp: number;
|
|
1233
1062
|
listingType: ListingType;
|
|
1234
1063
|
listingPrice?: string;
|
|
@@ -1237,11 +1066,9 @@ interface OpenListingEventResponse {
|
|
|
1237
1066
|
sellerAddress: Address;
|
|
1238
1067
|
startingPrice?: string;
|
|
1239
1068
|
auctionCloseTimestamp?: number;
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
}
|
|
1244
|
-
interface PurchaseListingEventResponse {
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
type PurchaseListingEventResponse = {
|
|
1245
1072
|
eventTimestamp: number;
|
|
1246
1073
|
listingPrice: string;
|
|
1247
1074
|
listingCurrencyType: ListingCurrencyType;
|
|
@@ -1251,239 +1078,2014 @@ interface PurchaseListingEventResponse {
|
|
|
1251
1078
|
buyerAddress: Address;
|
|
1252
1079
|
saleTimestamp: number;
|
|
1253
1080
|
purchaseTxHash?: string;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
purchaseTxHash?: string;
|
|
1258
|
-
}
|
|
1259
|
-
interface ListingResponse {
|
|
1081
|
+
};
|
|
1082
|
+
|
|
1083
|
+
type ListingResponse = {
|
|
1260
1084
|
marketplaceName: string;
|
|
1261
1085
|
chainId: string;
|
|
1262
|
-
|
|
1263
|
-
|
|
1086
|
+
collection: NftCollection;
|
|
1087
|
+
token: any;
|
|
1264
1088
|
listingId: string;
|
|
1265
|
-
openListingEvents?: OpenListingEventResponse
|
|
1266
|
-
cancelListingEvents?: CancelListingEventResponse
|
|
1267
|
-
purchaseListingEvents?: PurchaseListingEventResponse
|
|
1268
|
-
closeAuctionEvents?: CloseAuctionEventResponse
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1089
|
+
openListingEvents?: Array<OpenListingEventResponse>;
|
|
1090
|
+
cancelListingEvents?: Array<CancelListingEventResponse>;
|
|
1091
|
+
purchaseListingEvents?: Array<PurchaseListingEventResponse>;
|
|
1092
|
+
closeAuctionEvents?: Array<CloseAuctionEventResponse>;
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
type ListListingsResponse = {
|
|
1096
|
+
/**
|
|
1097
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
1098
|
+
*/
|
|
1272
1099
|
nextPageToken?: string;
|
|
1273
|
-
listings: ListingResponse
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
CANCEL_LISTING = "CANCEL_LISTING",
|
|
1278
|
-
PURCHASE_LISTING = "PURCHASE_LISTING",
|
|
1279
|
-
CLOSE_AUCTION = "CLOSE_AUCTION"
|
|
1280
|
-
}
|
|
1281
|
-
declare enum TrendingTimeframe {
|
|
1282
|
-
Day = "day",
|
|
1283
|
-
Week = "week",
|
|
1284
|
-
Month = "month"
|
|
1285
|
-
}
|
|
1286
|
-
interface ListingMetricsResponse {
|
|
1287
|
-
listingCurrencyType: ListingCurrencyType;
|
|
1100
|
+
listings: Array<ListingResponse>;
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1103
|
+
type NativeTransaction = {
|
|
1288
1104
|
/**
|
|
1289
|
-
*
|
|
1290
|
-
|
|
1105
|
+
* The block number on the chain.
|
|
1106
|
+
*/
|
|
1107
|
+
blockNumber: string;
|
|
1108
|
+
/**
|
|
1109
|
+
* The block finality timestamp.
|
|
1110
|
+
*/
|
|
1111
|
+
blockTimestamp: number;
|
|
1112
|
+
/**
|
|
1113
|
+
* The block hash identifier.
|
|
1114
|
+
*/
|
|
1115
|
+
blockHash: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* The index at which the transaction occured in the block (0-indexed).
|
|
1118
|
+
*/
|
|
1119
|
+
blockIndex: number;
|
|
1120
|
+
/**
|
|
1121
|
+
* The transaction hash identifier.
|
|
1122
|
+
*/
|
|
1123
|
+
txHash: string;
|
|
1124
|
+
/**
|
|
1125
|
+
* The transaction status, which is either 0 (failed) or 1 (successful).
|
|
1126
|
+
*/
|
|
1127
|
+
txStatus: string;
|
|
1128
|
+
/**
|
|
1129
|
+
* The transaction type.
|
|
1130
|
+
*/
|
|
1131
|
+
txType: number;
|
|
1132
|
+
/**
|
|
1133
|
+
* The gas limit set for the transaction.
|
|
1134
|
+
*/
|
|
1135
|
+
gasLimit: string;
|
|
1136
|
+
/**
|
|
1137
|
+
* The amount of gas used.
|
|
1138
|
+
*/
|
|
1139
|
+
gasUsed: string;
|
|
1140
|
+
/**
|
|
1141
|
+
* The gas price denominated by the number of decimals of the native token.
|
|
1142
|
+
*/
|
|
1143
|
+
gasPrice: string;
|
|
1144
|
+
/**
|
|
1145
|
+
* The nonce used by the sender of the transaction.
|
|
1146
|
+
*/
|
|
1147
|
+
nonce: string;
|
|
1148
|
+
from: RichAddress;
|
|
1149
|
+
to: RichAddress;
|
|
1150
|
+
method?: Method;
|
|
1151
|
+
value: string;
|
|
1152
|
+
};
|
|
1153
|
+
|
|
1154
|
+
type ListNativeTransactionsResponse = {
|
|
1155
|
+
/**
|
|
1156
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
1157
|
+
*/
|
|
1158
|
+
nextPageToken?: string;
|
|
1159
|
+
transactions: Array<NativeTransaction>;
|
|
1160
|
+
};
|
|
1161
|
+
|
|
1162
|
+
type CollectionMetrics = {
|
|
1163
|
+
/**
|
|
1164
|
+
* The timeframe used to calculate the metrics
|
|
1165
|
+
*/
|
|
1166
|
+
timeframe: string;
|
|
1167
|
+
/**
|
|
1168
|
+
* The number of sales between (now) & (now - timeframe)
|
|
1291
1169
|
*/
|
|
1292
|
-
listingCurrencyAddress?: string;
|
|
1293
|
-
/** The number of sales between (now) & (now - timeframe) */
|
|
1294
1170
|
salesInTimeframe: number;
|
|
1295
|
-
/**
|
|
1171
|
+
/**
|
|
1172
|
+
* The number of sales between (now - timeframe) & (now - (2 * timeframe))
|
|
1173
|
+
*/
|
|
1296
1174
|
salesInPreviousTimeframe: number;
|
|
1297
|
-
/**
|
|
1175
|
+
/**
|
|
1176
|
+
* The total value of sales between (now) & (now - timeframe)
|
|
1177
|
+
*/
|
|
1298
1178
|
totalValueInTimeframe: string;
|
|
1299
|
-
/**
|
|
1179
|
+
/**
|
|
1180
|
+
* The total value of sales between (now - timeframe) & (now - (2 * timeframe))
|
|
1181
|
+
*/
|
|
1300
1182
|
totalValueInPreviousTimeframe: string;
|
|
1301
|
-
/**
|
|
1183
|
+
/**
|
|
1184
|
+
* The change in volume between (now) & (now - timeframe)
|
|
1185
|
+
*/
|
|
1186
|
+
volumeChange?: number;
|
|
1187
|
+
/**
|
|
1188
|
+
* The average sale price for sales between (now) & (now - timeframe)
|
|
1189
|
+
*/
|
|
1302
1190
|
averagePriceInTimeframe: string;
|
|
1303
|
-
/**
|
|
1191
|
+
/**
|
|
1192
|
+
* The average sale price for sales between (now - timeframe) & (now - (2 * timeframe))
|
|
1193
|
+
*/
|
|
1304
1194
|
averagePriceInPreviousTimeframe: string;
|
|
1305
|
-
|
|
1306
|
-
|
|
1195
|
+
latestSaleTimestamp?: number;
|
|
1196
|
+
marketplaceFloorPrices: Array<string>;
|
|
1197
|
+
minFloorPrice?: string;
|
|
1198
|
+
minFloorPriceMarketplace?: string;
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
type NftCollectionWithMetrics = {
|
|
1307
1202
|
/**
|
|
1308
1203
|
* A wallet or contract address in mixed-case checksum encoding.
|
|
1309
|
-
* @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
1310
1204
|
*/
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1205
|
+
address: string;
|
|
1206
|
+
/**
|
|
1207
|
+
* The contract name.
|
|
1208
|
+
*/
|
|
1209
|
+
name: string;
|
|
1210
|
+
/**
|
|
1211
|
+
* The contract symbol.
|
|
1212
|
+
*/
|
|
1213
|
+
symbol: string;
|
|
1214
|
+
ercType: ErcType;
|
|
1215
|
+
bannerUri?: string;
|
|
1216
|
+
logoUri?: string;
|
|
1217
|
+
description?: string;
|
|
1218
|
+
metrics: CollectionMetrics;
|
|
1219
|
+
};
|
|
1220
|
+
|
|
1221
|
+
type ListNftCollectionWithMetricsResponse = {
|
|
1222
|
+
/**
|
|
1223
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
1224
|
+
*/
|
|
1316
1225
|
nextPageToken?: string;
|
|
1317
|
-
collections:
|
|
1318
|
-
}
|
|
1319
|
-
|
|
1226
|
+
collections: Array<NftCollectionWithMetrics>;
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1229
|
+
type TransactionDetails = {
|
|
1320
1230
|
/**
|
|
1321
|
-
* The
|
|
1322
|
-
* @min 1
|
|
1323
|
-
* @max 100
|
|
1324
|
-
* @default 10
|
|
1231
|
+
* The native (top-level) transaction details.
|
|
1325
1232
|
*/
|
|
1326
|
-
|
|
1233
|
+
nativeTransaction: NativeTransaction;
|
|
1327
1234
|
/**
|
|
1328
|
-
*
|
|
1329
|
-
* Provide this to retrieve the subsequent page.
|
|
1235
|
+
* The list of ERC-20 transfers.
|
|
1330
1236
|
*/
|
|
1331
|
-
|
|
1332
|
-
|
|
1237
|
+
erc20Transfers?: Array<Erc20TransferDetails>;
|
|
1238
|
+
/**
|
|
1239
|
+
* The list of ERC-721 transfers.
|
|
1240
|
+
*/
|
|
1241
|
+
erc721Transfers?: Array<Erc721TransferDetails>;
|
|
1242
|
+
/**
|
|
1243
|
+
* The list of ERC-1155 transfers.
|
|
1244
|
+
*/
|
|
1245
|
+
erc1155Transfers?: Array<Erc1155TransferDetails>;
|
|
1246
|
+
/**
|
|
1247
|
+
* The list of internal transactions. Note that this list only
|
|
1248
|
+
* includes CALL and
|
|
1249
|
+
* CALLCODE internal transactions that had a
|
|
1250
|
+
* non-zero value and
|
|
1251
|
+
* CREATE/CREATE2
|
|
1252
|
+
* calls. Use a client provider to recieve a full debug trace of the
|
|
1253
|
+
* transaction.
|
|
1254
|
+
*/
|
|
1255
|
+
internalTransactions?: Array<InternalTransactionDetails>;
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
type ListTransactionDetailsResponse = {
|
|
1259
|
+
/**
|
|
1260
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
1261
|
+
*/
|
|
1262
|
+
nextPageToken?: string;
|
|
1263
|
+
transactions: Array<TransactionDetails>;
|
|
1264
|
+
};
|
|
1265
|
+
|
|
1266
|
+
type ListTransfersResponse = {
|
|
1267
|
+
/**
|
|
1268
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
1269
|
+
*/
|
|
1270
|
+
nextPageToken?: string;
|
|
1271
|
+
transfers: (Array<Erc20Transfer> | Array<Erc721Transfer> | Array<Erc1155Transfer>);
|
|
1272
|
+
};
|
|
1273
|
+
|
|
1333
1274
|
declare enum NftSearchResultTypeOption {
|
|
1334
|
-
|
|
1335
|
-
|
|
1275
|
+
TOKEN = "token",
|
|
1276
|
+
COLLECTION = "collection"
|
|
1336
1277
|
}
|
|
1337
|
-
|
|
1278
|
+
|
|
1279
|
+
type NftFilterOptionsProperty = {
|
|
1338
1280
|
/**
|
|
1339
1281
|
* Filters search results by collection or token.
|
|
1340
|
-
* @example "token"
|
|
1341
1282
|
*/
|
|
1342
1283
|
resultType: NftSearchResultTypeOption;
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1284
|
+
};
|
|
1285
|
+
|
|
1286
|
+
type PaginationParams = {
|
|
1287
|
+
/**
|
|
1288
|
+
* The maximum number of items to return.
|
|
1289
|
+
*/
|
|
1290
|
+
pageSize?: number;
|
|
1291
|
+
/**
|
|
1292
|
+
* A page token, received from a previous list call.
|
|
1293
|
+
* Provide this to retrieve the subsequent page.
|
|
1294
|
+
*/
|
|
1295
|
+
pageToken?: string;
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1298
|
+
type NftSearchBody = {
|
|
1345
1299
|
searchQuery: string;
|
|
1346
1300
|
paginationParams?: PaginationParams;
|
|
1347
1301
|
filterOptions: NftFilterOptionsProperty;
|
|
1302
|
+
};
|
|
1303
|
+
|
|
1304
|
+
declare enum SortOrder {
|
|
1305
|
+
ASC = "asc",
|
|
1306
|
+
DESC = "desc"
|
|
1348
1307
|
}
|
|
1349
|
-
type OperationRequestBody = object;
|
|
1350
|
-
type OperationInfoResponse = object;
|
|
1351
|
-
type OperationResultResponse = object;
|
|
1352
1308
|
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
status?: string;
|
|
1363
|
-
}>;
|
|
1309
|
+
declare enum TransactionStatus {
|
|
1310
|
+
FAILED = "failed",
|
|
1311
|
+
SUCCESS = "success"
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
declare enum TrendingTimeframe {
|
|
1315
|
+
DAY = "day",
|
|
1316
|
+
WEEK = "week",
|
|
1317
|
+
MONTH = "month"
|
|
1364
1318
|
}
|
|
1365
1319
|
|
|
1366
|
-
declare class
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
* @response `200` `NativeBalanceDto`
|
|
1388
|
-
*/
|
|
1389
|
-
getNativeBalance(chainId: string, address: string, query?: {
|
|
1320
|
+
declare class EvmService {
|
|
1321
|
+
readonly httpRequest: BaseHttpRequest;
|
|
1322
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
1323
|
+
/**
|
|
1324
|
+
* Get native token balance of a wallet address for a given chain.
|
|
1325
|
+
* @returns GetNativeBalanceResponse
|
|
1326
|
+
* @throws ApiError
|
|
1327
|
+
*/
|
|
1328
|
+
getNativeBalance({ chainId, address, currency, }: {
|
|
1329
|
+
/**
|
|
1330
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1331
|
+
* a list of supported chain ids.
|
|
1332
|
+
*/
|
|
1333
|
+
chainId: string;
|
|
1334
|
+
/**
|
|
1335
|
+
* A wallet address.
|
|
1336
|
+
*/
|
|
1337
|
+
address: string;
|
|
1338
|
+
/**
|
|
1339
|
+
* The currency that return values should use. Defaults to USD.
|
|
1340
|
+
*/
|
|
1390
1341
|
currency?: CurrencyCode;
|
|
1391
|
-
}
|
|
1342
|
+
}): CancelablePromise<GetNativeBalanceResponse>;
|
|
1392
1343
|
/**
|
|
1393
|
-
*
|
|
1394
|
-
* @
|
|
1395
|
-
* @
|
|
1396
|
-
* @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc20
|
|
1397
|
-
* @response `200` `Erc20BalancesDto`
|
|
1344
|
+
* List ERC-20 token balances of a wallet address for a given chain.
|
|
1345
|
+
* @returns ListErc20BalancesResponse
|
|
1346
|
+
* @throws ApiError
|
|
1398
1347
|
*/
|
|
1399
|
-
listErc20Balances(chainId
|
|
1348
|
+
listErc20Balances({ chainId, address, pageSize, pageToken, currency, }: {
|
|
1349
|
+
/**
|
|
1350
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1351
|
+
* a list of supported chain ids.
|
|
1352
|
+
*/
|
|
1353
|
+
chainId: string;
|
|
1354
|
+
/**
|
|
1355
|
+
* A wallet address.
|
|
1356
|
+
*/
|
|
1357
|
+
address: string;
|
|
1358
|
+
/**
|
|
1359
|
+
* The maximum number of items to return. The minimum page size
|
|
1360
|
+
* is 1. The maximum pageSize is 100.
|
|
1361
|
+
*/
|
|
1400
1362
|
pageSize?: number;
|
|
1363
|
+
/**
|
|
1364
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1365
|
+
*/
|
|
1401
1366
|
pageToken?: string;
|
|
1367
|
+
/**
|
|
1368
|
+
* The currency that return values should use. Defaults to USD.
|
|
1369
|
+
*/
|
|
1402
1370
|
currency?: CurrencyCode;
|
|
1403
|
-
}
|
|
1371
|
+
}): CancelablePromise<ListErc20BalancesResponse>;
|
|
1404
1372
|
/**
|
|
1405
|
-
*
|
|
1406
|
-
*
|
|
1407
|
-
* @
|
|
1408
|
-
* @summary Get erc-721 token balances of a wallet address for a given chain.
|
|
1409
|
-
* @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc721
|
|
1410
|
-
* @response `200` `Erc721BalancesDto`
|
|
1373
|
+
* List ERC-721 token balances of a wallet address for a given chain.
|
|
1374
|
+
* @returns ListErc721BalancesResponse
|
|
1375
|
+
* @throws ApiError
|
|
1411
1376
|
*/
|
|
1412
|
-
listErc721Balances(chainId
|
|
1377
|
+
listErc721Balances({ chainId, address, pageSize, pageToken, }: {
|
|
1378
|
+
/**
|
|
1379
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1380
|
+
* a list of supported chain ids.
|
|
1381
|
+
*/
|
|
1382
|
+
chainId: string;
|
|
1383
|
+
/**
|
|
1384
|
+
* A wallet address.
|
|
1385
|
+
*/
|
|
1386
|
+
address: string;
|
|
1387
|
+
/**
|
|
1388
|
+
* The maximum number of items to return. The minimum page size
|
|
1389
|
+
* is 1. The maximum pageSize is 100.
|
|
1390
|
+
*/
|
|
1413
1391
|
pageSize?: number;
|
|
1392
|
+
/**
|
|
1393
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1394
|
+
*/
|
|
1414
1395
|
pageToken?: string;
|
|
1415
|
-
|
|
1416
|
-
|
|
1396
|
+
}): CancelablePromise<ListErc721BalancesResponse>;
|
|
1397
|
+
/**
|
|
1398
|
+
* List ERC-1155 token balances of a wallet address for a given chain.
|
|
1399
|
+
* @returns ListErc1155BalancesResponse
|
|
1400
|
+
* @throws ApiError
|
|
1401
|
+
*/
|
|
1402
|
+
listErc1155Balances({ chainId, address, pageSize, pageToken, }: {
|
|
1403
|
+
/**
|
|
1404
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1405
|
+
* a list of supported chain ids.
|
|
1406
|
+
*/
|
|
1407
|
+
chainId: string;
|
|
1408
|
+
/**
|
|
1409
|
+
* A wallet address.
|
|
1410
|
+
*/
|
|
1411
|
+
address: string;
|
|
1412
|
+
/**
|
|
1413
|
+
* The maximum number of items to return. The minimum page size
|
|
1414
|
+
* is 1. The maximum pageSize is 100.
|
|
1415
|
+
*/
|
|
1416
|
+
pageSize?: number;
|
|
1417
|
+
/**
|
|
1418
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1419
|
+
*/
|
|
1420
|
+
pageToken?: string;
|
|
1421
|
+
}): CancelablePromise<ListErc1155BalancesResponse>;
|
|
1422
|
+
/**
|
|
1423
|
+
* List ERC-721 and ERC-1155 token balances of a wallet address
|
|
1424
|
+
* for a given chain.
|
|
1425
|
+
* @returns ListCollectibleBalancesResponse
|
|
1426
|
+
* @throws ApiError
|
|
1427
|
+
*/
|
|
1428
|
+
listCollectibleBalances({ chainId, address, pageSize, pageToken, }: {
|
|
1429
|
+
/**
|
|
1430
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1431
|
+
* a list of supported chain ids.
|
|
1432
|
+
*/
|
|
1433
|
+
chainId: string;
|
|
1434
|
+
/**
|
|
1435
|
+
* A wallet address.
|
|
1436
|
+
*/
|
|
1437
|
+
address: string;
|
|
1438
|
+
/**
|
|
1439
|
+
* The maximum number of items to return. The minimum page size
|
|
1440
|
+
* is 1. The maximum pageSize is 100.
|
|
1441
|
+
*/
|
|
1442
|
+
pageSize?: number;
|
|
1443
|
+
/**
|
|
1444
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1445
|
+
*/
|
|
1446
|
+
pageToken?: string;
|
|
1447
|
+
}): CancelablePromise<ListCollectibleBalancesResponse>;
|
|
1417
1448
|
/**
|
|
1418
|
-
*
|
|
1419
|
-
*
|
|
1420
|
-
* @
|
|
1421
|
-
* @summary Gets a list of transactions for a wallet address and chain.
|
|
1422
|
-
* @request GET:/v1/chains/{chainId}/addresses/{address}/transactions
|
|
1423
|
-
* @response `200` `ListTransactionDetailsDto`
|
|
1449
|
+
* Returns the latest blocks indexed for the chain.
|
|
1450
|
+
* @returns ListBlocksResponse
|
|
1451
|
+
* @throws ApiError
|
|
1424
1452
|
*/
|
|
1425
|
-
|
|
1453
|
+
getLatestBlocks({ chainId, pageSize, pageToken, }: {
|
|
1454
|
+
/**
|
|
1455
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1456
|
+
* a list of supported chain ids.
|
|
1457
|
+
*/
|
|
1458
|
+
chainId: string;
|
|
1459
|
+
/**
|
|
1460
|
+
* The maximum number of items to return. The minimum page size
|
|
1461
|
+
* is 1. The maximum pageSize is 100.
|
|
1462
|
+
*/
|
|
1426
1463
|
pageSize?: number;
|
|
1464
|
+
/**
|
|
1465
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1466
|
+
*/
|
|
1427
1467
|
pageToken?: string;
|
|
1428
|
-
}
|
|
1468
|
+
}): CancelablePromise<ListBlocksResponse>;
|
|
1429
1469
|
/**
|
|
1430
|
-
*
|
|
1431
|
-
* @
|
|
1432
|
-
* @
|
|
1433
|
-
* @request GET:/v1/chains/{chainId}/transactions/{txHash}
|
|
1434
|
-
* @response `200` `TransactionDetailsDto`
|
|
1470
|
+
* Returns the details of an individual block for the chain.
|
|
1471
|
+
* @returns GetBlockResponse
|
|
1472
|
+
* @throws ApiError
|
|
1435
1473
|
*/
|
|
1436
|
-
|
|
1474
|
+
getBlock({ chainId, blockId, }: {
|
|
1475
|
+
/**
|
|
1476
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1477
|
+
* a list of supported chain ids.
|
|
1478
|
+
*/
|
|
1479
|
+
chainId: string;
|
|
1480
|
+
/**
|
|
1481
|
+
* A block identifier which is either a block number or the block hash.
|
|
1482
|
+
*/
|
|
1483
|
+
blockId: string;
|
|
1484
|
+
}): CancelablePromise<GetBlockResponse>;
|
|
1437
1485
|
/**
|
|
1438
|
-
*
|
|
1439
|
-
* @
|
|
1440
|
-
* @
|
|
1441
|
-
* @request GET:/v1/chains
|
|
1442
|
-
* @response `200` `ChainsDto`
|
|
1486
|
+
* If the address is a smart contract, returns the transaction at which it was deployed.
|
|
1487
|
+
* @returns GetTransactionResponse
|
|
1488
|
+
* @throws ApiError
|
|
1443
1489
|
*/
|
|
1444
|
-
|
|
1490
|
+
getDeploymentTransaction({ chainId, address, currency, }: {
|
|
1491
|
+
/**
|
|
1492
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1493
|
+
* a list of supported chain ids.
|
|
1494
|
+
*/
|
|
1495
|
+
chainId: string;
|
|
1496
|
+
/**
|
|
1497
|
+
* Contract address on the relevant chain.
|
|
1498
|
+
*/
|
|
1499
|
+
address: string;
|
|
1500
|
+
/**
|
|
1501
|
+
* The currency that return values should use. Defaults to USD.
|
|
1502
|
+
*/
|
|
1503
|
+
currency?: CurrencyCode;
|
|
1504
|
+
}): CancelablePromise<GetTransactionResponse>;
|
|
1445
1505
|
/**
|
|
1446
|
-
*
|
|
1447
|
-
*
|
|
1448
|
-
* @
|
|
1449
|
-
* @
|
|
1450
|
-
* @request GET:/v1/chains/{chainId}
|
|
1451
|
-
* @response `200` `ChainInfoDto`
|
|
1506
|
+
* Not yet implemented. Returns user-uploaded contract
|
|
1507
|
+
* information from https://subnets.avax.network/tools/contract-info.
|
|
1508
|
+
* @returns GetContractInformationResponse
|
|
1509
|
+
* @throws ApiError
|
|
1452
1510
|
*/
|
|
1453
|
-
|
|
1511
|
+
getContractInfo({ chainId, address, }: {
|
|
1512
|
+
/**
|
|
1513
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1514
|
+
* a list of supported chain ids.
|
|
1515
|
+
*/
|
|
1516
|
+
chainId: string;
|
|
1517
|
+
/**
|
|
1518
|
+
* Contract address on the relevant chain.
|
|
1519
|
+
*/
|
|
1520
|
+
address: string;
|
|
1521
|
+
}): CancelablePromise<GetContractInformationResponse>;
|
|
1454
1522
|
/**
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1457
|
-
* @
|
|
1458
|
-
* @
|
|
1459
|
-
* @summary Returns active staking transactions for supplied addresses.
|
|
1460
|
-
* @request GET:/v1/networks/{network}/blockchains/{blockchainId}/transactions:listStaking
|
|
1523
|
+
* Gets a list of erc transfers for an ERC-20, ERC-721,
|
|
1524
|
+
* or ERC-1155 contract address.
|
|
1525
|
+
* @returns ListTransfersResponse
|
|
1526
|
+
* @throws ApiError
|
|
1461
1527
|
*/
|
|
1462
|
-
|
|
1528
|
+
listTransfers({ chainId, address, pageSize, pageToken, }: {
|
|
1463
1529
|
/**
|
|
1464
|
-
* A
|
|
1465
|
-
*
|
|
1530
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1531
|
+
* a list of supported chain ids.
|
|
1466
1532
|
*/
|
|
1467
|
-
|
|
1533
|
+
chainId: string;
|
|
1534
|
+
/**
|
|
1535
|
+
* A wallet address.
|
|
1536
|
+
*/
|
|
1537
|
+
address: string;
|
|
1468
1538
|
/**
|
|
1469
1539
|
* The maximum number of items to return. The minimum page size
|
|
1470
|
-
*
|
|
1471
|
-
* @min 1
|
|
1472
|
-
* @max 100
|
|
1473
|
-
* @default 10
|
|
1474
|
-
* @example "10"
|
|
1540
|
+
* is 1. The maximum pageSize is 100.
|
|
1475
1541
|
*/
|
|
1476
1542
|
pageSize?: number;
|
|
1477
|
-
/** A page token, received from a previous list call. Provide this to retrieve the subsequent page. */
|
|
1478
|
-
pageToken?: string;
|
|
1479
1543
|
/**
|
|
1480
|
-
*
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1544
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1545
|
+
*/
|
|
1546
|
+
pageToken?: string;
|
|
1547
|
+
}): CancelablePromise<ListTransfersResponse>;
|
|
1548
|
+
/**
|
|
1549
|
+
* Gets a list of transactions for an address and chain.
|
|
1550
|
+
* Returns a list of transactions where the given wallet
|
|
1551
|
+
* address had an on-chain interaction for a given chain. The ERC-20
|
|
1552
|
+
* transfers, ERC-721 transfers, ERC-1155, and internal transactions
|
|
1553
|
+
* returned are only those where the input address had an interaction.
|
|
1554
|
+
* Specifically, those list only inlcude entries where the input address
|
|
1555
|
+
* was the sender (`from` field) or the receiver (`to` field) for the
|
|
1556
|
+
* sub-transaction. Therefore the transactions returned from this list may
|
|
1557
|
+
* not be complete representations of the on-chain data. For a complete
|
|
1558
|
+
* view of a transaction use the `/chains/:chainId/transactions/:txHash`
|
|
1559
|
+
* endpoint.
|
|
1560
|
+
* @returns ListTransactionDetailsResponse
|
|
1561
|
+
* @throws ApiError
|
|
1562
|
+
*/
|
|
1563
|
+
listTransactions({ chainId, address, pageSize, pageToken, }: {
|
|
1564
|
+
/**
|
|
1565
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1566
|
+
* a list of supported chain ids.
|
|
1567
|
+
*/
|
|
1568
|
+
chainId: string;
|
|
1569
|
+
/**
|
|
1570
|
+
* A wallet address.
|
|
1571
|
+
*/
|
|
1572
|
+
address: string;
|
|
1573
|
+
/**
|
|
1574
|
+
* The maximum number of items to return. The minimum page size
|
|
1575
|
+
* is 1. The maximum pageSize is 100.
|
|
1576
|
+
*/
|
|
1577
|
+
pageSize?: number;
|
|
1578
|
+
/**
|
|
1579
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1580
|
+
*/
|
|
1581
|
+
pageToken?: string;
|
|
1582
|
+
}): CancelablePromise<ListTransactionDetailsResponse>;
|
|
1583
|
+
/**
|
|
1584
|
+
* Gets a list of native transactions for an address and chain.
|
|
1585
|
+
* @returns ListNativeTransactionsResponse
|
|
1586
|
+
* @throws ApiError
|
|
1587
|
+
*/
|
|
1588
|
+
listNativeTransactions({ chainId, address, pageSize, pageToken, }: {
|
|
1589
|
+
/**
|
|
1590
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1591
|
+
* a list of supported chain ids.
|
|
1592
|
+
*/
|
|
1593
|
+
chainId: string;
|
|
1594
|
+
/**
|
|
1595
|
+
* A wallet address.
|
|
1596
|
+
*/
|
|
1597
|
+
address: string;
|
|
1598
|
+
/**
|
|
1599
|
+
* The maximum number of items to return. The minimum page size
|
|
1600
|
+
* is 1. The maximum pageSize is 100.
|
|
1601
|
+
*/
|
|
1602
|
+
pageSize?: number;
|
|
1603
|
+
/**
|
|
1604
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1605
|
+
*/
|
|
1606
|
+
pageToken?: string;
|
|
1607
|
+
}): CancelablePromise<ListNativeTransactionsResponse>;
|
|
1608
|
+
/**
|
|
1609
|
+
* Lists ERC-20 transfers for an address.
|
|
1610
|
+
* @returns ListErc20TransactionsResponse
|
|
1611
|
+
* @throws ApiError
|
|
1612
|
+
*/
|
|
1613
|
+
listErc20Transactions({ chainId, address, pageSize, pageToken, }: {
|
|
1614
|
+
/**
|
|
1615
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1616
|
+
* a list of supported chain ids.
|
|
1617
|
+
*/
|
|
1618
|
+
chainId: string;
|
|
1619
|
+
/**
|
|
1620
|
+
* A wallet address.
|
|
1621
|
+
*/
|
|
1622
|
+
address: string;
|
|
1623
|
+
/**
|
|
1624
|
+
* The maximum number of items to return. The minimum page size
|
|
1625
|
+
* is 1. The maximum pageSize is 100.
|
|
1626
|
+
*/
|
|
1627
|
+
pageSize?: number;
|
|
1628
|
+
/**
|
|
1629
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1630
|
+
*/
|
|
1631
|
+
pageToken?: string;
|
|
1632
|
+
}): CancelablePromise<ListErc20TransactionsResponse>;
|
|
1633
|
+
/**
|
|
1634
|
+
* Lists ERC-721 transfers for an address.
|
|
1635
|
+
* @returns ListErc721TransactionsResponse
|
|
1636
|
+
* @throws ApiError
|
|
1637
|
+
*/
|
|
1638
|
+
listErc721Transactions({ chainId, address, pageSize, pageToken, }: {
|
|
1639
|
+
/**
|
|
1640
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1641
|
+
* a list of supported chain ids.
|
|
1642
|
+
*/
|
|
1643
|
+
chainId: string;
|
|
1644
|
+
/**
|
|
1645
|
+
* A wallet address.
|
|
1646
|
+
*/
|
|
1647
|
+
address: string;
|
|
1648
|
+
/**
|
|
1649
|
+
* The maximum number of items to return. The minimum page size
|
|
1650
|
+
* is 1. The maximum pageSize is 100.
|
|
1651
|
+
*/
|
|
1652
|
+
pageSize?: number;
|
|
1653
|
+
/**
|
|
1654
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1655
|
+
*/
|
|
1656
|
+
pageToken?: string;
|
|
1657
|
+
}): CancelablePromise<ListErc721TransactionsResponse>;
|
|
1658
|
+
/**
|
|
1659
|
+
* Lists of ERC-1155 transfers for an address.
|
|
1660
|
+
* @returns ListErc1155TransactionsResponse
|
|
1661
|
+
* @throws ApiError
|
|
1662
|
+
*/
|
|
1663
|
+
listErc1155Transactions({ chainId, address, pageSize, pageToken, }: {
|
|
1664
|
+
/**
|
|
1665
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1666
|
+
* a list of supported chain ids.
|
|
1667
|
+
*/
|
|
1668
|
+
chainId: string;
|
|
1669
|
+
/**
|
|
1670
|
+
* A wallet address.
|
|
1671
|
+
*/
|
|
1672
|
+
address: string;
|
|
1673
|
+
/**
|
|
1674
|
+
* The maximum number of items to return. The minimum page size
|
|
1675
|
+
* is 1. The maximum pageSize is 100.
|
|
1676
|
+
*/
|
|
1677
|
+
pageSize?: number;
|
|
1678
|
+
/**
|
|
1679
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1680
|
+
*/
|
|
1681
|
+
pageToken?: string;
|
|
1682
|
+
}): CancelablePromise<ListErc1155TransactionsResponse>;
|
|
1683
|
+
/**
|
|
1684
|
+
* Lists internal transactions for an address.
|
|
1685
|
+
* Returns a list of internal transactions for an address and
|
|
1686
|
+
* chain. Note that the internal transactions list only contains CALL or
|
|
1687
|
+
* CALLCODE transactions with a non-zero value and CREATE/CREATE2
|
|
1688
|
+
* transactions. To get a complete list of internal transactions use the
|
|
1689
|
+
* `debug_` prefixed RPC methods on an archive node.
|
|
1690
|
+
* @returns ListInternalTransactionsResponse
|
|
1691
|
+
* @throws ApiError
|
|
1692
|
+
*/
|
|
1693
|
+
listInternalTransactions({ chainId, address, pageSize, pageToken, }: {
|
|
1694
|
+
/**
|
|
1695
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1696
|
+
* a list of supported chain ids.
|
|
1697
|
+
*/
|
|
1698
|
+
chainId: string;
|
|
1699
|
+
/**
|
|
1700
|
+
* A wallet address.
|
|
1701
|
+
*/
|
|
1702
|
+
address: string;
|
|
1703
|
+
/**
|
|
1704
|
+
* The maximum number of items to return. The minimum page size
|
|
1705
|
+
* is 1. The maximum pageSize is 100.
|
|
1706
|
+
*/
|
|
1707
|
+
pageSize?: number;
|
|
1708
|
+
/**
|
|
1709
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1710
|
+
*/
|
|
1711
|
+
pageToken?: string;
|
|
1712
|
+
}): CancelablePromise<ListInternalTransactionsResponse>;
|
|
1713
|
+
/**
|
|
1714
|
+
* Gets the details of a single transaction.
|
|
1715
|
+
* @returns GetTransactionResponse
|
|
1716
|
+
* @throws ApiError
|
|
1717
|
+
*/
|
|
1718
|
+
getTransaction({ chainId, txHash, }: {
|
|
1719
|
+
/**
|
|
1720
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1721
|
+
* a list of supported chain ids.
|
|
1722
|
+
*/
|
|
1723
|
+
chainId: string;
|
|
1724
|
+
/**
|
|
1725
|
+
* A transaction hash.
|
|
1726
|
+
*/
|
|
1727
|
+
txHash: string;
|
|
1728
|
+
}): CancelablePromise<GetTransactionResponse>;
|
|
1729
|
+
/**
|
|
1730
|
+
* Gets the transactions that occured in a given block.
|
|
1731
|
+
* @returns ListNativeTransactionsResponse
|
|
1732
|
+
* @throws ApiError
|
|
1733
|
+
*/
|
|
1734
|
+
getTransactionsForBlock({ chainId, blockId, }: {
|
|
1735
|
+
/**
|
|
1736
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1737
|
+
* a list of supported chain ids.
|
|
1738
|
+
*/
|
|
1739
|
+
chainId: string;
|
|
1740
|
+
/**
|
|
1741
|
+
* A block identifier which is either a block number or the block hash.
|
|
1742
|
+
*/
|
|
1743
|
+
blockId: string;
|
|
1744
|
+
}): CancelablePromise<ListNativeTransactionsResponse>;
|
|
1745
|
+
/**
|
|
1746
|
+
* Gets the latest transactions; can be filtered by status.
|
|
1747
|
+
* @returns ListNativeTransactionsResponse
|
|
1748
|
+
* @throws ApiError
|
|
1749
|
+
*/
|
|
1750
|
+
listLatestTransactions({ chainId, pageSize, pageToken, status, }: {
|
|
1751
|
+
/**
|
|
1752
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1753
|
+
* a list of supported chain ids.
|
|
1754
|
+
*/
|
|
1755
|
+
chainId: string;
|
|
1756
|
+
/**
|
|
1757
|
+
* The maximum number of items to return. The minimum page size
|
|
1758
|
+
* is 1. The maximum pageSize is 100.
|
|
1759
|
+
*/
|
|
1760
|
+
pageSize?: number;
|
|
1761
|
+
/**
|
|
1762
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1763
|
+
*/
|
|
1764
|
+
pageToken?: string;
|
|
1765
|
+
/**
|
|
1766
|
+
* A status filter for listed transactions.
|
|
1767
|
+
*/
|
|
1768
|
+
status?: TransactionStatus;
|
|
1769
|
+
}): CancelablePromise<ListNativeTransactionsResponse>;
|
|
1770
|
+
/**
|
|
1771
|
+
* Gets the list of chains supported by the api.
|
|
1772
|
+
* @returns ListChainsResponse
|
|
1773
|
+
* @throws ApiError
|
|
1774
|
+
*/
|
|
1775
|
+
supportedChains(): CancelablePromise<ListChainsResponse>;
|
|
1776
|
+
/**
|
|
1777
|
+
* Gets chain information by chain id.
|
|
1778
|
+
* @returns GetChainResponse
|
|
1779
|
+
* @throws ApiError
|
|
1780
|
+
*/
|
|
1781
|
+
getChainInfo({ chainId, }: {
|
|
1782
|
+
/**
|
|
1783
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1784
|
+
* a list of supported chain ids.
|
|
1785
|
+
*/
|
|
1786
|
+
chainId: string;
|
|
1787
|
+
}): CancelablePromise<GetChainResponse>;
|
|
1788
|
+
/**
|
|
1789
|
+
* Triggers reindexing for a single nft contract and token id pair.
|
|
1790
|
+
* Triggers reindexing of token metadata for nft contracts.
|
|
1791
|
+
* Will throw 400 if Nft has been indexed within the last hour.
|
|
1792
|
+
* @returns any
|
|
1793
|
+
* @throws ApiError
|
|
1794
|
+
*/
|
|
1795
|
+
reindexNft({ chainId, address, tokenId, }: {
|
|
1796
|
+
/**
|
|
1797
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1798
|
+
* a list of supported chain ids.
|
|
1799
|
+
*/
|
|
1800
|
+
chainId: string;
|
|
1801
|
+
/**
|
|
1802
|
+
* Contract address on the relevant chain.
|
|
1803
|
+
*/
|
|
1804
|
+
address: string;
|
|
1805
|
+
/**
|
|
1806
|
+
* TokenId on the contract
|
|
1807
|
+
*/
|
|
1808
|
+
tokenId: string;
|
|
1809
|
+
}): CancelablePromise<any>;
|
|
1810
|
+
/**
|
|
1811
|
+
* Get metadata for a specific token by providing the contract address and token id.
|
|
1812
|
+
* @returns any
|
|
1813
|
+
* @throws ApiError
|
|
1814
|
+
*/
|
|
1815
|
+
getTokenMetadata({ chainId, address, tokenId, }: {
|
|
1816
|
+
/**
|
|
1817
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1818
|
+
* a list of supported chain ids.
|
|
1819
|
+
*/
|
|
1820
|
+
chainId: string;
|
|
1821
|
+
/**
|
|
1822
|
+
* Contract address on the relevant chain.
|
|
1823
|
+
*/
|
|
1824
|
+
address: string;
|
|
1825
|
+
/**
|
|
1826
|
+
* TokenId on the contract
|
|
1827
|
+
*/
|
|
1828
|
+
tokenId: string;
|
|
1829
|
+
}): CancelablePromise<(Erc721Token | Erc1155Token)>;
|
|
1830
|
+
/**
|
|
1831
|
+
* Get collection data for provided a ChainID and address.
|
|
1832
|
+
* @returns NftCollectionWithMetrics
|
|
1833
|
+
* @throws ApiError
|
|
1834
|
+
*/
|
|
1835
|
+
getCollection({ chainId, address, timeframe, }: {
|
|
1836
|
+
/**
|
|
1837
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1838
|
+
* a list of supported chain ids.
|
|
1839
|
+
*/
|
|
1840
|
+
chainId: string;
|
|
1841
|
+
/**
|
|
1842
|
+
* Contract address on the relevant chain.
|
|
1843
|
+
*/
|
|
1844
|
+
address: string;
|
|
1845
|
+
/**
|
|
1846
|
+
* The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
|
|
1847
|
+
*/
|
|
1848
|
+
timeframe?: TrendingTimeframe;
|
|
1849
|
+
}): CancelablePromise<NftCollectionWithMetrics>;
|
|
1850
|
+
/**
|
|
1851
|
+
* List open listings for a NFT token.
|
|
1852
|
+
* @returns ListListingsResponse
|
|
1853
|
+
* @throws ApiError
|
|
1854
|
+
*/
|
|
1855
|
+
listListingsByCollectionTokenId({ chainId, address, tokenId, pageSize, pageToken, sortBy, sortOrder, currency, includeHistory, }: {
|
|
1856
|
+
/**
|
|
1857
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1858
|
+
* a list of supported chain ids.
|
|
1859
|
+
*/
|
|
1860
|
+
chainId: string;
|
|
1861
|
+
/**
|
|
1862
|
+
* Contract address on the relevant chain.
|
|
1863
|
+
*/
|
|
1864
|
+
address: string;
|
|
1865
|
+
/**
|
|
1866
|
+
* TokenId on the contract
|
|
1867
|
+
*/
|
|
1868
|
+
tokenId: string;
|
|
1869
|
+
/**
|
|
1870
|
+
* The maximum number of items to return. The minimum page size
|
|
1871
|
+
* is 1. The maximum pageSize is 100.
|
|
1872
|
+
*/
|
|
1873
|
+
pageSize?: number;
|
|
1874
|
+
/**
|
|
1875
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1876
|
+
*/
|
|
1877
|
+
pageToken?: string;
|
|
1878
|
+
/**
|
|
1879
|
+
* Which property to sort by, in conjunction with sortOrder.
|
|
1880
|
+
*/
|
|
1881
|
+
sortBy?: ListingsSortByOption;
|
|
1882
|
+
/**
|
|
1883
|
+
* The order by which to sort results. Use "asc" for ascending
|
|
1884
|
+
* order, "desc" for descending order. Sorted by timestamp or the `sortBy`
|
|
1885
|
+
* query parameter, if provided.
|
|
1886
|
+
*/
|
|
1887
|
+
sortOrder?: SortOrder;
|
|
1888
|
+
/**
|
|
1889
|
+
* The currency that return values should use. Defaults to USD.
|
|
1890
|
+
*/
|
|
1891
|
+
currency?: CurrencyCode;
|
|
1892
|
+
/**
|
|
1893
|
+
* Determines whether to return full transaction history for listings.
|
|
1894
|
+
*/
|
|
1895
|
+
includeHistory?: boolean;
|
|
1896
|
+
}): CancelablePromise<ListListingsResponse>;
|
|
1897
|
+
/**
|
|
1898
|
+
* List open listings for a NFT collection.
|
|
1899
|
+
* @returns ListListingsResponse
|
|
1900
|
+
* @throws ApiError
|
|
1901
|
+
*/
|
|
1902
|
+
listListingsByCollection({ chainId, address, pageSize, pageToken, sortBy, sortOrder, currency, includeHistory, }: {
|
|
1903
|
+
/**
|
|
1904
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1905
|
+
* a list of supported chain ids.
|
|
1906
|
+
*/
|
|
1907
|
+
chainId: string;
|
|
1908
|
+
/**
|
|
1909
|
+
* Contract address on the relevant chain.
|
|
1910
|
+
*/
|
|
1911
|
+
address: string;
|
|
1912
|
+
/**
|
|
1913
|
+
* The maximum number of items to return. The minimum page size
|
|
1914
|
+
* is 1. The maximum pageSize is 100.
|
|
1915
|
+
*/
|
|
1916
|
+
pageSize?: number;
|
|
1917
|
+
/**
|
|
1918
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1919
|
+
*/
|
|
1920
|
+
pageToken?: string;
|
|
1921
|
+
/**
|
|
1922
|
+
* Which property to sort by, in conjunction with sortOrder.
|
|
1923
|
+
*/
|
|
1924
|
+
sortBy?: ListingsSortByOption;
|
|
1925
|
+
/**
|
|
1926
|
+
* The order by which to sort results. Use "asc" for ascending
|
|
1927
|
+
* order, "desc" for descending order. Sorted by timestamp or the `sortBy`
|
|
1928
|
+
* query parameter, if provided.
|
|
1929
|
+
*/
|
|
1930
|
+
sortOrder?: SortOrder;
|
|
1931
|
+
/**
|
|
1932
|
+
* The currency that return values should use. Defaults to USD.
|
|
1933
|
+
*/
|
|
1934
|
+
currency?: CurrencyCode;
|
|
1935
|
+
/**
|
|
1936
|
+
* Determines whether to return full transaction history for listings.
|
|
1937
|
+
*/
|
|
1938
|
+
includeHistory?: boolean;
|
|
1939
|
+
}): CancelablePromise<ListListingsResponse>;
|
|
1940
|
+
/**
|
|
1941
|
+
* List recent listings on the chain.
|
|
1942
|
+
* @returns ListListingsResponse
|
|
1943
|
+
* @throws ApiError
|
|
1944
|
+
*/
|
|
1945
|
+
listRecentListings({ chainId, pageSize, pageToken, eventType, currency, }: {
|
|
1946
|
+
/**
|
|
1947
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1948
|
+
* a list of supported chain ids.
|
|
1949
|
+
*/
|
|
1950
|
+
chainId: string;
|
|
1951
|
+
/**
|
|
1952
|
+
* The maximum number of items to return. The minimum page size
|
|
1953
|
+
* is 1. The maximum pageSize is 100.
|
|
1954
|
+
*/
|
|
1955
|
+
pageSize?: number;
|
|
1956
|
+
/**
|
|
1957
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1958
|
+
*/
|
|
1959
|
+
pageToken?: string;
|
|
1960
|
+
eventType?: ListingEventType;
|
|
1961
|
+
/**
|
|
1962
|
+
* The currency that return values should use. Defaults to USD.
|
|
1963
|
+
*/
|
|
1964
|
+
currency?: CurrencyCode;
|
|
1965
|
+
}): CancelablePromise<ListListingsResponse>;
|
|
1966
|
+
/**
|
|
1967
|
+
* List details and metrics for collections.
|
|
1968
|
+
* @returns ListNftCollectionWithMetricsResponse
|
|
1969
|
+
* @throws ApiError
|
|
1970
|
+
*/
|
|
1971
|
+
listCollections({ chainId, pageSize, pageToken, timeframe, sortBy, sortOrder, }: {
|
|
1972
|
+
/**
|
|
1973
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
1974
|
+
* a list of supported chain ids.
|
|
1975
|
+
*/
|
|
1976
|
+
chainId: string;
|
|
1977
|
+
/**
|
|
1978
|
+
* The maximum number of items to return. The minimum page size
|
|
1979
|
+
* is 1. The maximum pageSize is 100.
|
|
1980
|
+
*/
|
|
1981
|
+
pageSize?: number;
|
|
1982
|
+
/**
|
|
1983
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1984
|
+
*/
|
|
1985
|
+
pageToken?: string;
|
|
1986
|
+
/**
|
|
1987
|
+
* The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
|
|
1988
|
+
*/
|
|
1989
|
+
timeframe?: TrendingTimeframe;
|
|
1990
|
+
/**
|
|
1991
|
+
* Which property to sort by, in conjunction with sortOrder.
|
|
1992
|
+
*/
|
|
1993
|
+
sortBy?: CollectionSortByOption;
|
|
1994
|
+
/**
|
|
1995
|
+
* The order by which to sort results. Use "asc" for ascending
|
|
1996
|
+
* order, "desc" for descending order. Sorted by timestamp or the `sortBy`
|
|
1997
|
+
* query parameter, if provided.
|
|
1998
|
+
*/
|
|
1999
|
+
sortOrder?: SortOrder;
|
|
2000
|
+
}): CancelablePromise<ListNftCollectionWithMetricsResponse>;
|
|
2001
|
+
/**
|
|
2002
|
+
* Search for token by name and contract name.
|
|
2003
|
+
* @returns any
|
|
2004
|
+
* @throws ApiError
|
|
2005
|
+
*/
|
|
2006
|
+
search({ chainId, requestBody, }: {
|
|
2007
|
+
/**
|
|
2008
|
+
* A supported evm chain id. Use the `/chains` endpoint to get
|
|
2009
|
+
* a list of supported chain ids.
|
|
2010
|
+
*/
|
|
2011
|
+
chainId: string;
|
|
2012
|
+
requestBody: NftSearchBody;
|
|
2013
|
+
}): CancelablePromise<{
|
|
2014
|
+
results?: Array<NftCollection>;
|
|
2015
|
+
}>;
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
declare class HealthCheckService {
|
|
2019
|
+
readonly httpRequest: BaseHttpRequest;
|
|
2020
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
2021
|
+
/**
|
|
2022
|
+
* Get the health of the service.
|
|
2023
|
+
* @returns any The Health Check is successful
|
|
2024
|
+
* @throws ApiError
|
|
2025
|
+
*/
|
|
2026
|
+
healthCheck(): CancelablePromise<{
|
|
2027
|
+
status?: string;
|
|
2028
|
+
info?: Record<string, Record<string, string>> | null;
|
|
2029
|
+
error?: Record<string, Record<string, string>> | null;
|
|
2030
|
+
details?: Record<string, Record<string, string>>;
|
|
2031
|
+
}>;
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
type EvmNetworkOptions = {
|
|
2035
|
+
addresses: Array<string>;
|
|
2036
|
+
includeChainIds: Array<string>;
|
|
2037
|
+
};
|
|
2038
|
+
|
|
2039
|
+
type PrimaryNetworkOptions = {
|
|
2040
|
+
addresses: Array<string>;
|
|
2041
|
+
includeChains: Array<'p-chain' | 'x-chain' | 'c-chain' | '11111111111111111111111111111111LpoYY' | '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM'>;
|
|
2042
|
+
};
|
|
2043
|
+
|
|
2044
|
+
type CreateTransactionExportRequest = {
|
|
2045
|
+
startDate: string;
|
|
2046
|
+
endDate: string;
|
|
2047
|
+
primaryNetwork?: PrimaryNetworkOptions;
|
|
2048
|
+
evmNetwork?: EvmNetworkOptions;
|
|
2049
|
+
};
|
|
2050
|
+
|
|
2051
|
+
type OperationMetadata = {};
|
|
2052
|
+
|
|
2053
|
+
type OperationStatusResponse = {
|
|
2054
|
+
operationId: string;
|
|
2055
|
+
operationType: string;
|
|
2056
|
+
operationStatus: string;
|
|
2057
|
+
downloadUrl?: string;
|
|
2058
|
+
message?: string;
|
|
2059
|
+
metadata?: OperationMetadata;
|
|
2060
|
+
createdAtTimestamp: number;
|
|
2061
|
+
updatedAtTimestamp: number;
|
|
2062
|
+
};
|
|
2063
|
+
|
|
2064
|
+
declare class OperationsService {
|
|
2065
|
+
readonly httpRequest: BaseHttpRequest;
|
|
2066
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
2067
|
+
/**
|
|
2068
|
+
* Trigger a transaction export operation with given parameters.
|
|
2069
|
+
* @returns OperationStatusResponse
|
|
2070
|
+
* @throws ApiError
|
|
2071
|
+
*/
|
|
2072
|
+
postTransactionExportJob({ requestBody, }: {
|
|
2073
|
+
requestBody: CreateTransactionExportRequest;
|
|
2074
|
+
}): CancelablePromise<OperationStatusResponse>;
|
|
2075
|
+
/**
|
|
2076
|
+
* Retrieve operation result with given operation id
|
|
2077
|
+
* @returns OperationStatusResponse
|
|
2078
|
+
* @throws ApiError
|
|
2079
|
+
*/
|
|
2080
|
+
getOperationResult({ operationId, }: {
|
|
2081
|
+
/**
|
|
2082
|
+
* UUID of given operation
|
|
2083
|
+
*/
|
|
2084
|
+
operationId: string;
|
|
2085
|
+
}): CancelablePromise<OperationStatusResponse>;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
declare enum BlockchainId {
|
|
2089
|
+
P_CHAIN = "p-chain",
|
|
2090
|
+
X_CHAIN = "x-chain",
|
|
2091
|
+
C_CHAIN = "c-chain",
|
|
2092
|
+
_11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
|
|
2093
|
+
_2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM"
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
type Asset = {
|
|
2097
|
+
/**
|
|
2098
|
+
* Unique ID for an asset.
|
|
2099
|
+
*/
|
|
2100
|
+
assetId: string;
|
|
2101
|
+
/**
|
|
2102
|
+
* Name of this asset.
|
|
2103
|
+
*/
|
|
2104
|
+
name: string;
|
|
2105
|
+
/**
|
|
2106
|
+
* Symbol for this asset (max 4 characters).
|
|
2107
|
+
*/
|
|
2108
|
+
symbol: string;
|
|
2109
|
+
/**
|
|
2110
|
+
* Denomination of this asset to represent fungibility.
|
|
2111
|
+
*/
|
|
2112
|
+
denomination: number;
|
|
2113
|
+
/**
|
|
2114
|
+
* Type of asset like SECP256K1 or NFT.
|
|
2115
|
+
*/
|
|
2116
|
+
type: string;
|
|
2117
|
+
/**
|
|
2118
|
+
* Amount of the asset.
|
|
2119
|
+
*/
|
|
2120
|
+
amount: string;
|
|
2121
|
+
};
|
|
2122
|
+
|
|
2123
|
+
type EVMInput = {
|
|
2124
|
+
/**
|
|
2125
|
+
* EVM address from which the asset is exported in ExportTx.
|
|
2126
|
+
*/
|
|
2127
|
+
fromAddress: string;
|
|
2128
|
+
/**
|
|
2129
|
+
* Asset details for the asset being transferred.
|
|
2130
|
+
*/
|
|
2131
|
+
asset: Asset;
|
|
2132
|
+
};
|
|
2133
|
+
|
|
2134
|
+
type UtxoCredential = {
|
|
2135
|
+
/**
|
|
2136
|
+
* Signature provided to consume the output
|
|
2137
|
+
*/
|
|
2138
|
+
signature?: string;
|
|
2139
|
+
/**
|
|
2140
|
+
* Public key associated with the signature
|
|
2141
|
+
*/
|
|
2142
|
+
publicKey?: string;
|
|
2143
|
+
};
|
|
2144
|
+
|
|
2145
|
+
type Utxo = {
|
|
2146
|
+
/**
|
|
2147
|
+
* UTXO ID for this output.
|
|
2148
|
+
*/
|
|
2149
|
+
utxoId: string;
|
|
2150
|
+
asset: Asset;
|
|
2151
|
+
/**
|
|
2152
|
+
* Type of output.
|
|
2153
|
+
*/
|
|
2154
|
+
utxoType: string;
|
|
2155
|
+
/**
|
|
2156
|
+
* Blockchain ID on which this output is created on.
|
|
2157
|
+
*/
|
|
2158
|
+
createdOnChainId: string;
|
|
2159
|
+
/**
|
|
2160
|
+
* Blockchain ID on which this output is consumed on.
|
|
2161
|
+
*/
|
|
2162
|
+
consumedOnChainId: string;
|
|
2163
|
+
/**
|
|
2164
|
+
* Transaction ID that created this output.
|
|
2165
|
+
*/
|
|
2166
|
+
creationTxHash: string;
|
|
2167
|
+
/**
|
|
2168
|
+
* Transaction ID that consumed this output.
|
|
2169
|
+
*/
|
|
2170
|
+
consumingTxHash?: string;
|
|
2171
|
+
/**
|
|
2172
|
+
* Timestamp in seconds this output is consumed.
|
|
2173
|
+
*/
|
|
2174
|
+
consumingTxTimestamp?: number;
|
|
2175
|
+
/**
|
|
2176
|
+
* Postion of this output in a list of lexiographically sorted outputs of a transaction.
|
|
2177
|
+
*/
|
|
2178
|
+
outputIndex: string;
|
|
2179
|
+
/**
|
|
2180
|
+
* Timestamp in seconds this outptut is created on.
|
|
2181
|
+
*/
|
|
2182
|
+
timestamp: number;
|
|
2183
|
+
/**
|
|
2184
|
+
* Locktime in seconds after which this output can be consumed.
|
|
2185
|
+
*/
|
|
2186
|
+
locktime: number;
|
|
2187
|
+
/**
|
|
2188
|
+
* Minimum number of signatures required to consume this output.
|
|
2189
|
+
*/
|
|
2190
|
+
threshold: number;
|
|
2191
|
+
/**
|
|
2192
|
+
* Addresses that are eligible to sign the consumption of this output.
|
|
2193
|
+
*/
|
|
2194
|
+
addresses: Array<string>;
|
|
2195
|
+
/**
|
|
2196
|
+
* Credentials that signed the transaction to consume this utxo
|
|
2197
|
+
*/
|
|
2198
|
+
credentials: Array<UtxoCredential>;
|
|
2199
|
+
};
|
|
2200
|
+
|
|
2201
|
+
type CChainExportTransaction = {
|
|
2202
|
+
/**
|
|
2203
|
+
* Unique ID for this transaction.
|
|
2204
|
+
*/
|
|
2205
|
+
txHash: string;
|
|
2206
|
+
/**
|
|
2207
|
+
* Height of the block this transaction belongs to.
|
|
2208
|
+
*/
|
|
2209
|
+
blockHeight: number;
|
|
2210
|
+
/**
|
|
2211
|
+
* Hash of the block this transaction belongs to.
|
|
2212
|
+
*/
|
|
2213
|
+
blockHash: string;
|
|
2214
|
+
/**
|
|
2215
|
+
* Latest timestamp in seconds this transaction was accepted.
|
|
2216
|
+
*/
|
|
2217
|
+
timestamp: number;
|
|
2218
|
+
/**
|
|
2219
|
+
* Hex encoded memo bytes for this transaction.
|
|
2220
|
+
*/
|
|
2221
|
+
memo: string;
|
|
2222
|
+
/**
|
|
2223
|
+
* Assets unlocked by inputs of this transaction.
|
|
2224
|
+
*/
|
|
2225
|
+
amountUnlocked: Array<Asset>;
|
|
2226
|
+
/**
|
|
2227
|
+
* Assets created by outputs of this transaction.
|
|
2228
|
+
*/
|
|
2229
|
+
amountCreated: Array<Asset>;
|
|
2230
|
+
/**
|
|
2231
|
+
* Source chain for an atomic transaction.
|
|
2232
|
+
*/
|
|
2233
|
+
sourceChain: string;
|
|
2234
|
+
/**
|
|
2235
|
+
* Destination chain for an atomic transaction.
|
|
2236
|
+
*/
|
|
2237
|
+
destinationChain: string;
|
|
2238
|
+
/**
|
|
2239
|
+
* Type of transaction.
|
|
2240
|
+
*/
|
|
2241
|
+
txType: CChainExportTransaction.txType;
|
|
2242
|
+
evmInputs: Array<EVMInput>;
|
|
2243
|
+
emittedUtxos: Array<Utxo>;
|
|
2244
|
+
};
|
|
2245
|
+
declare namespace CChainExportTransaction {
|
|
2246
|
+
/**
|
|
2247
|
+
* Type of transaction.
|
|
2248
|
+
*/
|
|
2249
|
+
enum txType {
|
|
2250
|
+
EXPORT_TX = "ExportTx"
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
type EVMOutput = {
|
|
2255
|
+
/**
|
|
2256
|
+
* EVM address to which the asset is imported in ImportTx
|
|
2257
|
+
*/
|
|
2258
|
+
toAddress: string;
|
|
2259
|
+
/**
|
|
2260
|
+
* Asset details for the asset being transferred.
|
|
2261
|
+
*/
|
|
2262
|
+
asset: Asset;
|
|
2263
|
+
};
|
|
2264
|
+
|
|
2265
|
+
type CChainImportTransaction = {
|
|
2266
|
+
/**
|
|
2267
|
+
* Unique ID for this transaction.
|
|
2268
|
+
*/
|
|
2269
|
+
txHash: string;
|
|
2270
|
+
/**
|
|
2271
|
+
* Height of the block this transaction belongs to.
|
|
2272
|
+
*/
|
|
2273
|
+
blockHeight: number;
|
|
2274
|
+
/**
|
|
2275
|
+
* Hash of the block this transaction belongs to.
|
|
2276
|
+
*/
|
|
2277
|
+
blockHash: string;
|
|
2278
|
+
/**
|
|
2279
|
+
* Latest timestamp in seconds this transaction was accepted.
|
|
2280
|
+
*/
|
|
2281
|
+
timestamp: number;
|
|
2282
|
+
/**
|
|
2283
|
+
* Hex encoded memo bytes for this transaction.
|
|
2284
|
+
*/
|
|
2285
|
+
memo: string;
|
|
2286
|
+
/**
|
|
2287
|
+
* Assets unlocked by inputs of this transaction.
|
|
2288
|
+
*/
|
|
2289
|
+
amountUnlocked: Array<Asset>;
|
|
2290
|
+
/**
|
|
2291
|
+
* Assets created by outputs of this transaction.
|
|
2292
|
+
*/
|
|
2293
|
+
amountCreated: Array<Asset>;
|
|
2294
|
+
/**
|
|
2295
|
+
* Source chain for an atomic transaction.
|
|
2296
|
+
*/
|
|
2297
|
+
sourceChain: string;
|
|
2298
|
+
/**
|
|
2299
|
+
* Destination chain for an atomic transaction.
|
|
2300
|
+
*/
|
|
2301
|
+
destinationChain: string;
|
|
2302
|
+
/**
|
|
2303
|
+
* Type of transaction.
|
|
2304
|
+
*/
|
|
2305
|
+
txType: CChainImportTransaction.txType;
|
|
2306
|
+
evmOutputs: Array<EVMOutput>;
|
|
2307
|
+
consumedUtxos: Array<Utxo>;
|
|
2308
|
+
};
|
|
2309
|
+
declare namespace CChainImportTransaction {
|
|
2310
|
+
/**
|
|
2311
|
+
* Type of transaction.
|
|
2312
|
+
*/
|
|
2313
|
+
enum txType {
|
|
2314
|
+
IMPORT_TX = "ImportTx"
|
|
2315
|
+
}
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
type ChainAddressChainIdMap = {
|
|
2319
|
+
address: string;
|
|
2320
|
+
blockchainIds: BlockchainId;
|
|
2321
|
+
};
|
|
2322
|
+
|
|
2323
|
+
type ChainAddressChainIdMapListResponse = {
|
|
2324
|
+
addresses: Array<ChainAddressChainIdMap>;
|
|
2325
|
+
};
|
|
2326
|
+
|
|
2327
|
+
declare enum CPBlockchainId {
|
|
2328
|
+
P_CHAIN = "p-chain",
|
|
2329
|
+
C_CHAIN = "c-chain",
|
|
2330
|
+
_11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY"
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
type CChainSharedAssetBalance = {
|
|
2334
|
+
/**
|
|
2335
|
+
* Unique ID for an asset.
|
|
2336
|
+
*/
|
|
2337
|
+
assetId: string;
|
|
2338
|
+
/**
|
|
2339
|
+
* Name of this asset.
|
|
2340
|
+
*/
|
|
2341
|
+
name: string;
|
|
2342
|
+
/**
|
|
2343
|
+
* Symbol for this asset (max 4 characters).
|
|
2344
|
+
*/
|
|
2345
|
+
symbol: string;
|
|
2346
|
+
/**
|
|
2347
|
+
* Denomination of this asset to represent fungibility.
|
|
2348
|
+
*/
|
|
2349
|
+
denomination: number;
|
|
2350
|
+
/**
|
|
2351
|
+
* Type of asset like SECP256K1 or NFT.
|
|
2352
|
+
*/
|
|
2353
|
+
type: string;
|
|
2354
|
+
/**
|
|
2355
|
+
* Amount of the asset.
|
|
2356
|
+
*/
|
|
2357
|
+
amount: string;
|
|
2358
|
+
utxoCount: number;
|
|
2359
|
+
sharedWithChainId: string;
|
|
2360
|
+
};
|
|
2361
|
+
|
|
2362
|
+
type CChainAtomicBalances = {
|
|
2363
|
+
atomicMemoryUnlocked: Array<CChainSharedAssetBalance>;
|
|
2364
|
+
atomicMemoryLocked: Array<CChainSharedAssetBalance>;
|
|
2365
|
+
};
|
|
2366
|
+
|
|
2367
|
+
type ListCChainAtomicBalancesResponse = {
|
|
2368
|
+
balances: CChainAtomicBalances;
|
|
2369
|
+
};
|
|
2370
|
+
|
|
2371
|
+
type ListCChainExportTxsResponse = {
|
|
2372
|
+
/**
|
|
2373
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
2374
|
+
*/
|
|
2375
|
+
nextPageToken?: string;
|
|
2376
|
+
transactions: Array<CChainExportTransaction>;
|
|
2377
|
+
};
|
|
2378
|
+
|
|
2379
|
+
type ListCChainImportTxsResponse = {
|
|
2380
|
+
/**
|
|
2381
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
2382
|
+
*/
|
|
2383
|
+
nextPageToken?: string;
|
|
2384
|
+
transactions: Array<CChainImportTransaction>;
|
|
2385
|
+
};
|
|
2386
|
+
|
|
2387
|
+
type PChainAsset = {
|
|
2388
|
+
assetId: string;
|
|
2389
|
+
amount: string;
|
|
2390
|
+
};
|
|
2391
|
+
|
|
2392
|
+
type PChainBalance = {
|
|
2393
|
+
/**
|
|
2394
|
+
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is consumable by any transaction.
|
|
2395
|
+
*/
|
|
2396
|
+
unlockedUnstaked?: Array<PChainAsset>;
|
|
2397
|
+
/**
|
|
2398
|
+
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax that is consumable by any transaction when the staking period ends.
|
|
2399
|
+
*/
|
|
2400
|
+
unlockedStaked?: Array<PChainAsset>;
|
|
2401
|
+
/**
|
|
2402
|
+
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and not consumable by any transaction at the current time.
|
|
2403
|
+
*/
|
|
2404
|
+
lockedPlatform?: Array<PChainAsset>;
|
|
2405
|
+
/**
|
|
2406
|
+
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and only consumeable for staking transactions.
|
|
2407
|
+
*/
|
|
2408
|
+
lockedStakeable?: Array<PChainAsset>;
|
|
2409
|
+
/**
|
|
2410
|
+
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax that will be locked when the staking period ends.
|
|
2411
|
+
*/
|
|
2412
|
+
lockedStaked?: Array<PChainAsset>;
|
|
2413
|
+
/**
|
|
2414
|
+
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked. Sum of lockedPlatform and lockedStakeable. TO BE DEPRECATED.
|
|
2415
|
+
*/
|
|
2416
|
+
lockedUnstaked?: Array<PChainAsset>;
|
|
2417
|
+
};
|
|
2418
|
+
|
|
2419
|
+
type ListPChainBalancesResponse = {
|
|
2420
|
+
balances: PChainBalance;
|
|
2421
|
+
};
|
|
2422
|
+
|
|
2423
|
+
type PChainConsumedUtxo = {
|
|
2424
|
+
addresses: Array<string>;
|
|
2425
|
+
amount: string;
|
|
2426
|
+
assetId: string;
|
|
2427
|
+
utxoId: string;
|
|
2428
|
+
fromTx: string;
|
|
2429
|
+
};
|
|
2430
|
+
|
|
2431
|
+
type PChainEmittedUtxo = {
|
|
2432
|
+
addresses: Array<string>;
|
|
2433
|
+
amount: string;
|
|
2434
|
+
assetId: string;
|
|
2435
|
+
utxoId: string;
|
|
2436
|
+
staked: boolean;
|
|
2437
|
+
/**
|
|
2438
|
+
* This field is only present if the UTXO has been consumed by another transaction.
|
|
2439
|
+
*/
|
|
2440
|
+
toTx?: string;
|
|
2441
|
+
};
|
|
2442
|
+
|
|
2443
|
+
type PChainTransaction = {
|
|
2444
|
+
/**
|
|
2445
|
+
* A P-Chain transaction hash.
|
|
2446
|
+
*/
|
|
2447
|
+
txHash: string;
|
|
2448
|
+
txType: string;
|
|
2449
|
+
/**
|
|
2450
|
+
* The block finality timestamp.
|
|
2451
|
+
*/
|
|
2452
|
+
blockTimestamp: number;
|
|
2453
|
+
blockNumber: string;
|
|
2454
|
+
blockHash: string;
|
|
2455
|
+
/**
|
|
2456
|
+
* A list of objects containing consumed UTXO info pertaining to a given transaction.
|
|
2457
|
+
*/
|
|
2458
|
+
consumedUtxos?: Array<PChainConsumedUtxo>;
|
|
2459
|
+
/**
|
|
2460
|
+
* A list of objects containing emitted UTXO info pertaining to a given transaction.
|
|
2461
|
+
*/
|
|
2462
|
+
emittedUtxos?: Array<PChainEmittedUtxo>;
|
|
2463
|
+
/**
|
|
2464
|
+
* A list of objects containing P-chain Asset ID and the amount of that Asset ID.
|
|
2465
|
+
*/
|
|
2466
|
+
value?: Array<PChainAsset>;
|
|
2467
|
+
/**
|
|
2468
|
+
* A list of objects containing P-chain Asset ID and the amount of that Asset ID.
|
|
2469
|
+
*/
|
|
2470
|
+
amountBurned?: Array<PChainAsset>;
|
|
2471
|
+
/**
|
|
2472
|
+
* A list of objects containing P-chain Asset ID and the amount of that Asset ID.
|
|
2473
|
+
*/
|
|
2474
|
+
amountStaked?: Array<PChainAsset>;
|
|
2475
|
+
startTimestamp?: number;
|
|
2476
|
+
endTimestamp?: number;
|
|
2477
|
+
delegationFeePercent?: string;
|
|
2478
|
+
nodeId?: string;
|
|
2479
|
+
subnetId?: string;
|
|
2480
|
+
estimatedReward?: string;
|
|
2481
|
+
};
|
|
2482
|
+
|
|
2483
|
+
type ListPChainTransactionsResponse = {
|
|
2484
|
+
/**
|
|
2485
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
2486
|
+
*/
|
|
2487
|
+
nextPageToken?: string;
|
|
2488
|
+
transactions: Array<PChainTransaction>;
|
|
2489
|
+
};
|
|
2490
|
+
|
|
2491
|
+
type PChainUtxo = {
|
|
2492
|
+
/**
|
|
2493
|
+
* An array of P-Chain wallet addresses.
|
|
2494
|
+
*/
|
|
2495
|
+
addresses: Array<string>;
|
|
2496
|
+
utxoId: string;
|
|
2497
|
+
txHash: string;
|
|
2498
|
+
outputIndex: number;
|
|
2499
|
+
blockTimestamp: number;
|
|
2500
|
+
consumingTxHash?: string;
|
|
2501
|
+
consumingBlockTimestamp?: number;
|
|
2502
|
+
assetId: string;
|
|
2503
|
+
utxoType: string;
|
|
2504
|
+
amount: string;
|
|
2505
|
+
stakeableLocktime?: number;
|
|
2506
|
+
platformLocktime?: number;
|
|
2507
|
+
threshold?: number;
|
|
2508
|
+
};
|
|
2509
|
+
|
|
2510
|
+
type ListPChainUtxosResponse = {
|
|
2511
|
+
/**
|
|
2512
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
2513
|
+
*/
|
|
2514
|
+
nextPageToken?: string;
|
|
2515
|
+
utxos: Array<PChainUtxo>;
|
|
2516
|
+
};
|
|
2517
|
+
|
|
2518
|
+
type ListUtxosResponse = {
|
|
2519
|
+
/**
|
|
2520
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
2521
|
+
*/
|
|
2522
|
+
nextPageToken?: string;
|
|
2523
|
+
utxos: Array<Utxo>;
|
|
2524
|
+
};
|
|
2525
|
+
|
|
2526
|
+
type XChainAssetBalance = {
|
|
2527
|
+
/**
|
|
2528
|
+
* Unique ID for an asset.
|
|
2529
|
+
*/
|
|
2530
|
+
assetId: string;
|
|
2531
|
+
/**
|
|
2532
|
+
* Name of this asset.
|
|
2533
|
+
*/
|
|
2534
|
+
name: string;
|
|
2535
|
+
/**
|
|
2536
|
+
* Symbol for this asset (max 4 characters).
|
|
2537
|
+
*/
|
|
2538
|
+
symbol: string;
|
|
2539
|
+
/**
|
|
2540
|
+
* Denomination of this asset to represent fungibility.
|
|
2541
|
+
*/
|
|
2542
|
+
denomination: number;
|
|
2543
|
+
/**
|
|
2544
|
+
* Type of asset like SECP256K1 or NFT.
|
|
2545
|
+
*/
|
|
2546
|
+
type: string;
|
|
2547
|
+
/**
|
|
2548
|
+
* Amount of the asset.
|
|
2549
|
+
*/
|
|
2550
|
+
amount: string;
|
|
2551
|
+
utxoCount: number;
|
|
2552
|
+
};
|
|
2553
|
+
|
|
2554
|
+
type XChainSharedAssetBalance = {
|
|
2555
|
+
/**
|
|
2556
|
+
* Unique ID for an asset.
|
|
2557
|
+
*/
|
|
2558
|
+
assetId: string;
|
|
2559
|
+
/**
|
|
2560
|
+
* Name of this asset.
|
|
2561
|
+
*/
|
|
2562
|
+
name: string;
|
|
2563
|
+
/**
|
|
2564
|
+
* Symbol for this asset (max 4 characters).
|
|
2565
|
+
*/
|
|
2566
|
+
symbol: string;
|
|
2567
|
+
/**
|
|
2568
|
+
* Denomination of this asset to represent fungibility.
|
|
2569
|
+
*/
|
|
2570
|
+
denomination: number;
|
|
2571
|
+
/**
|
|
2572
|
+
* Type of asset like SECP256K1 or NFT.
|
|
2573
|
+
*/
|
|
2574
|
+
type: string;
|
|
2575
|
+
/**
|
|
2576
|
+
* Amount of the asset.
|
|
2577
|
+
*/
|
|
2578
|
+
amount: string;
|
|
2579
|
+
utxoCount: number;
|
|
2580
|
+
sharedWithChainId: string;
|
|
2581
|
+
};
|
|
2582
|
+
|
|
2583
|
+
type XChainBalances = {
|
|
2584
|
+
/**
|
|
2585
|
+
* A list of objects containing X-chain Asset balance infromation.
|
|
2586
|
+
*/
|
|
2587
|
+
locked: Array<XChainAssetBalance>;
|
|
2588
|
+
/**
|
|
2589
|
+
* A list of objects containing X-chain Asset balance infromation.
|
|
2590
|
+
*/
|
|
2591
|
+
unlocked: Array<XChainAssetBalance>;
|
|
2592
|
+
atomicMemoryUnlocked: Array<XChainSharedAssetBalance>;
|
|
2593
|
+
atomicMemoryLocked: Array<XChainSharedAssetBalance>;
|
|
2594
|
+
};
|
|
2595
|
+
|
|
2596
|
+
type ListXChainBalancesResponse = {
|
|
2597
|
+
balances: XChainBalances;
|
|
2598
|
+
};
|
|
2599
|
+
|
|
2600
|
+
type TransactionVertexDetail = {
|
|
2601
|
+
/**
|
|
2602
|
+
* Vertex ID of the vertex this transaction belongs to.
|
|
2603
|
+
*/
|
|
2604
|
+
hash: string;
|
|
2605
|
+
/**
|
|
2606
|
+
* Vertex height of the vertex this transaction belongs to.
|
|
2607
|
+
*/
|
|
2608
|
+
height: number;
|
|
2609
|
+
/**
|
|
2610
|
+
* Timestamp in seconds this vertex was accepted.
|
|
2611
|
+
*/
|
|
2612
|
+
timestamp: number;
|
|
2613
|
+
};
|
|
2614
|
+
|
|
2615
|
+
type XChainAssetDetails = {
|
|
2616
|
+
/**
|
|
2617
|
+
* Unique ID for an asset.
|
|
2618
|
+
*/
|
|
2619
|
+
assetId: string;
|
|
2620
|
+
/**
|
|
2621
|
+
* Name of this asset.
|
|
2622
|
+
*/
|
|
2623
|
+
name: string;
|
|
2624
|
+
/**
|
|
2625
|
+
* Symbol for this asset (max 4 characters).
|
|
2626
|
+
*/
|
|
2627
|
+
symbol: string;
|
|
2628
|
+
/**
|
|
2629
|
+
* Denomination of this asset to represent fungibility.
|
|
2630
|
+
*/
|
|
2631
|
+
denomination: number;
|
|
2632
|
+
/**
|
|
2633
|
+
* Type of asset like SECP256K1 or NFT.
|
|
2634
|
+
*/
|
|
2635
|
+
type: string;
|
|
2636
|
+
/**
|
|
2637
|
+
* Timestamp in seconds this asset was created on.
|
|
2638
|
+
*/
|
|
2639
|
+
createdAtTimestamp: number;
|
|
2640
|
+
/**
|
|
2641
|
+
* Cap represents if an asset can be or is fixed cap.
|
|
2642
|
+
*/
|
|
2643
|
+
cap: string;
|
|
2644
|
+
};
|
|
2645
|
+
|
|
2646
|
+
type XChainTransaction = {
|
|
2647
|
+
/**
|
|
2648
|
+
* Unique ID for this transaction.
|
|
2649
|
+
*/
|
|
2650
|
+
txHash: string;
|
|
2651
|
+
/**
|
|
2652
|
+
* A transaction on X-Chain can be accepted over multiple vertices.
|
|
2653
|
+
*/
|
|
2654
|
+
vertices: Array<TransactionVertexDetail>;
|
|
2655
|
+
/**
|
|
2656
|
+
* Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices.
|
|
2657
|
+
*/
|
|
2658
|
+
timestamp: number;
|
|
2659
|
+
/**
|
|
2660
|
+
* Type of transaction.
|
|
2661
|
+
*/
|
|
2662
|
+
txType: string;
|
|
2663
|
+
/**
|
|
2664
|
+
* Hex encoded memo bytes for this transaction.
|
|
2665
|
+
*/
|
|
2666
|
+
memo: string;
|
|
2667
|
+
consumedUtxos: Array<Utxo>;
|
|
2668
|
+
emittedUtxos: Array<Utxo>;
|
|
2669
|
+
/**
|
|
2670
|
+
* Assets unlocked by inputs of this transaction.
|
|
2671
|
+
*/
|
|
2672
|
+
amountUnlocked: Array<Asset>;
|
|
2673
|
+
/**
|
|
2674
|
+
* Assets created by outputs of this transaction.
|
|
2675
|
+
*/
|
|
2676
|
+
amountCreated: Array<Asset>;
|
|
2677
|
+
/**
|
|
2678
|
+
* Source chain for an atomic transaction.
|
|
2679
|
+
*/
|
|
2680
|
+
sourceChain?: string;
|
|
2681
|
+
/**
|
|
2682
|
+
* Destination chain for an atomic transaction.
|
|
2683
|
+
*/
|
|
2684
|
+
destinationChain?: string;
|
|
2685
|
+
/**
|
|
2686
|
+
* Asset details of the asset created in CreateAssetTx
|
|
2687
|
+
*/
|
|
2688
|
+
assetCreated?: XChainAssetDetails;
|
|
2689
|
+
};
|
|
2690
|
+
|
|
2691
|
+
type ListXChainTransactionsResponse = {
|
|
2692
|
+
/**
|
|
2693
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
2694
|
+
*/
|
|
2695
|
+
nextPageToken?: string;
|
|
2696
|
+
transactions: Array<XChainTransaction>;
|
|
2697
|
+
};
|
|
2698
|
+
|
|
2699
|
+
type XChainVertex = {
|
|
2700
|
+
vertexHash: string;
|
|
2701
|
+
parentHashes: Array<string>;
|
|
2702
|
+
vertexHeight: number;
|
|
2703
|
+
vertexIndex: number;
|
|
2704
|
+
vertexTimestamp: number;
|
|
2705
|
+
txCount: number;
|
|
2706
|
+
transactions: Array<string>;
|
|
2707
|
+
vertexSizeBytes: number;
|
|
2708
|
+
};
|
|
2709
|
+
|
|
2710
|
+
type ListXChainVerticesResponse = {
|
|
2711
|
+
/**
|
|
2712
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
2713
|
+
*/
|
|
2714
|
+
nextPageToken?: string;
|
|
2715
|
+
vertices: Array<XChainVertex>;
|
|
2716
|
+
};
|
|
2717
|
+
|
|
2718
|
+
declare enum Network {
|
|
2719
|
+
MAINNET = "mainnet",
|
|
2720
|
+
FUJI = "fuji"
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
declare enum PChainId {
|
|
2724
|
+
P_CHAIN = "p-chain",
|
|
2725
|
+
_11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY"
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
declare enum XChainId {
|
|
2729
|
+
X_CHAIN = "x-chain",
|
|
2730
|
+
_2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM"
|
|
2731
|
+
}
|
|
2732
|
+
|
|
2733
|
+
declare class PrimaryNetworkService {
|
|
2734
|
+
readonly httpRequest: BaseHttpRequest;
|
|
2735
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
2736
|
+
/**
|
|
2737
|
+
* Returns the details of the supplied transaction hash.
|
|
2738
|
+
* @returns any
|
|
2739
|
+
* @throws ApiError
|
|
2740
|
+
*/
|
|
2741
|
+
getTxByHash({ blockchainId, network, txHash, }: {
|
|
2742
|
+
/**
|
|
2743
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
2744
|
+
*/
|
|
2745
|
+
blockchainId: BlockchainId;
|
|
2746
|
+
/**
|
|
2747
|
+
* Either mainnet or a testnet.
|
|
2748
|
+
*/
|
|
2749
|
+
network: Network;
|
|
2750
|
+
/**
|
|
2751
|
+
* A primary network (P or X chain) transaction hash.
|
|
2752
|
+
*/
|
|
2753
|
+
txHash: string;
|
|
2754
|
+
}): CancelablePromise<(PChainTransaction | XChainTransaction | CChainExportTransaction | CChainImportTransaction)>;
|
|
2755
|
+
/**
|
|
2756
|
+
* Returns latest transactions. If addresses are supplied, returns transactions for those addresses.
|
|
2757
|
+
* @returns any
|
|
2758
|
+
* @throws ApiError
|
|
2759
|
+
*/
|
|
2760
|
+
listLatestPrimaryNetworkTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
|
|
2761
|
+
/**
|
|
2762
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
2763
|
+
*/
|
|
2764
|
+
blockchainId: BlockchainId;
|
|
2765
|
+
/**
|
|
2766
|
+
* Either mainnet or a testnet.
|
|
2767
|
+
*/
|
|
2768
|
+
network: Network;
|
|
2769
|
+
/**
|
|
2770
|
+
* A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
|
|
2771
|
+
*/
|
|
2772
|
+
addresses?: string;
|
|
2773
|
+
/**
|
|
2774
|
+
* The maximum number of items to return. The minimum page size
|
|
2775
|
+
* is 1. The maximum pageSize is 100.
|
|
2776
|
+
*/
|
|
2777
|
+
pageSize?: number;
|
|
2778
|
+
/**
|
|
2779
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
2780
|
+
*/
|
|
2781
|
+
pageToken?: string;
|
|
2782
|
+
/**
|
|
2783
|
+
* The order by which to sort results. Use "asc" for ascending
|
|
2784
|
+
* order, "desc" for descending order. Sorted by timestamp or the `sortBy`
|
|
2785
|
+
* query parameter, if provided.
|
|
2786
|
+
*/
|
|
2787
|
+
sortOrder?: SortOrder;
|
|
2788
|
+
}): CancelablePromise<(ListPChainTransactionsResponse | ListXChainTransactionsResponse | ListCChainExportTxsResponse | ListCChainImportTxsResponse)>;
|
|
2789
|
+
/**
|
|
2790
|
+
* Returns active staking transactions for supplied addresses.
|
|
2791
|
+
* @returns ListPChainTransactionsResponse
|
|
2792
|
+
* @throws ApiError
|
|
2793
|
+
*/
|
|
2794
|
+
listActivePrimaryNetworkStakingTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
|
|
2795
|
+
/**
|
|
2796
|
+
* A supported chain name for P-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain instead!
|
|
2797
|
+
*/
|
|
2798
|
+
blockchainId: PChainId;
|
|
2799
|
+
/**
|
|
2800
|
+
* Either mainnet or a testnet.
|
|
2801
|
+
*/
|
|
2802
|
+
network: Network;
|
|
2803
|
+
/**
|
|
2804
|
+
* A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
|
|
2805
|
+
*/
|
|
2806
|
+
addresses?: string;
|
|
2807
|
+
/**
|
|
2808
|
+
* The maximum number of items to return. The minimum page size
|
|
2809
|
+
* is 1. The maximum pageSize is 100.
|
|
2810
|
+
*/
|
|
2811
|
+
pageSize?: number;
|
|
2812
|
+
/**
|
|
2813
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
2814
|
+
*/
|
|
2815
|
+
pageToken?: string;
|
|
2816
|
+
/**
|
|
2817
|
+
* The order by which to sort results. Use "asc" for ascending
|
|
2818
|
+
* order, "desc" for descending order. Sorted by timestamp or the `sortBy`
|
|
2819
|
+
* query parameter, if provided.
|
|
2820
|
+
*/
|
|
2821
|
+
sortOrder?: SortOrder;
|
|
2822
|
+
}): CancelablePromise<ListPChainTransactionsResponse>;
|
|
2823
|
+
/**
|
|
2824
|
+
* Returns a list of UTXOs for the supplied addresses.
|
|
2825
|
+
* @returns any
|
|
2826
|
+
* @throws ApiError
|
|
2827
|
+
*/
|
|
2828
|
+
getUtxosByAddresses({ blockchainId, network, addresses, pageSize, pageToken, assetId, sortOrder, }: {
|
|
2829
|
+
/**
|
|
2830
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
2831
|
+
*/
|
|
2832
|
+
blockchainId: BlockchainId;
|
|
2833
|
+
/**
|
|
2834
|
+
* Either mainnet or a testnet.
|
|
2835
|
+
*/
|
|
2836
|
+
network: Network;
|
|
2837
|
+
/**
|
|
2838
|
+
* A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
|
|
2839
|
+
*/
|
|
2840
|
+
addresses?: string;
|
|
2841
|
+
/**
|
|
2842
|
+
* The maximum number of items to return. The minimum page size
|
|
2843
|
+
* is 1. The maximum pageSize is 100.
|
|
2844
|
+
*/
|
|
2845
|
+
pageSize?: number;
|
|
2846
|
+
/**
|
|
2847
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
2848
|
+
*/
|
|
2849
|
+
pageToken?: string;
|
|
2850
|
+
/**
|
|
2851
|
+
* Asset ID for any asset (only applicable X-Chain)
|
|
2852
|
+
*/
|
|
2853
|
+
assetId?: string;
|
|
2854
|
+
/**
|
|
2855
|
+
* The order by which to sort results. Use "asc" for ascending
|
|
2856
|
+
* order, "desc" for descending order. Sorted by timestamp or the `sortBy`
|
|
2857
|
+
* query parameter, if provided.
|
|
2858
|
+
*/
|
|
2859
|
+
sortOrder?: SortOrder;
|
|
2860
|
+
}): CancelablePromise<(ListPChainUtxosResponse | ListUtxosResponse)>;
|
|
2861
|
+
/**
|
|
2862
|
+
* Returns balance for P-Chain, X-Chain, and C-Chain (only shared memory balance for C-Chain).
|
|
2863
|
+
* @returns any
|
|
2864
|
+
* @throws ApiError
|
|
2865
|
+
*/
|
|
2866
|
+
getBalancesByAddresses({ blockchainId, network, addresses, }: {
|
|
2867
|
+
/**
|
|
2868
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
2869
|
+
*/
|
|
2870
|
+
blockchainId: BlockchainId;
|
|
2871
|
+
/**
|
|
2872
|
+
* Either mainnet or a testnet.
|
|
2873
|
+
*/
|
|
2874
|
+
network: Network;
|
|
2875
|
+
/**
|
|
2876
|
+
* A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
|
|
2877
|
+
*/
|
|
2878
|
+
addresses?: string;
|
|
2879
|
+
}): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
|
|
2880
|
+
/**
|
|
2881
|
+
* Returns block by block_height or block_hash on P-Chain or C-Chain (hexadecimal for C-Chain).
|
|
2882
|
+
* @returns ListBlocksResponse
|
|
2883
|
+
* @throws ApiError
|
|
2884
|
+
*/
|
|
2885
|
+
getBlockById({ blockchainId, network, blockId, }: {
|
|
2886
|
+
/**
|
|
2887
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain or c-chain instead!
|
|
2888
|
+
*/
|
|
2889
|
+
blockchainId: CPBlockchainId;
|
|
2890
|
+
/**
|
|
2891
|
+
* Either mainnet or a testnet.
|
|
2892
|
+
*/
|
|
2893
|
+
network: Network;
|
|
2894
|
+
/**
|
|
2895
|
+
* A block identifier which is either a block number or the block hash.
|
|
2896
|
+
*/
|
|
2897
|
+
blockId: string;
|
|
2898
|
+
}): CancelablePromise<ListBlocksResponse>;
|
|
2899
|
+
/**
|
|
2900
|
+
* Returns latest blocks, up to user defined limit on P-Chain or C-Chain.
|
|
2901
|
+
* @returns ListBlocksResponse
|
|
2902
|
+
* @throws ApiError
|
|
2903
|
+
*/
|
|
2904
|
+
listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
|
|
2905
|
+
/**
|
|
2906
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain or c-chain instead!
|
|
2907
|
+
*/
|
|
2908
|
+
blockchainId: CPBlockchainId;
|
|
2909
|
+
/**
|
|
2910
|
+
* Either mainnet or a testnet.
|
|
2911
|
+
*/
|
|
2912
|
+
network: Network;
|
|
2913
|
+
/**
|
|
2914
|
+
* The maximum number of items to return. The minimum page size
|
|
2915
|
+
* is 1. The maximum pageSize is 100.
|
|
2916
|
+
*/
|
|
2917
|
+
pageSize?: number;
|
|
2918
|
+
/**
|
|
2919
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
2920
|
+
*/
|
|
2921
|
+
pageToken?: string;
|
|
2922
|
+
}): CancelablePromise<ListBlocksResponse>;
|
|
2923
|
+
/**
|
|
2924
|
+
* Returns latest vertices, up to user defined limit on X-Chain.
|
|
2925
|
+
* @returns ListXChainVerticesResponse
|
|
2926
|
+
* @throws ApiError
|
|
2927
|
+
*/
|
|
2928
|
+
listLatestXChainVertices({ blockchainId, network, pageSize, pageToken, }: {
|
|
2929
|
+
/**
|
|
2930
|
+
* A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
|
|
2931
|
+
*/
|
|
2932
|
+
blockchainId: XChainId;
|
|
2933
|
+
/**
|
|
2934
|
+
* Either mainnet or a testnet.
|
|
2935
|
+
*/
|
|
2936
|
+
network: Network;
|
|
2937
|
+
/**
|
|
2938
|
+
* The maximum number of items to return. The minimum page size
|
|
2939
|
+
* is 1. The maximum pageSize is 100.
|
|
2940
|
+
*/
|
|
2941
|
+
pageSize?: number;
|
|
2942
|
+
/**
|
|
2943
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
2944
|
+
*/
|
|
2945
|
+
pageToken?: string;
|
|
2946
|
+
}): CancelablePromise<ListXChainVerticesResponse>;
|
|
2947
|
+
/**
|
|
2948
|
+
* Returns one vertex with the provided vertex hash on X-Chain.
|
|
2949
|
+
* @returns XChainVertex
|
|
2950
|
+
* @throws ApiError
|
|
2951
|
+
*/
|
|
2952
|
+
getVertexByHash({ vertexHash, blockchainId, network, }: {
|
|
2953
|
+
/**
|
|
2954
|
+
* A vertex hash string.
|
|
2955
|
+
*/
|
|
2956
|
+
vertexHash: string;
|
|
2957
|
+
/**
|
|
2958
|
+
* A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
|
|
2959
|
+
*/
|
|
2960
|
+
blockchainId: XChainId;
|
|
2961
|
+
/**
|
|
2962
|
+
* Either mainnet or a testnet.
|
|
2963
|
+
*/
|
|
2964
|
+
network: Network;
|
|
2965
|
+
}): CancelablePromise<XChainVertex>;
|
|
2966
|
+
/**
|
|
2967
|
+
* Returns vertices with the provided vertex height on X-Chain.
|
|
2968
|
+
* @returns ListXChainVerticesResponse
|
|
2969
|
+
* @throws ApiError
|
|
2970
|
+
*/
|
|
2971
|
+
getVertexByHeight({ vertexHeight, blockchainId, network, pageSize, pageToken, sortOrder, }: {
|
|
2972
|
+
/**
|
|
2973
|
+
* The height of a vertex.
|
|
2974
|
+
*/
|
|
2975
|
+
vertexHeight: number;
|
|
2976
|
+
/**
|
|
2977
|
+
* A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
|
|
2978
|
+
*/
|
|
2979
|
+
blockchainId: XChainId;
|
|
2980
|
+
/**
|
|
2981
|
+
* Either mainnet or a testnet.
|
|
2982
|
+
*/
|
|
2983
|
+
network: Network;
|
|
2984
|
+
/**
|
|
2985
|
+
* The maximum number of items to return. The minimum page size
|
|
2986
|
+
* is 1. The maximum pageSize is 100.
|
|
2987
|
+
*/
|
|
2988
|
+
pageSize?: number;
|
|
2989
|
+
/**
|
|
2990
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
2991
|
+
*/
|
|
2992
|
+
pageToken?: string;
|
|
2993
|
+
/**
|
|
2994
|
+
* The order by which to sort results. Use "asc" for ascending
|
|
2995
|
+
* order, "desc" for descending order. Sorted by timestamp or the `sortBy`
|
|
2996
|
+
* query parameter, if provided.
|
|
1484
2997
|
*/
|
|
1485
2998
|
sortOrder?: SortOrder;
|
|
1486
|
-
}
|
|
2999
|
+
}): CancelablePromise<ListXChainVerticesResponse>;
|
|
3000
|
+
/**
|
|
3001
|
+
* Returns asset details corresponding to the asset id on X-Chain.
|
|
3002
|
+
* @returns XChainAssetDetails
|
|
3003
|
+
* @throws ApiError
|
|
3004
|
+
*/
|
|
3005
|
+
getAssetDetails({ assetId, blockchainId, network, }: {
|
|
3006
|
+
/**
|
|
3007
|
+
* Asset ID for any asset on X-Chain
|
|
3008
|
+
*/
|
|
3009
|
+
assetId: string;
|
|
3010
|
+
/**
|
|
3011
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
3012
|
+
*/
|
|
3013
|
+
blockchainId: BlockchainId;
|
|
3014
|
+
/**
|
|
3015
|
+
* Either mainnet or a testnet.
|
|
3016
|
+
*/
|
|
3017
|
+
network: Network;
|
|
3018
|
+
}): CancelablePromise<XChainAssetDetails>;
|
|
3019
|
+
/**
|
|
3020
|
+
* Returns asset transactions corresponding to the asset id on X-Chain.
|
|
3021
|
+
* @returns ListXChainTransactionsResponse
|
|
3022
|
+
* @throws ApiError
|
|
3023
|
+
*/
|
|
3024
|
+
getAssetTransactions({ blockchainId, network, assetId, pageSize, pageToken, }: {
|
|
3025
|
+
/**
|
|
3026
|
+
* A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
|
|
3027
|
+
*/
|
|
3028
|
+
blockchainId: XChainId;
|
|
3029
|
+
/**
|
|
3030
|
+
* Either mainnet or a testnet.
|
|
3031
|
+
*/
|
|
3032
|
+
network: Network;
|
|
3033
|
+
/**
|
|
3034
|
+
* Asset ID for any asset on X-Chain
|
|
3035
|
+
*/
|
|
3036
|
+
assetId: string;
|
|
3037
|
+
/**
|
|
3038
|
+
* The maximum number of items to return. The minimum page size
|
|
3039
|
+
* is 1. The maximum pageSize is 100.
|
|
3040
|
+
*/
|
|
3041
|
+
pageSize?: number;
|
|
3042
|
+
/**
|
|
3043
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
3044
|
+
*/
|
|
3045
|
+
pageToken?: string;
|
|
3046
|
+
}): CancelablePromise<ListXChainTransactionsResponse>;
|
|
3047
|
+
/**
|
|
3048
|
+
* Return all address-mapped chain IDs that an address has been seen on chain before.
|
|
3049
|
+
* @returns ChainAddressChainIdMapListResponse
|
|
3050
|
+
* @throws ApiError
|
|
3051
|
+
*/
|
|
3052
|
+
getChainAddresses({ addresses, network, }: {
|
|
3053
|
+
/**
|
|
3054
|
+
* A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
|
|
3055
|
+
*/
|
|
3056
|
+
addresses: string;
|
|
3057
|
+
/**
|
|
3058
|
+
* Either mainnet or a testnet.
|
|
3059
|
+
*/
|
|
3060
|
+
network: Network;
|
|
3061
|
+
}): CancelablePromise<ChainAddressChainIdMapListResponse>;
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
3065
|
+
declare class Glacier {
|
|
3066
|
+
readonly evm: EvmService;
|
|
3067
|
+
readonly healthCheck: HealthCheckService;
|
|
3068
|
+
readonly operations: OperationsService;
|
|
3069
|
+
readonly primaryNetwork: PrimaryNetworkService;
|
|
3070
|
+
readonly request: BaseHttpRequest;
|
|
3071
|
+
constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
|
|
3072
|
+
}
|
|
3073
|
+
|
|
3074
|
+
type ApiResult = {
|
|
3075
|
+
readonly url: string;
|
|
3076
|
+
readonly ok: boolean;
|
|
3077
|
+
readonly status: number;
|
|
3078
|
+
readonly statusText: string;
|
|
3079
|
+
readonly body: any;
|
|
3080
|
+
};
|
|
3081
|
+
|
|
3082
|
+
declare class ApiError extends Error {
|
|
3083
|
+
readonly url: string;
|
|
3084
|
+
readonly status: number;
|
|
3085
|
+
readonly statusText: string;
|
|
3086
|
+
readonly body: any;
|
|
3087
|
+
readonly request: ApiRequestOptions;
|
|
3088
|
+
constructor(request: ApiRequestOptions, response: ApiResult, message: string);
|
|
1487
3089
|
}
|
|
1488
3090
|
|
|
1489
|
-
export { Address, AssetType, BlockchainId, CancelListingEventResponse, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, CloseAuctionEventResponse, ContractType, CurrencyCode, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, ErcType, FullNativeTransactionDetails, GetBlockResponse, GetChainResponse, GetContractInformationResponse, GetNativeBalanceResponse,
|
|
3091
|
+
export { Address, ApiError, Asset, AssetType, BaseHttpRequest, Block, BlockchainId, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CPBlockchainId, CancelError, CancelListingEventResponse, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, CloseAuctionEventResponse, CollectionMetrics, CollectionSortByOption, ContractType, CreateTransactionExportRequest, CurrencyCode, EVMInput, EVMOutput, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, ErcType, EvmNetworkOptions, EvmService, FullNativeTransactionDetails, GetBlockResponse, GetChainResponse, GetContractInformationResponse, GetNativeBalanceResponse, GetTransactionResponse, Glacier, HealthCheckService, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlocksResponse, ListCChainAtomicBalancesResponse, ListCChainExportTxsResponse, ListCChainImportTxsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListInternalTransactionsResponse, ListListingsResponse, ListNativeTransactionsResponse, ListNftCollectionWithMetricsResponse, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, ListingCurrencyType, ListingEventType, ListingResponse, ListingType, ListingsSortByOption, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NftCollection, NftCollectionWithMetrics, NftFilterOptionsProperty, NftSearchBody, NftSearchResultTypeOption, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OpenListingEventResponse, OperationMetadata, OperationStatusResponse, OperationsService, PChainAsset, PChainBalance, PChainConsumedUtxo, PChainEmittedUtxo, PChainId, PChainTransaction, PChainUtxo, PaginationParams, PrimaryNetworkOptions, PrimaryNetworkService, ProposerDetails, PurchaseListingEventResponse, ResourceLink, ResourceLinkType, ReviewStatus, RichAddress, SortOrder, TokenWithPrice, TransactionDetails, TransactionMethodType, TransactionStatus, TransactionVertexDetail, TrendingTimeframe, UtilityAddresses, Utxo, UtxoCredential, VmName, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainSharedAssetBalance, XChainTransaction, XChainVertex };
|