@avalabs/glacier-sdk 2.8.0-canary.f19144b.0 → 2.8.0-canary.f2340be.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/dist/index.d.ts +1488 -643
  2. package/dist/index.js +531 -119
  3. package/esm/generated/Glacier.d.ts +8 -0
  4. package/esm/generated/Glacier.js +12 -0
  5. package/esm/generated/models/ActiveDelegatorDetails.d.ts +7 -3
  6. package/esm/generated/models/ActiveDelegatorDetails.js +8 -0
  7. package/esm/generated/models/ActiveValidatorDetails.d.ts +14 -6
  8. package/esm/generated/models/ActiveValidatorDetails.js +8 -0
  9. package/esm/generated/models/AddressActivityMetadata.d.ts +20 -0
  10. package/esm/generated/models/{XChainAssetBalance.d.ts → AggregatedAssetAmount.d.ts} +5 -6
  11. package/esm/generated/models/{Asset.d.ts → AssetAmount.d.ts} +5 -6
  12. package/esm/generated/models/AssetWithPriceInfo.d.ts +32 -0
  13. package/esm/generated/models/CChainExportTransaction.d.ts +3 -3
  14. package/esm/generated/models/CChainImportTransaction.d.ts +3 -3
  15. package/esm/generated/models/CChainSharedAssetBalance.d.ts +3 -4
  16. package/esm/generated/models/ChainInfo.d.ts +2 -3
  17. package/esm/generated/models/ChainStatus.d.ts +3 -0
  18. package/esm/generated/models/CompletedDelegatorDetails.d.ts +7 -3
  19. package/esm/generated/models/CompletedDelegatorDetails.js +8 -0
  20. package/esm/generated/models/CompletedValidatorDetails.d.ts +9 -3
  21. package/esm/generated/models/CompletedValidatorDetails.js +8 -0
  22. package/esm/generated/models/ContractSubmissionBody.d.ts +10 -0
  23. package/esm/generated/models/ContractSubmissionErc1155.d.ts +31 -0
  24. package/esm/generated/models/ContractSubmissionErc1155.js +8 -0
  25. package/esm/generated/models/ContractSubmissionErc20.d.ts +31 -0
  26. package/esm/generated/models/ContractSubmissionErc20.js +8 -0
  27. package/esm/generated/models/ContractSubmissionErc721.d.ts +29 -0
  28. package/esm/generated/models/ContractSubmissionErc721.js +8 -0
  29. package/esm/generated/models/ContractSubmissionUnknown.d.ts +25 -0
  30. package/esm/generated/models/ContractSubmissionUnknown.js +8 -0
  31. package/esm/generated/models/CreateEvmTransactionExportRequest.d.ts +2 -6
  32. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.d.ts +2 -6
  33. package/esm/generated/models/CurrencyCode.d.ts +3 -0
  34. package/esm/generated/models/DeliveredSourceNotIndexedTeleporterMessage.d.ts +27 -0
  35. package/esm/generated/models/DeliveredSourceNotIndexedTeleporterMessage.js +8 -0
  36. package/esm/generated/models/DeliveredTeleporterMessage.d.ts +29 -0
  37. package/esm/generated/models/DeliveredTeleporterMessage.js +8 -0
  38. package/esm/generated/models/EVMInput.d.ts +3 -3
  39. package/esm/generated/models/EVMOperationType.d.ts +5 -0
  40. package/esm/generated/models/EVMOperationType.js +6 -0
  41. package/esm/generated/models/EVMOutput.d.ts +3 -3
  42. package/esm/generated/models/Erc1155Contract.d.ts +2 -1
  43. package/esm/generated/models/Erc1155TokenMetadata.d.ts +0 -3
  44. package/esm/generated/models/Erc20Contract.d.ts +2 -1
  45. package/esm/generated/models/Erc721Contract.d.ts +0 -1
  46. package/esm/generated/models/Erc721TokenMetadata.d.ts +0 -3
  47. package/esm/generated/models/EventType.d.ts +5 -0
  48. package/esm/generated/models/EventType.js +6 -0
  49. package/esm/generated/models/GetChainResponse.d.ts +2 -3
  50. package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +1 -0
  51. package/esm/generated/models/GlacierApiFeature.d.ts +5 -0
  52. package/esm/generated/models/GlacierApiFeature.js +6 -0
  53. package/esm/generated/models/HistoricalReward.d.ts +2 -5
  54. package/esm/generated/models/ListContractsResponse.d.ts +1 -1
  55. package/esm/generated/models/ListNftTokens.d.ts +12 -0
  56. package/esm/generated/models/ListTransfersResponse.d.ts +1 -1
  57. package/esm/generated/models/ListValidatorDetailsResponse.d.ts +3 -2
  58. package/esm/generated/models/ListWebhooksResponse.d.ts +11 -0
  59. package/esm/generated/models/Method.d.ts +0 -3
  60. package/esm/generated/models/Money.d.ts +0 -3
  61. package/esm/generated/models/NextPageToken.d.ts +8 -0
  62. package/esm/generated/models/NftTokenMetadataStatus.d.ts +3 -0
  63. package/esm/generated/models/OperationType.d.ts +4 -2
  64. package/esm/generated/models/OperationType.js +3 -1
  65. package/esm/generated/models/PChainBalance.d.ts +15 -15
  66. package/esm/generated/models/PChainSharedAsset.d.ts +22 -0
  67. package/esm/generated/models/PChainTransaction.d.ts +13 -7
  68. package/esm/generated/models/PChainTransactionType.d.ts +8 -4
  69. package/esm/generated/models/PChainTransactionType.js +8 -4
  70. package/esm/generated/models/PChainUtxo.d.ts +34 -14
  71. package/esm/generated/models/PendingDelegatorDetails.d.ts +7 -3
  72. package/esm/generated/models/PendingDelegatorDetails.js +8 -0
  73. package/esm/generated/models/PendingReward.d.ts +3 -3
  74. package/esm/generated/models/PendingTeleporterMessage.d.ts +27 -0
  75. package/esm/generated/models/PendingTeleporterMessage.js +8 -0
  76. package/esm/generated/models/PendingValidatorDetails.d.ts +9 -4
  77. package/esm/generated/models/PendingValidatorDetails.js +8 -0
  78. package/esm/generated/models/PricingProviders.d.ts +5 -0
  79. package/esm/generated/models/PrimaryNetworkAssetCap.d.ts +9 -0
  80. package/esm/generated/models/PrimaryNetworkAssetCap.js +7 -0
  81. package/esm/generated/models/PrimaryNetworkAssetType.d.ts +9 -0
  82. package/esm/generated/models/PrimaryNetworkAssetType.js +7 -0
  83. package/esm/generated/models/PrimaryNetworkBlock.d.ts +1 -0
  84. package/esm/generated/models/PrimaryNetworkOperationType.d.ts +7 -0
  85. package/esm/generated/models/PrimaryNetworkOperationType.js +8 -0
  86. package/esm/generated/models/PrimaryNetworkTxType.d.ts +8 -5
  87. package/esm/generated/models/PrimaryNetworkTxType.js +8 -5
  88. package/esm/generated/models/RegisterWebhookRequest.d.ts +11 -0
  89. package/esm/generated/models/RemovedValidatorDetails.d.ts +19 -0
  90. package/esm/generated/models/RemovedValidatorDetails.js +8 -0
  91. package/esm/generated/models/RewardType.d.ts +2 -1
  92. package/esm/generated/models/RewardType.js +1 -0
  93. package/esm/generated/models/Rewards.d.ts +2 -0
  94. package/esm/generated/models/SharedSecretsResponse.d.ts +5 -0
  95. package/esm/generated/models/Subnet.d.ts +17 -0
  96. package/esm/generated/models/SubnetOwnershipInfo.d.ts +16 -0
  97. package/esm/generated/models/TeleporterDestinationTransaction.d.ts +9 -0
  98. package/esm/generated/models/TeleporterReceipt.d.ts +6 -0
  99. package/esm/generated/models/TeleporterRewardDetails.d.ts +37 -0
  100. package/esm/generated/models/TeleporterRewardDetails.js +8 -0
  101. package/esm/generated/models/TeleporterSourceTransaction.d.ts +7 -0
  102. package/esm/generated/models/TransactionMethodType.d.ts +3 -0
  103. package/esm/generated/models/UnknownContract.d.ts +0 -1
  104. package/esm/generated/models/UpdateContractResponse.d.ts +10 -0
  105. package/esm/generated/models/UpdateWebhookRequest.d.ts +12 -0
  106. package/esm/generated/models/Utxo.d.ts +30 -30
  107. package/esm/generated/models/UtxoCredential.d.ts +2 -2
  108. package/esm/generated/models/ValidationStatusType.d.ts +2 -1
  109. package/esm/generated/models/ValidationStatusType.js +1 -0
  110. package/esm/generated/models/ValidatorHealthDetails.d.ts +20 -0
  111. package/esm/generated/models/WebhookResponse.d.ts +17 -0
  112. package/esm/generated/models/WebhookStatus.d.ts +6 -0
  113. package/esm/generated/models/WebhookStatus.js +7 -0
  114. package/esm/generated/models/WebhookStatusType.d.ts +6 -0
  115. package/esm/generated/models/WebhookStatusType.js +7 -0
  116. package/esm/generated/models/XChainAssetDetails.d.ts +5 -8
  117. package/esm/generated/models/XChainBalances.d.ts +3 -3
  118. package/esm/generated/models/XChainLinearTransaction.d.ts +6 -8
  119. package/esm/generated/models/XChainNonLinearTransaction.d.ts +6 -8
  120. package/esm/generated/models/XChainSharedAssetBalance.d.ts +3 -4
  121. package/esm/generated/models/XChainTransactionType.d.ts +13 -0
  122. package/esm/generated/models/XChainTransactionType.js +11 -0
  123. package/esm/generated/services/DefaultService.d.ts +100 -0
  124. package/esm/generated/services/DefaultService.js +86 -0
  125. package/esm/generated/services/EvmBalancesService.d.ts +25 -25
  126. package/esm/generated/services/EvmBalancesService.js +8 -8
  127. package/esm/generated/services/EvmBlocksService.d.ts +7 -7
  128. package/esm/generated/services/EvmBlocksService.js +4 -4
  129. package/esm/generated/services/EvmChainsService.d.ts +7 -2
  130. package/esm/generated/services/EvmChainsService.js +4 -2
  131. package/esm/generated/services/EvmContractsService.d.ts +48 -0
  132. package/esm/generated/services/EvmContractsService.js +36 -0
  133. package/esm/generated/services/EvmTransactionsService.d.ts +91 -49
  134. package/esm/generated/services/EvmTransactionsService.js +33 -33
  135. package/esm/generated/services/NfTsService.d.ts +76 -0
  136. package/esm/generated/services/NfTsService.js +56 -0
  137. package/esm/generated/services/OperationsService.d.ts +11 -11
  138. package/esm/generated/services/OperationsService.js +10 -10
  139. package/esm/generated/services/PrimaryNetworkBlocksService.d.ts +10 -10
  140. package/esm/generated/services/PrimaryNetworkBlocksService.js +8 -8
  141. package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +21 -8
  142. package/esm/generated/services/PrimaryNetworkRewardsService.js +12 -6
  143. package/esm/generated/services/PrimaryNetworkService.d.ts +53 -29
  144. package/esm/generated/services/PrimaryNetworkService.js +26 -14
  145. package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +20 -16
  146. package/esm/generated/services/PrimaryNetworkTransactionsService.js +8 -8
  147. package/esm/generated/services/PrimaryNetworkUtxOsService.d.ts +5 -5
  148. package/esm/generated/services/PrimaryNetworkUtxOsService.js +2 -2
  149. package/esm/generated/services/PrimaryNetworkVerticesService.d.ts +10 -10
  150. package/esm/generated/services/PrimaryNetworkVerticesService.js +6 -6
  151. package/esm/generated/services/TeleporterService.d.ts +57 -0
  152. package/esm/generated/services/TeleporterService.js +39 -0
  153. package/esm/index.d.ts +41 -3
  154. package/esm/index.js +28 -2
  155. package/package.json +2 -2
  156. package/esm/generated/models/CreateEvmTransactionExportRequest.js +0 -8
  157. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.js +0 -8
  158. package/esm/generated/models/PChainAsset.d.ts +0 -6
@@ -1,68 +1,68 @@
1
- import { Asset } from './Asset.js';
1
+ import { AssetAmount } from './AssetAmount.js';
2
2
  import { UtxoCredential } from './UtxoCredential.js';
3
3
 
4
4
  type Utxo = {
5
5
  /**
6
- * UTXO ID for this output.
6
+ * Addresses that are eligible to sign the consumption of this output.
7
7
  */
8
- utxoId: string;
9
- asset: Asset;
8
+ addresses: Array<string>;
9
+ asset: AssetAmount;
10
10
  /**
11
- * Type of output.
11
+ * Blockchain ID on which this output is consumed on.
12
12
  */
13
- utxoType: string;
13
+ consumedOnChainId: string;
14
14
  /**
15
- * Blockchain ID on which this output is created on.
15
+ * Transaction ID that consumed this output.
16
16
  */
17
- createdOnChainId: string;
17
+ consumingTxHash?: string;
18
18
  /**
19
- * Blockchain ID on which this output is consumed on.
19
+ * Blockchain ID on which this output is created on.
20
20
  */
21
- consumedOnChainId: string;
21
+ createdOnChainId: string;
22
22
  /**
23
- * Transaction ID that created this output.
23
+ * UTXO ID for this output.
24
24
  */
25
- creationTxHash: string;
25
+ utxoId: string;
26
26
  /**
27
- * Transaction ID that consumed this output.
27
+ * Unix timestamp in seconds at which this output was consumed.
28
28
  */
29
- consumingTxHash?: string;
29
+ consumingTxTimestamp?: number;
30
30
  /**
31
- * Timestamp in seconds this output is consumed.
31
+ * Transaction ID that created this output.
32
32
  */
33
- consumingTxTimestamp?: number;
33
+ creationTxHash: string;
34
34
  /**
35
- * Postion of this output in a list of lexiographically sorted outputs of a transaction.
35
+ * Credentials that signed the transaction to consume this utxo
36
36
  */
37
- outputIndex: string;
37
+ credentials?: Array<UtxoCredential>;
38
38
  /**
39
- * Timestamp in seconds this outptut is created on.
39
+ * Index representing the minting set for the NFT mint output.
40
40
  */
41
- timestamp: number;
41
+ groupId?: number;
42
42
  /**
43
43
  * Locktime in seconds after which this output can be consumed.
44
44
  */
45
45
  locktime: number;
46
46
  /**
47
- * Minimum number of signatures required to consume this output.
47
+ * Postion of this output in a list of lexiographically sorted outputs of a transaction.
48
48
  */
49
- threshold: number;
49
+ outputIndex: string;
50
50
  /**
51
- * Addresses that are eligible to sign the consumption of this output.
51
+ * Hex encoded data for NFT assets.
52
52
  */
53
- addresses: Array<string>;
53
+ payload?: string;
54
54
  /**
55
- * Hex encoded data for NFT assets
55
+ * Minimum number of signatures required to consume this output.
56
56
  */
57
- payload?: string;
57
+ threshold: number;
58
58
  /**
59
- * Index representing the minting set for the NFT mint output
59
+ * Unix timestamp in seconds at which this outptut was created.
60
60
  */
61
- groupId?: number;
61
+ timestamp: number;
62
62
  /**
63
- * Credentials that signed the transaction to consume this utxo
63
+ * Type of output.
64
64
  */
65
- credentials?: Array<UtxoCredential>;
65
+ utxoType: string;
66
66
  };
67
67
 
68
68
  export { Utxo };
@@ -1,10 +1,10 @@
1
1
  type UtxoCredential = {
2
2
  /**
3
- * Signature provided to consume the output
3
+ * Signature provided to consume the output.
4
4
  */
5
5
  signature?: string;
6
6
  /**
7
- * Public key associated with the signature
7
+ * Public key associated with the signature.
8
8
  */
9
9
  publicKey?: string;
10
10
  };
@@ -1,7 +1,8 @@
1
1
  declare enum ValidationStatusType {
2
2
  COMPLETED = "completed",
3
3
  ACTIVE = "active",
4
- PENDING = "pending"
4
+ PENDING = "pending",
5
+ REMOVED = "removed"
5
6
  }
6
7
 
7
8
  export { ValidationStatusType };
@@ -2,6 +2,7 @@ var ValidationStatusType = /* @__PURE__ */ ((ValidationStatusType2) => {
2
2
  ValidationStatusType2["COMPLETED"] = "completed";
3
3
  ValidationStatusType2["ACTIVE"] = "active";
4
4
  ValidationStatusType2["PENDING"] = "pending";
5
+ ValidationStatusType2["REMOVED"] = "removed";
5
6
  return ValidationStatusType2;
6
7
  })(ValidationStatusType || {});
7
8
 
@@ -0,0 +1,20 @@
1
+ type ValidatorHealthDetails = {
2
+ /**
3
+ * Percent of requests responded to in last polling.
4
+ */
5
+ reachabilityPercent: number;
6
+ /**
7
+ * Percent of requests benched on the P-Chain in last polling.
8
+ */
9
+ benchedPChainRequestsPercent: number;
10
+ /**
11
+ * Percentage of requests benched on the X-Chain in last polling.
12
+ */
13
+ benchedXChainRequestsPercent: number;
14
+ /**
15
+ * Percentage of requests benched on the C-Chain in last polling.
16
+ */
17
+ benchedCChainRequestsPercent: number;
18
+ };
19
+
20
+ export { ValidatorHealthDetails };
@@ -0,0 +1,17 @@
1
+ import { AddressActivityMetadata } from './AddressActivityMetadata.js';
2
+ import { EventType } from './EventType.js';
3
+ import { WebhookStatusType } from './WebhookStatusType.js';
4
+
5
+ type WebhookResponse = {
6
+ id: string;
7
+ eventType: EventType;
8
+ metadata: AddressActivityMetadata;
9
+ url: string;
10
+ chainId: string;
11
+ status: WebhookStatusType;
12
+ createdAt: number;
13
+ name: string;
14
+ description: string;
15
+ };
16
+
17
+ export { WebhookResponse };
@@ -0,0 +1,6 @@
1
+ declare enum WebhookStatus {
2
+ ACTIVE = "active",
3
+ INACTIVE = "inactive"
4
+ }
5
+
6
+ export { WebhookStatus };
@@ -0,0 +1,7 @@
1
+ var WebhookStatus = /* @__PURE__ */ ((WebhookStatus2) => {
2
+ WebhookStatus2["ACTIVE"] = "active";
3
+ WebhookStatus2["INACTIVE"] = "inactive";
4
+ return WebhookStatus2;
5
+ })(WebhookStatus || {});
6
+
7
+ export { WebhookStatus };
@@ -0,0 +1,6 @@
1
+ declare enum WebhookStatusType {
2
+ ACTIVE = "active",
3
+ INACTIVE = "inactive"
4
+ }
5
+
6
+ export { WebhookStatusType };
@@ -0,0 +1,7 @@
1
+ var WebhookStatusType = /* @__PURE__ */ ((WebhookStatusType2) => {
2
+ WebhookStatusType2["ACTIVE"] = "active";
3
+ WebhookStatusType2["INACTIVE"] = "inactive";
4
+ return WebhookStatusType2;
5
+ })(WebhookStatusType || {});
6
+
7
+ export { WebhookStatusType };
@@ -1,3 +1,6 @@
1
+ import { PrimaryNetworkAssetCap } from './PrimaryNetworkAssetCap.js';
2
+ import { PrimaryNetworkAssetType } from './PrimaryNetworkAssetType.js';
3
+
1
4
  type XChainAssetDetails = {
2
5
  /**
3
6
  * Unique ID for an asset.
@@ -15,18 +18,12 @@ type XChainAssetDetails = {
15
18
  * Denomination of this asset to represent fungibility.
16
19
  */
17
20
  denomination: number;
18
- /**
19
- * Type of asset like SECP256K1 or NFT.
20
- */
21
- type: string;
21
+ type: PrimaryNetworkAssetType;
22
22
  /**
23
23
  * Timestamp in seconds this asset was created on.
24
24
  */
25
25
  createdAtTimestamp: number;
26
- /**
27
- * Cap represents if an asset can be or is fixed cap.
28
- */
29
- cap: string;
26
+ cap: PrimaryNetworkAssetCap;
30
27
  };
31
28
 
32
29
  export { XChainAssetDetails };
@@ -1,15 +1,15 @@
1
- import { XChainAssetBalance } from './XChainAssetBalance.js';
1
+ import { AggregatedAssetAmount } from './AggregatedAssetAmount.js';
2
2
  import { XChainSharedAssetBalance } from './XChainSharedAssetBalance.js';
3
3
 
4
4
  type XChainBalances = {
5
5
  /**
6
6
  * A list of objects containing X-chain Asset balance information.
7
7
  */
8
- locked: Array<XChainAssetBalance>;
8
+ locked: Array<AggregatedAssetAmount>;
9
9
  /**
10
10
  * A list of objects containing X-chain Asset balance information.
11
11
  */
12
- unlocked: Array<XChainAssetBalance>;
12
+ unlocked: Array<AggregatedAssetAmount>;
13
13
  atomicMemoryUnlocked: Array<XChainSharedAssetBalance>;
14
14
  atomicMemoryLocked: Array<XChainSharedAssetBalance>;
15
15
  };
@@ -1,6 +1,7 @@
1
- import { Asset } from './Asset.js';
1
+ import { AssetAmount } from './AssetAmount.js';
2
2
  import { Utxo } from './Utxo.js';
3
3
  import { XChainAssetDetails } from './XChainAssetDetails.js';
4
+ import { XChainTransactionType } from './XChainTransactionType.js';
4
5
 
5
6
  type XChainLinearTransaction = {
6
7
  /**
@@ -15,10 +16,7 @@ type XChainLinearTransaction = {
15
16
  * Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices.
16
17
  */
17
18
  timestamp: number;
18
- /**
19
- * Type of transaction.
20
- */
21
- txType: string;
19
+ txType: XChainTransactionType;
22
20
  /**
23
21
  * Hex encoded memo bytes for this transaction.
24
22
  */
@@ -28,11 +26,11 @@ type XChainLinearTransaction = {
28
26
  /**
29
27
  * Assets unlocked by inputs of this transaction.
30
28
  */
31
- amountUnlocked: Array<Asset>;
29
+ amountUnlocked: Array<AssetAmount>;
32
30
  /**
33
31
  * Assets created by outputs of this transaction.
34
32
  */
35
- amountCreated: Array<Asset>;
33
+ amountCreated: Array<AssetAmount>;
36
34
  /**
37
35
  * Source chain for an atomic transaction.
38
36
  */
@@ -42,7 +40,7 @@ type XChainLinearTransaction = {
42
40
  */
43
41
  destinationChain?: string;
44
42
  /**
45
- * Asset details of the asset created in CreateAssetTx
43
+ * AssetAmount details of the asset created in CreateAssetTx
46
44
  */
47
45
  assetCreated?: XChainAssetDetails;
48
46
  /**
@@ -1,7 +1,8 @@
1
- import { Asset } from './Asset.js';
1
+ import { AssetAmount } from './AssetAmount.js';
2
2
  import { TransactionVertexDetail } from './TransactionVertexDetail.js';
3
3
  import { Utxo } from './Utxo.js';
4
4
  import { XChainAssetDetails } from './XChainAssetDetails.js';
5
+ import { XChainTransactionType } from './XChainTransactionType.js';
5
6
 
6
7
  type XChainNonLinearTransaction = {
7
8
  /**
@@ -16,10 +17,7 @@ type XChainNonLinearTransaction = {
16
17
  * Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices.
17
18
  */
18
19
  timestamp: number;
19
- /**
20
- * Type of transaction.
21
- */
22
- txType: string;
20
+ txType: XChainTransactionType;
23
21
  /**
24
22
  * Hex encoded memo bytes for this transaction.
25
23
  */
@@ -29,11 +27,11 @@ type XChainNonLinearTransaction = {
29
27
  /**
30
28
  * Assets unlocked by inputs of this transaction.
31
29
  */
32
- amountUnlocked: Array<Asset>;
30
+ amountUnlocked: Array<AssetAmount>;
33
31
  /**
34
32
  * Assets created by outputs of this transaction.
35
33
  */
36
- amountCreated: Array<Asset>;
34
+ amountCreated: Array<AssetAmount>;
37
35
  /**
38
36
  * Source chain for an atomic transaction.
39
37
  */
@@ -43,7 +41,7 @@ type XChainNonLinearTransaction = {
43
41
  */
44
42
  destinationChain?: string;
45
43
  /**
46
- * Asset details of the asset created in CreateAssetTx
44
+ * AssetAmount details of the asset created in CreateAssetTx
47
45
  */
48
46
  assetCreated?: XChainAssetDetails;
49
47
  /**
@@ -1,3 +1,5 @@
1
+ import { PrimaryNetworkAssetType } from './PrimaryNetworkAssetType.js';
2
+
1
3
  type XChainSharedAssetBalance = {
2
4
  /**
3
5
  * Unique ID for an asset.
@@ -15,10 +17,7 @@ type XChainSharedAssetBalance = {
15
17
  * Denomination of this asset to represent fungibility.
16
18
  */
17
19
  denomination: number;
18
- /**
19
- * Type of asset like SECP256K1 or NFT.
20
- */
21
- type: string;
20
+ type: PrimaryNetworkAssetType;
22
21
  /**
23
22
  * Amount of the asset.
24
23
  */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Type of transaction.
3
+ */
4
+ declare enum XChainTransactionType {
5
+ BASE_TX = "BaseTx",
6
+ CREATE_ASSET_TX = "CreateAssetTx",
7
+ OPERATION_TX = "OperationTx",
8
+ IMPORT_TX = "ImportTx",
9
+ EXPORT_TX = "ExportTx",
10
+ UNKNOWN = "UNKNOWN"
11
+ }
12
+
13
+ export { XChainTransactionType };
@@ -0,0 +1,11 @@
1
+ var XChainTransactionType = /* @__PURE__ */ ((XChainTransactionType2) => {
2
+ XChainTransactionType2["BASE_TX"] = "BaseTx";
3
+ XChainTransactionType2["CREATE_ASSET_TX"] = "CreateAssetTx";
4
+ XChainTransactionType2["OPERATION_TX"] = "OperationTx";
5
+ XChainTransactionType2["IMPORT_TX"] = "ImportTx";
6
+ XChainTransactionType2["EXPORT_TX"] = "ExportTx";
7
+ XChainTransactionType2["UNKNOWN"] = "UNKNOWN";
8
+ return XChainTransactionType2;
9
+ })(XChainTransactionType || {});
10
+
11
+ export { XChainTransactionType };
@@ -0,0 +1,100 @@
1
+ import { ListWebhooksResponse } from '../models/ListWebhooksResponse.js';
2
+ import { RegisterWebhookRequest } from '../models/RegisterWebhookRequest.js';
3
+ import { SharedSecretsResponse } from '../models/SharedSecretsResponse.js';
4
+ import { UpdateWebhookRequest } from '../models/UpdateWebhookRequest.js';
5
+ import { WebhookResponse } from '../models/WebhookResponse.js';
6
+ import { WebhookStatus } from '../models/WebhookStatus.js';
7
+ import { CancelablePromise } from '../core/CancelablePromise.js';
8
+ import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
9
+
10
+ declare class DefaultService {
11
+ readonly httpRequest: BaseHttpRequest;
12
+ constructor(httpRequest: BaseHttpRequest);
13
+ /**
14
+ * @returns any
15
+ * @throws ApiError
16
+ */
17
+ mediaControllerUploadImage(): CancelablePromise<any>;
18
+ /**
19
+ * Register a webhook
20
+ * Registers a new webhook.
21
+ * @returns WebhookResponse
22
+ * @throws ApiError
23
+ */
24
+ registerWebhook({ requestBody, }: {
25
+ requestBody: RegisterWebhookRequest;
26
+ }): CancelablePromise<WebhookResponse>;
27
+ /**
28
+ * List webhooks
29
+ * Lists webhooks for the user.
30
+ * @returns ListWebhooksResponse
31
+ * @throws ApiError
32
+ */
33
+ listWebhooks({ pageToken, pageSize, status, }: {
34
+ /**
35
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
36
+ */
37
+ pageToken?: string;
38
+ /**
39
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
40
+ */
41
+ pageSize?: number;
42
+ /**
43
+ * Status of the webhook. Use "active" to return only active webhooks, "inactive" to return only inactive webhooks. Else if no status is provided, all configured webhooks will be returned.
44
+ */
45
+ status?: WebhookStatus;
46
+ }): CancelablePromise<ListWebhooksResponse>;
47
+ /**
48
+ * Get a webhook by ID
49
+ * Retrieves a webhook by ID.
50
+ * @returns WebhookResponse
51
+ * @throws ApiError
52
+ */
53
+ getWebhook({ id, }: {
54
+ /**
55
+ * The webhook identifier.
56
+ */
57
+ id: string;
58
+ }): CancelablePromise<WebhookResponse>;
59
+ /**
60
+ * Deactivate a webhook
61
+ * Deactivates a webhook by ID.
62
+ * @returns WebhookResponse
63
+ * @throws ApiError
64
+ */
65
+ deactivateWebhook({ id, }: {
66
+ /**
67
+ * The webhook identifier.
68
+ */
69
+ id: string;
70
+ }): CancelablePromise<WebhookResponse>;
71
+ /**
72
+ * Update a webhook
73
+ * Updates an existing webhook.
74
+ * @returns WebhookResponse
75
+ * @throws ApiError
76
+ */
77
+ updateWebhook({ id, requestBody, }: {
78
+ /**
79
+ * The webhook identifier.
80
+ */
81
+ id: string;
82
+ requestBody: UpdateWebhookRequest;
83
+ }): CancelablePromise<WebhookResponse>;
84
+ /**
85
+ * Generate a shared secret
86
+ * Generates a new shared secret.
87
+ * @returns SharedSecretsResponse
88
+ * @throws ApiError
89
+ */
90
+ generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
91
+ /**
92
+ * Get a shared secret
93
+ * Get a previously generated shared secret.
94
+ * @returns SharedSecretsResponse
95
+ * @throws ApiError
96
+ */
97
+ getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
98
+ }
99
+
100
+ export { DefaultService };
@@ -0,0 +1,86 @@
1
+ class DefaultService {
2
+ constructor(httpRequest) {
3
+ this.httpRequest = httpRequest;
4
+ }
5
+ mediaControllerUploadImage() {
6
+ return this.httpRequest.request({
7
+ method: "POST",
8
+ url: "/v1/media/uploadImage"
9
+ });
10
+ }
11
+ registerWebhook({
12
+ requestBody
13
+ }) {
14
+ return this.httpRequest.request({
15
+ method: "POST",
16
+ url: "/v1/webhooks",
17
+ body: requestBody,
18
+ mediaType: "application/json"
19
+ });
20
+ }
21
+ listWebhooks({
22
+ pageToken,
23
+ pageSize = 10,
24
+ status
25
+ }) {
26
+ return this.httpRequest.request({
27
+ method: "GET",
28
+ url: "/v1/webhooks",
29
+ query: {
30
+ "pageToken": pageToken,
31
+ "pageSize": pageSize,
32
+ "status": status
33
+ }
34
+ });
35
+ }
36
+ getWebhook({
37
+ id
38
+ }) {
39
+ return this.httpRequest.request({
40
+ method: "GET",
41
+ url: "/v1/webhooks/{id}",
42
+ path: {
43
+ "id": id
44
+ }
45
+ });
46
+ }
47
+ deactivateWebhook({
48
+ id
49
+ }) {
50
+ return this.httpRequest.request({
51
+ method: "DELETE",
52
+ url: "/v1/webhooks/{id}",
53
+ path: {
54
+ "id": id
55
+ }
56
+ });
57
+ }
58
+ updateWebhook({
59
+ id,
60
+ requestBody
61
+ }) {
62
+ return this.httpRequest.request({
63
+ method: "PATCH",
64
+ url: "/v1/webhooks/{id}",
65
+ path: {
66
+ "id": id
67
+ },
68
+ body: requestBody,
69
+ mediaType: "application/json"
70
+ });
71
+ }
72
+ generateSharedSecret() {
73
+ return this.httpRequest.request({
74
+ method: "POST",
75
+ url: "/v1/webhooks:generateOrRotateSharedSecret"
76
+ });
77
+ }
78
+ getSharedSecret() {
79
+ return this.httpRequest.request({
80
+ method: "GET",
81
+ url: "/v1/webhooks:getSharedSecret"
82
+ });
83
+ }
84
+ }
85
+
86
+ export { DefaultService };