@avalabs/glacier-sdk 2.8.0-alpha.12 → 2.8.0-alpha.121
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 +3476 -3
- package/dist/index.js +1681 -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/Asset.d.ts +28 -0
- package/esm/generated/models/Blockchain.d.ts +10 -0
- package/esm/generated/models/BlockchainId.d.ts +12 -0
- package/esm/generated/models/BlockchainId.js +13 -0
- package/esm/generated/models/BlockchainIds.d.ts +9 -0
- package/esm/generated/models/BlockchainIds.js +10 -0
- package/esm/generated/models/BlockchainInfo.d.ts +5 -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/ChainAddressChainIdMap.d.ts +8 -0
- package/esm/generated/models/ChainAddressChainIdMapListResponse.d.ts +7 -0
- package/esm/generated/models/ChainInfo.d.ts +27 -0
- package/esm/generated/models/ChainStatus.d.ts +6 -0
- package/esm/generated/models/ChainStatus.js +7 -0
- package/esm/generated/models/CollectionMetrics.d.ts +41 -0
- package/esm/generated/models/CollectionSortByOption.d.ts +9 -0
- package/esm/generated/models/CollectionSortByOption.js +10 -0
- package/esm/generated/models/CompletedValidatorDetails.d.ts +15 -0
- package/esm/generated/models/CreateEvmTransactionExportRequest.d.ts +23 -0
- package/esm/generated/models/CreateEvmTransactionExportRequest.js +8 -0
- package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.d.ts +23 -0
- package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.js +8 -0
- package/esm/generated/models/CurrencyCode.d.ts +18 -0
- package/esm/generated/models/CurrencyCode.js +19 -0
- package/esm/generated/models/DelegatorsDetails.d.ts +6 -0
- package/esm/generated/models/EVMInput.d.ts +19 -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 +27 -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 +28 -0
- package/esm/generated/models/Erc1155TransferDetails.d.ts +12 -0
- package/esm/generated/models/Erc20Token.d.ts +36 -0
- package/esm/generated/models/Erc20Token.js +8 -0
- package/esm/generated/models/Erc20TokenBalance.d.ts +48 -0
- package/esm/generated/models/Erc20TokenBalance.js +8 -0
- package/esm/generated/models/Erc20Transfer.d.ts +28 -0
- package/esm/generated/models/Erc20TransferDetails.d.ts +12 -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 +27 -0
- package/esm/generated/models/Erc721TransferDetails.d.ts +11 -0
- package/esm/generated/models/ErcType.d.ts +8 -0
- package/esm/generated/models/ErcType.js +9 -0
- package/esm/generated/models/EvmBlock.d.ts +45 -0
- package/esm/generated/models/EvmNetworkOptions.d.ts +6 -0
- package/esm/generated/models/FloorPrice.d.ts +8 -0
- package/esm/generated/models/FullNativeTransactionDetails.d.ts +62 -0
- package/esm/generated/models/GetChainResponse.d.ts +27 -0
- package/esm/generated/models/GetEvmBlockResponse.d.ts +45 -0
- package/esm/generated/models/GetNativeBalanceResponse.d.ts +10 -0
- package/esm/generated/models/GetNetworkDetailsResponse.d.ts +9 -0
- package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +15 -0
- package/esm/generated/models/GetTransactionResponse.d.ts +29 -0
- package/esm/generated/models/HistoricalReward.d.ts +24 -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/ListBlockchainsResponse.d.ts +11 -0
- package/esm/generated/models/ListCChainAtomicBalancesResponse.d.ts +9 -0
- package/esm/generated/models/ListCChainAtomicTransactionsResponse.d.ts +14 -0
- package/esm/generated/models/ListChainsResponse.d.ts +7 -0
- package/esm/generated/models/ListCollectibleBalancesResponse.d.ts +15 -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/ListEvmBlocksResponse.d.ts +11 -0
- package/esm/generated/models/ListHistoricalRewardsResponse.d.ts +11 -0
- package/esm/generated/models/ListInternalTransactionsResponse.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 +9 -0
- package/esm/generated/models/ListPChainTransactionsResponse.d.ts +13 -0
- package/esm/generated/models/ListPChainUtxosResponse.d.ts +13 -0
- package/esm/generated/models/ListPendingRewardsResponse.d.ts +11 -0
- package/esm/generated/models/ListPrimaryNetworkBlocksResponse.d.ts +13 -0
- package/esm/generated/models/ListSubnetsResponse.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 +13 -0
- package/esm/generated/models/ListValidatorDetailsResponse.d.ts +11 -0
- package/esm/generated/models/ListXChainBalancesResponse.d.ts +9 -0
- package/esm/generated/models/ListXChainTransactionsResponse.d.ts +14 -0
- package/esm/generated/models/ListXChainVerticesResponse.d.ts +13 -0
- package/esm/generated/models/Method.d.ts +18 -0
- package/esm/generated/models/Money.d.ts +14 -0
- package/esm/generated/models/NativeTokenBalance.d.ts +38 -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 +21 -0
- package/esm/generated/models/NetworkTokenDetails.d.ts +16 -0
- package/esm/generated/models/NetworkType.d.ts +6 -0
- package/esm/generated/models/NetworkType.js +7 -0
- package/esm/generated/models/NftCollection.d.ts +24 -0
- package/esm/generated/models/NftCollectionWithMetrics.d.ts +26 -0
- package/esm/generated/models/NftTokenMetadataStatus.d.ts +15 -0
- package/esm/generated/models/NftTokenMetadataStatus.js +16 -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/OperationType.d.ts +6 -0
- package/esm/generated/models/OperationType.js +7 -0
- package/esm/generated/models/PChainAsset.d.ts +6 -0
- package/esm/generated/models/PChainBalance.d.ts +39 -0
- package/esm/generated/models/PChainId.d.ts +6 -0
- package/esm/generated/models/PChainId.js +7 -0
- package/esm/generated/models/PChainSharedAsset.d.ts +8 -0
- package/esm/generated/models/PChainTransaction.d.ts +71 -0
- package/esm/generated/models/PChainTransactionType.d.ts +16 -0
- package/esm/generated/models/PChainTransactionType.js +17 -0
- package/esm/generated/models/PChainUtxo.d.ts +31 -0
- package/esm/generated/models/PendingReward.d.ts +22 -0
- package/esm/generated/models/PrimaryNetworkBlock.d.ts +15 -0
- package/esm/generated/models/PrimaryNetworkChainInfo.d.ts +6 -0
- package/esm/generated/models/PrimaryNetworkOptions.d.ts +7 -0
- package/esm/generated/models/PrimaryNetworkTxType.d.ts +19 -0
- package/esm/generated/models/PrimaryNetworkTxType.js +20 -0
- package/esm/generated/models/ProposerDetails.d.ts +9 -0
- package/esm/generated/models/ResourceLink.d.ts +8 -0
- package/esm/generated/models/ResourceLinkType.d.ts +22 -0
- package/esm/generated/models/ResourceLinkType.js +23 -0
- package/esm/generated/models/RewardType.d.ts +6 -0
- package/esm/generated/models/RewardType.js +7 -0
- package/esm/generated/models/Rewards.d.ts +6 -0
- package/esm/generated/models/RichAddress.d.ts +24 -0
- package/esm/generated/models/SortOrder.d.ts +6 -0
- package/esm/generated/models/SortOrder.js +7 -0
- package/esm/generated/models/StakingDistribution.d.ts +6 -0
- package/esm/generated/models/Subnet.d.ts +13 -0
- package/esm/generated/models/TransactionDetails.d.ts +30 -0
- package/esm/generated/models/TransactionExportMetadata.d.ts +15 -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 +68 -0
- package/esm/generated/models/UtxoCredential.d.ts +12 -0
- package/esm/generated/models/UtxoType.d.ts +6 -0
- package/esm/generated/models/UtxoType.js +7 -0
- package/esm/generated/models/ValidationStatusType.d.ts +5 -0
- package/esm/generated/models/ValidationStatusType.js +6 -0
- package/esm/generated/models/ValidatorsDetails.d.ts +10 -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 +7 -0
- package/esm/generated/models/XChainId.js +8 -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 +616 -0
- package/esm/generated/services/EvmService.js +463 -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 +35 -0
- package/esm/generated/services/OperationsService.js +28 -0
- package/esm/generated/services/PrimaryNetworkService.d.ts +618 -0
- package/esm/generated/services/PrimaryNetworkService.js +432 -0
- package/esm/index.d.ts +146 -0
- package/esm/index.js +47 -0
- package/package.json +11 -20
- package/CHANGELOG.md +0 -236
- 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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var TrendingTimeframe = /* @__PURE__ */ ((TrendingTimeframe2) => {
|
|
2
|
+
TrendingTimeframe2["DAY"] = "day";
|
|
3
|
+
TrendingTimeframe2["WEEK"] = "week";
|
|
4
|
+
TrendingTimeframe2["MONTH"] = "month";
|
|
5
|
+
return TrendingTimeframe2;
|
|
6
|
+
})(TrendingTimeframe || {});
|
|
7
|
+
|
|
8
|
+
export { TrendingTimeframe };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Asset } from './Asset.js';
|
|
2
|
+
import { UtxoCredential } from './UtxoCredential.js';
|
|
3
|
+
|
|
4
|
+
type Utxo = {
|
|
5
|
+
/**
|
|
6
|
+
* UTXO ID for this output.
|
|
7
|
+
*/
|
|
8
|
+
utxoId: string;
|
|
9
|
+
asset: Asset;
|
|
10
|
+
/**
|
|
11
|
+
* Type of output.
|
|
12
|
+
*/
|
|
13
|
+
utxoType: string;
|
|
14
|
+
/**
|
|
15
|
+
* Blockchain ID on which this output is created on.
|
|
16
|
+
*/
|
|
17
|
+
createdOnChainId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Blockchain ID on which this output is consumed on.
|
|
20
|
+
*/
|
|
21
|
+
consumedOnChainId: string;
|
|
22
|
+
/**
|
|
23
|
+
* Transaction ID that created this output.
|
|
24
|
+
*/
|
|
25
|
+
creationTxHash: string;
|
|
26
|
+
/**
|
|
27
|
+
* Transaction ID that consumed this output.
|
|
28
|
+
*/
|
|
29
|
+
consumingTxHash?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Timestamp in seconds this output is consumed.
|
|
32
|
+
*/
|
|
33
|
+
consumingTxTimestamp?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Postion of this output in a list of lexiographically sorted outputs of a transaction.
|
|
36
|
+
*/
|
|
37
|
+
outputIndex: string;
|
|
38
|
+
/**
|
|
39
|
+
* Timestamp in seconds this outptut is created on.
|
|
40
|
+
*/
|
|
41
|
+
timestamp: number;
|
|
42
|
+
/**
|
|
43
|
+
* Locktime in seconds after which this output can be consumed.
|
|
44
|
+
*/
|
|
45
|
+
locktime: number;
|
|
46
|
+
/**
|
|
47
|
+
* Minimum number of signatures required to consume this output.
|
|
48
|
+
*/
|
|
49
|
+
threshold: number;
|
|
50
|
+
/**
|
|
51
|
+
* Addresses that are eligible to sign the consumption of this output.
|
|
52
|
+
*/
|
|
53
|
+
addresses: Array<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Hex encoded data for NFT assets
|
|
56
|
+
*/
|
|
57
|
+
payload?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Index representing the minting set for the NFT mint output
|
|
60
|
+
*/
|
|
61
|
+
groupId?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Credentials that signed the transaction to consume this utxo
|
|
64
|
+
*/
|
|
65
|
+
credentials?: Array<UtxoCredential>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export { Utxo };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StakingDistribution } from './StakingDistribution.js';
|
|
2
|
+
|
|
3
|
+
type ValidatorsDetails = {
|
|
4
|
+
validatorCount: number;
|
|
5
|
+
totalAmountStaked: string;
|
|
6
|
+
estimatedAnnualStakingReward: string;
|
|
7
|
+
stakingDistributionByVersion: Array<StakingDistribution>;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { ValidatorsDetails };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type XChainAssetBalance = {
|
|
2
|
+
/**
|
|
3
|
+
* Unique ID for an asset.
|
|
4
|
+
*/
|
|
5
|
+
assetId: string;
|
|
6
|
+
/**
|
|
7
|
+
* Name of this asset.
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* Symbol for this asset (max 4 characters).
|
|
12
|
+
*/
|
|
13
|
+
symbol: string;
|
|
14
|
+
/**
|
|
15
|
+
* Denomination of this asset to represent fungibility.
|
|
16
|
+
*/
|
|
17
|
+
denomination: number;
|
|
18
|
+
/**
|
|
19
|
+
* Type of asset like SECP256K1 or NFT.
|
|
20
|
+
*/
|
|
21
|
+
type: string;
|
|
22
|
+
/**
|
|
23
|
+
* Amount of the asset.
|
|
24
|
+
*/
|
|
25
|
+
amount: string;
|
|
26
|
+
utxoCount: number;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { XChainAssetBalance };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
type XChainAssetDetails = {
|
|
2
|
+
/**
|
|
3
|
+
* Unique ID for an asset.
|
|
4
|
+
*/
|
|
5
|
+
assetId: string;
|
|
6
|
+
/**
|
|
7
|
+
* Name of this asset.
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* Symbol for this asset (max 4 characters).
|
|
12
|
+
*/
|
|
13
|
+
symbol: string;
|
|
14
|
+
/**
|
|
15
|
+
* Denomination of this asset to represent fungibility.
|
|
16
|
+
*/
|
|
17
|
+
denomination: number;
|
|
18
|
+
/**
|
|
19
|
+
* Type of asset like SECP256K1 or NFT.
|
|
20
|
+
*/
|
|
21
|
+
type: string;
|
|
22
|
+
/**
|
|
23
|
+
* Timestamp in seconds this asset was created on.
|
|
24
|
+
*/
|
|
25
|
+
createdAtTimestamp: number;
|
|
26
|
+
/**
|
|
27
|
+
* Cap represents if an asset can be or is fixed cap.
|
|
28
|
+
*/
|
|
29
|
+
cap: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { XChainAssetDetails };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { XChainAssetBalance } from './XChainAssetBalance.js';
|
|
2
|
+
import { XChainSharedAssetBalance } from './XChainSharedAssetBalance.js';
|
|
3
|
+
|
|
4
|
+
type XChainBalances = {
|
|
5
|
+
/**
|
|
6
|
+
* A list of objects containing X-chain Asset balance information.
|
|
7
|
+
*/
|
|
8
|
+
locked: Array<XChainAssetBalance>;
|
|
9
|
+
/**
|
|
10
|
+
* A list of objects containing X-chain Asset balance information.
|
|
11
|
+
*/
|
|
12
|
+
unlocked: Array<XChainAssetBalance>;
|
|
13
|
+
atomicMemoryUnlocked: Array<XChainSharedAssetBalance>;
|
|
14
|
+
atomicMemoryLocked: Array<XChainSharedAssetBalance>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { XChainBalances };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare enum XChainId {
|
|
2
|
+
_2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
|
|
3
|
+
_2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",
|
|
4
|
+
X_CHAIN = "x-chain"
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { XChainId };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var XChainId = /* @__PURE__ */ ((XChainId2) => {
|
|
2
|
+
XChainId2["_2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M"] = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM";
|
|
3
|
+
XChainId2["_2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM"] = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm";
|
|
4
|
+
XChainId2["X_CHAIN"] = "x-chain";
|
|
5
|
+
return XChainId2;
|
|
6
|
+
})(XChainId || {});
|
|
7
|
+
|
|
8
|
+
export { XChainId };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Asset } from './Asset.js';
|
|
2
|
+
import { Utxo } from './Utxo.js';
|
|
3
|
+
import { XChainAssetDetails } from './XChainAssetDetails.js';
|
|
4
|
+
|
|
5
|
+
type XChainLinearTransaction = {
|
|
6
|
+
/**
|
|
7
|
+
* Unique ID for this transaction.
|
|
8
|
+
*/
|
|
9
|
+
txHash: string;
|
|
10
|
+
/**
|
|
11
|
+
* Represents chain format this transaction is included in.
|
|
12
|
+
*/
|
|
13
|
+
chainFormat: XChainLinearTransaction.chainFormat;
|
|
14
|
+
/**
|
|
15
|
+
* Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices.
|
|
16
|
+
*/
|
|
17
|
+
timestamp: number;
|
|
18
|
+
/**
|
|
19
|
+
* Type of transaction.
|
|
20
|
+
*/
|
|
21
|
+
txType: string;
|
|
22
|
+
/**
|
|
23
|
+
* Hex encoded memo bytes for this transaction.
|
|
24
|
+
*/
|
|
25
|
+
memo: string;
|
|
26
|
+
consumedUtxos: Array<Utxo>;
|
|
27
|
+
emittedUtxos: Array<Utxo>;
|
|
28
|
+
/**
|
|
29
|
+
* Assets unlocked by inputs of this transaction.
|
|
30
|
+
*/
|
|
31
|
+
amountUnlocked: Array<Asset>;
|
|
32
|
+
/**
|
|
33
|
+
* Assets created by outputs of this transaction.
|
|
34
|
+
*/
|
|
35
|
+
amountCreated: Array<Asset>;
|
|
36
|
+
/**
|
|
37
|
+
* Source chain for an atomic transaction.
|
|
38
|
+
*/
|
|
39
|
+
sourceChain?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Destination chain for an atomic transaction.
|
|
42
|
+
*/
|
|
43
|
+
destinationChain?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Asset details of the asset created in CreateAssetTx
|
|
46
|
+
*/
|
|
47
|
+
assetCreated?: XChainAssetDetails;
|
|
48
|
+
/**
|
|
49
|
+
* Height of the block this transaction belongs to.
|
|
50
|
+
*/
|
|
51
|
+
blockHeight: number;
|
|
52
|
+
/**
|
|
53
|
+
* Hash of the block this transaction belongs to.
|
|
54
|
+
*/
|
|
55
|
+
blockHash: string;
|
|
56
|
+
};
|
|
57
|
+
declare namespace XChainLinearTransaction {
|
|
58
|
+
/**
|
|
59
|
+
* Represents chain format this transaction is included in.
|
|
60
|
+
*/
|
|
61
|
+
enum chainFormat {
|
|
62
|
+
NON_LINEAR = "non-linear",
|
|
63
|
+
LINEAR = "linear"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { XChainLinearTransaction };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var XChainLinearTransaction;
|
|
2
|
+
((XChainLinearTransaction2) => {
|
|
3
|
+
((chainFormat2) => {
|
|
4
|
+
chainFormat2["NON_LINEAR"] = "non-linear";
|
|
5
|
+
chainFormat2["LINEAR"] = "linear";
|
|
6
|
+
})(XChainLinearTransaction2.chainFormat || (XChainLinearTransaction2.chainFormat = {}));
|
|
7
|
+
})(XChainLinearTransaction || (XChainLinearTransaction = {}));
|
|
8
|
+
|
|
9
|
+
export { XChainLinearTransaction };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Asset } from './Asset.js';
|
|
2
|
+
import { TransactionVertexDetail } from './TransactionVertexDetail.js';
|
|
3
|
+
import { Utxo } from './Utxo.js';
|
|
4
|
+
import { XChainAssetDetails } from './XChainAssetDetails.js';
|
|
5
|
+
|
|
6
|
+
type XChainNonLinearTransaction = {
|
|
7
|
+
/**
|
|
8
|
+
* Unique ID for this transaction.
|
|
9
|
+
*/
|
|
10
|
+
txHash: string;
|
|
11
|
+
/**
|
|
12
|
+
* Represents chain format this transaction is included in.
|
|
13
|
+
*/
|
|
14
|
+
chainFormat: XChainNonLinearTransaction.chainFormat;
|
|
15
|
+
/**
|
|
16
|
+
* Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices.
|
|
17
|
+
*/
|
|
18
|
+
timestamp: number;
|
|
19
|
+
/**
|
|
20
|
+
* Type of transaction.
|
|
21
|
+
*/
|
|
22
|
+
txType: string;
|
|
23
|
+
/**
|
|
24
|
+
* Hex encoded memo bytes for this transaction.
|
|
25
|
+
*/
|
|
26
|
+
memo: string;
|
|
27
|
+
consumedUtxos: Array<Utxo>;
|
|
28
|
+
emittedUtxos: Array<Utxo>;
|
|
29
|
+
/**
|
|
30
|
+
* Assets unlocked by inputs of this transaction.
|
|
31
|
+
*/
|
|
32
|
+
amountUnlocked: Array<Asset>;
|
|
33
|
+
/**
|
|
34
|
+
* Assets created by outputs of this transaction.
|
|
35
|
+
*/
|
|
36
|
+
amountCreated: Array<Asset>;
|
|
37
|
+
/**
|
|
38
|
+
* Source chain for an atomic transaction.
|
|
39
|
+
*/
|
|
40
|
+
sourceChain?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Destination chain for an atomic transaction.
|
|
43
|
+
*/
|
|
44
|
+
destinationChain?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Asset details of the asset created in CreateAssetTx
|
|
47
|
+
*/
|
|
48
|
+
assetCreated?: XChainAssetDetails;
|
|
49
|
+
/**
|
|
50
|
+
* A transaction on X-Chain can be accepted over multiple vertices.
|
|
51
|
+
*/
|
|
52
|
+
vertices: Array<TransactionVertexDetail>;
|
|
53
|
+
};
|
|
54
|
+
declare namespace XChainNonLinearTransaction {
|
|
55
|
+
/**
|
|
56
|
+
* Represents chain format this transaction is included in.
|
|
57
|
+
*/
|
|
58
|
+
enum chainFormat {
|
|
59
|
+
NON_LINEAR = "non-linear",
|
|
60
|
+
LINEAR = "linear"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { XChainNonLinearTransaction };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var XChainNonLinearTransaction;
|
|
2
|
+
((XChainNonLinearTransaction2) => {
|
|
3
|
+
((chainFormat2) => {
|
|
4
|
+
chainFormat2["NON_LINEAR"] = "non-linear";
|
|
5
|
+
chainFormat2["LINEAR"] = "linear";
|
|
6
|
+
})(XChainNonLinearTransaction2.chainFormat || (XChainNonLinearTransaction2.chainFormat = {}));
|
|
7
|
+
})(XChainNonLinearTransaction || (XChainNonLinearTransaction = {}));
|
|
8
|
+
|
|
9
|
+
export { XChainNonLinearTransaction };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type XChainSharedAssetBalance = {
|
|
2
|
+
/**
|
|
3
|
+
* Unique ID for an asset.
|
|
4
|
+
*/
|
|
5
|
+
assetId: string;
|
|
6
|
+
/**
|
|
7
|
+
* Name of this asset.
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* Symbol for this asset (max 4 characters).
|
|
12
|
+
*/
|
|
13
|
+
symbol: string;
|
|
14
|
+
/**
|
|
15
|
+
* Denomination of this asset to represent fungibility.
|
|
16
|
+
*/
|
|
17
|
+
denomination: number;
|
|
18
|
+
/**
|
|
19
|
+
* Type of asset like SECP256K1 or NFT.
|
|
20
|
+
*/
|
|
21
|
+
type: string;
|
|
22
|
+
/**
|
|
23
|
+
* Amount of the asset.
|
|
24
|
+
*/
|
|
25
|
+
amount: string;
|
|
26
|
+
utxoCount: number;
|
|
27
|
+
sharedWithChainId: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { XChainSharedAssetBalance };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type XChainVertex = {
|
|
2
|
+
vertexHash: string;
|
|
3
|
+
parentHashes: Array<string>;
|
|
4
|
+
vertexHeight: number;
|
|
5
|
+
vertexIndex: number;
|
|
6
|
+
vertexTimestamp: number;
|
|
7
|
+
txCount: number;
|
|
8
|
+
transactions: Array<string>;
|
|
9
|
+
vertexSizeBytes: number;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { XChainVertex };
|