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