@avalabs/glacier-sdk 2.8.0-canary.ca01c76.0 → 2.8.0-canary.de93137.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 (77) hide show
  1. package/dist/index.d.ts +757 -342
  2. package/dist/index.js +293 -71
  3. package/esm/generated/Glacier.d.ts +4 -0
  4. package/esm/generated/Glacier.js +30 -10
  5. package/esm/generated/core/ApiError.js +5 -0
  6. package/esm/generated/core/CancelablePromise.js +11 -6
  7. package/esm/generated/core/request.js +14 -31
  8. package/esm/generated/models/ActiveDelegatorDetails.d.ts +7 -3
  9. package/esm/generated/models/ActiveDelegatorDetails.js +8 -0
  10. package/esm/generated/models/ActiveValidatorDetails.d.ts +14 -6
  11. package/esm/generated/models/ActiveValidatorDetails.js +8 -0
  12. package/esm/generated/models/AddressActivityMetadata.d.ts +9 -0
  13. package/esm/generated/models/ChainInfo.d.ts +1 -0
  14. package/esm/generated/models/CompletedDelegatorDetails.d.ts +7 -3
  15. package/esm/generated/models/CompletedDelegatorDetails.js +8 -0
  16. package/esm/generated/models/CompletedValidatorDetails.d.ts +9 -3
  17. package/esm/generated/models/CompletedValidatorDetails.js +8 -0
  18. package/esm/generated/models/ContractSubmissionBody.d.ts +10 -0
  19. package/esm/generated/models/ContractSubmissionErc1155.d.ts +31 -0
  20. package/esm/generated/models/ContractSubmissionErc1155.js +8 -0
  21. package/esm/generated/models/ContractSubmissionErc20.d.ts +31 -0
  22. package/esm/generated/models/ContractSubmissionErc20.js +8 -0
  23. package/esm/generated/models/ContractSubmissionErc721.d.ts +29 -0
  24. package/esm/generated/models/ContractSubmissionErc721.js +8 -0
  25. package/esm/generated/models/ContractSubmissionUnknown.d.ts +25 -0
  26. package/esm/generated/models/ContractSubmissionUnknown.js +8 -0
  27. package/esm/generated/models/Erc20Contract.d.ts +1 -1
  28. package/esm/generated/models/EventType.d.ts +5 -0
  29. package/esm/generated/models/EventType.js +6 -0
  30. package/esm/generated/models/GetChainResponse.d.ts +1 -0
  31. package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +1 -0
  32. package/esm/generated/models/ListContractsResponse.d.ts +1 -1
  33. package/esm/generated/models/ListNftTokens.d.ts +12 -0
  34. package/esm/generated/models/ListValidatorDetailsResponse.d.ts +1 -1
  35. package/esm/generated/models/ListWebhooksResponse.d.ts +11 -0
  36. package/esm/generated/models/PChainTransaction.d.ts +1 -0
  37. package/esm/generated/models/PChainTransactionType.d.ts +1 -0
  38. package/esm/generated/models/PChainTransactionType.js +1 -0
  39. package/esm/generated/models/PendingDelegatorDetails.d.ts +7 -3
  40. package/esm/generated/models/PendingDelegatorDetails.js +8 -0
  41. package/esm/generated/models/PendingValidatorDetails.d.ts +9 -4
  42. package/esm/generated/models/PendingValidatorDetails.js +8 -0
  43. package/esm/generated/models/PrimaryNetworkBlock.d.ts +1 -0
  44. package/esm/generated/models/PrimaryNetworkTxType.d.ts +1 -0
  45. package/esm/generated/models/PrimaryNetworkTxType.js +1 -0
  46. package/esm/generated/models/RegisterWebhookRequest.d.ts +14 -0
  47. package/esm/generated/models/RewardType.d.ts +2 -1
  48. package/esm/generated/models/RewardType.js +1 -0
  49. package/esm/generated/models/Rewards.d.ts +2 -0
  50. package/esm/generated/models/UpdateContractResponse.d.ts +10 -0
  51. package/esm/generated/models/ValidatorHealthDetails.d.ts +20 -0
  52. package/esm/generated/models/WebhookResponse.d.ts +15 -0
  53. package/esm/generated/models/WebhookStatus.d.ts +6 -0
  54. package/esm/generated/models/WebhookStatus.js +7 -0
  55. package/esm/generated/models/WebhookStatusType.d.ts +6 -0
  56. package/esm/generated/models/WebhookStatusType.js +7 -0
  57. package/esm/generated/models/XChainLinearTransaction.d.ts +2 -1
  58. package/esm/generated/models/XChainNonLinearTransaction.d.ts +2 -1
  59. package/esm/generated/models/XChainTransactionType.d.ts +10 -0
  60. package/esm/generated/models/XChainTransactionType.js +11 -0
  61. package/esm/generated/services/DefaultService.d.ts +59 -0
  62. package/esm/generated/services/DefaultService.js +49 -0
  63. package/esm/generated/services/EvmContractsService.d.ts +48 -0
  64. package/esm/generated/services/EvmContractsService.js +36 -0
  65. package/esm/generated/services/EvmTransactionsService.d.ts +42 -0
  66. package/esm/generated/services/EvmTransactionsService.js +1 -1
  67. package/esm/generated/services/NfTsService.d.ts +20 -13
  68. package/esm/generated/services/NfTsService.js +15 -9
  69. package/esm/generated/services/OperationsService.d.ts +11 -11
  70. package/esm/generated/services/OperationsService.js +10 -10
  71. package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +10 -2
  72. package/esm/generated/services/PrimaryNetworkRewardsService.js +4 -0
  73. package/esm/generated/services/PrimaryNetworkService.d.ts +32 -8
  74. package/esm/generated/services/PrimaryNetworkService.js +16 -4
  75. package/esm/index.d.ts +18 -0
  76. package/esm/index.js +16 -0
  77. package/package.json +2 -2
@@ -2,6 +2,7 @@ declare enum PChainTransactionType {
2
2
  ADD_VALIDATOR_TX = "AddValidatorTx",
3
3
  ADD_DELEGATOR_TX = "AddDelegatorTx",
4
4
  ADD_PERMISSIONLESS_VALIDATOR_TX = "AddPermissionlessValidatorTx",
5
+ ADD_PERMISSIONLESS_DELEGATOR_TX = "AddPermissionlessDelegatorTx",
5
6
  ADD_SUBNET_VALIDATOR_TX = "AddSubnetValidatorTx",
6
7
  REMOVE_SUBNET_VALIDATOR_TX = "RemoveSubnetValidatorTx",
7
8
  REWARD_VALIDATOR_TX = "RewardValidatorTx",
@@ -2,6 +2,7 @@ var PChainTransactionType = /* @__PURE__ */ ((PChainTransactionType2) => {
2
2
  PChainTransactionType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
3
3
  PChainTransactionType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
4
4
  PChainTransactionType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
5
+ PChainTransactionType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
5
6
  PChainTransactionType2["ADD_SUBNET_VALIDATOR_TX"] = "AddSubnetValidatorTx";
6
7
  PChainTransactionType2["REMOVE_SUBNET_VALIDATOR_TX"] = "RemoveSubnetValidatorTx";
7
8
  PChainTransactionType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
@@ -1,15 +1,19 @@
1
- import { DelegationStatusType } from './DelegationStatusType.js';
2
-
3
1
  type PendingDelegatorDetails = {
4
2
  txHash: string;
3
+ nodeId: string;
5
4
  rewardAddresses: Array<string>;
6
5
  amountDelegated: string;
7
6
  delegationFee: string;
8
7
  startTimestamp: number;
9
8
  endTimestamp: number;
10
- delegationStatus: DelegationStatusType;
11
9
  estimatedGrossReward: string;
12
10
  estimatedNetReward: string;
11
+ delegationStatus: PendingDelegatorDetails.delegationStatus;
13
12
  };
13
+ declare namespace PendingDelegatorDetails {
14
+ enum delegationStatus {
15
+ PENDING = "pending"
16
+ }
17
+ }
14
18
 
15
19
  export { PendingDelegatorDetails };
@@ -0,0 +1,8 @@
1
+ var PendingDelegatorDetails;
2
+ ((PendingDelegatorDetails2) => {
3
+ ((delegationStatus2) => {
4
+ delegationStatus2["PENDING"] = "pending";
5
+ })(PendingDelegatorDetails2.delegationStatus || (PendingDelegatorDetails2.delegationStatus = {}));
6
+ })(PendingDelegatorDetails || (PendingDelegatorDetails = {}));
7
+
8
+ export { PendingDelegatorDetails };
@@ -1,12 +1,17 @@
1
- import { ValidationStatusType } from './ValidationStatusType.js';
2
-
3
1
  type PendingValidatorDetails = {
2
+ txHash: string;
4
3
  nodeId: string;
4
+ subnetId: string;
5
5
  amountStaked: string;
6
- delegationFee: string;
6
+ delegationFee?: string;
7
7
  startTimestamp: number;
8
8
  endTimestamp: number;
9
- validationStatus: ValidationStatusType;
9
+ validationStatus: PendingValidatorDetails.validationStatus;
10
10
  };
11
+ declare namespace PendingValidatorDetails {
12
+ enum validationStatus {
13
+ PENDING = "pending"
14
+ }
15
+ }
11
16
 
12
17
  export { PendingValidatorDetails };
@@ -0,0 +1,8 @@
1
+ var PendingValidatorDetails;
2
+ ((PendingValidatorDetails2) => {
3
+ ((validationStatus2) => {
4
+ validationStatus2["PENDING"] = "pending";
5
+ })(PendingValidatorDetails2.validationStatus || (PendingValidatorDetails2.validationStatus = {}));
6
+ })(PendingValidatorDetails || (PendingValidatorDetails = {}));
7
+
8
+ export { PendingValidatorDetails };
@@ -9,6 +9,7 @@ type PrimaryNetworkBlock = {
9
9
  txCount: number;
10
10
  transactions: Array<string>;
11
11
  blockSizeBytes: number;
12
+ currentSupply?: string;
12
13
  proposerDetails?: ProposerDetails;
13
14
  };
14
15
 
@@ -2,6 +2,7 @@ declare enum PrimaryNetworkTxType {
2
2
  ADD_VALIDATOR_TX = "AddValidatorTx",
3
3
  ADD_DELEGATOR_TX = "AddDelegatorTx",
4
4
  ADD_PERMISSIONLESS_VALIDATOR_TX = "AddPermissionlessValidatorTx",
5
+ ADD_PERMISSIONLESS_DELEGATOR_TX = "AddPermissionlessDelegatorTx",
5
6
  ADD_SUBNET_VALIDATOR_TX = "AddSubnetValidatorTx",
6
7
  REMOVE_SUBNET_VALIDATOR_TX = "RemoveSubnetValidatorTx",
7
8
  REWARD_VALIDATOR_TX = "RewardValidatorTx",
@@ -2,6 +2,7 @@ var PrimaryNetworkTxType = /* @__PURE__ */ ((PrimaryNetworkTxType2) => {
2
2
  PrimaryNetworkTxType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
3
3
  PrimaryNetworkTxType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
4
4
  PrimaryNetworkTxType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
5
+ PrimaryNetworkTxType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
5
6
  PrimaryNetworkTxType2["ADD_SUBNET_VALIDATOR_TX"] = "AddSubnetValidatorTx";
6
7
  PrimaryNetworkTxType2["REMOVE_SUBNET_VALIDATOR_TX"] = "RemoveSubnetValidatorTx";
7
8
  PrimaryNetworkTxType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
@@ -0,0 +1,14 @@
1
+ import { AddressActivityMetadata } from './AddressActivityMetadata.js';
2
+ import { EventType } from './EventType.js';
3
+
4
+ type RegisterWebhookRequest = {
5
+ url: string;
6
+ chainId: string;
7
+ /**
8
+ * The type of event for the webhook
9
+ */
10
+ eventType: EventType;
11
+ metadata: AddressActivityMetadata;
12
+ };
13
+
14
+ export { RegisterWebhookRequest };
@@ -1,6 +1,7 @@
1
1
  declare enum RewardType {
2
2
  VALIDATOR = "VALIDATOR",
3
- DELEGATOR = "DELEGATOR"
3
+ DELEGATOR = "DELEGATOR",
4
+ VALIDATOR_FEE = "VALIDATOR_FEE"
4
5
  }
5
6
 
6
7
  export { RewardType };
@@ -1,6 +1,7 @@
1
1
  var RewardType = /* @__PURE__ */ ((RewardType2) => {
2
2
  RewardType2["VALIDATOR"] = "VALIDATOR";
3
3
  RewardType2["DELEGATOR"] = "DELEGATOR";
4
+ RewardType2["VALIDATOR_FEE"] = "VALIDATOR_FEE";
4
5
  return RewardType2;
5
6
  })(RewardType || {});
6
7
 
@@ -1,6 +1,8 @@
1
1
  type Rewards = {
2
2
  validationRewardAmount: string;
3
3
  delegationRewardAmount: string;
4
+ rewardAddresses?: Array<string>;
5
+ rewardTxHash?: string;
4
6
  };
5
7
 
6
8
  export { Rewards };
@@ -0,0 +1,10 @@
1
+ import { Erc1155Contract } from './Erc1155Contract.js';
2
+ import { Erc20Contract } from './Erc20Contract.js';
3
+ import { Erc721Contract } from './Erc721Contract.js';
4
+ import { UnknownContract } from './UnknownContract.js';
5
+
6
+ type UpdateContractResponse = {
7
+ contract: (UnknownContract | Erc20Contract | Erc721Contract | Erc1155Contract);
8
+ };
9
+
10
+ export { UpdateContractResponse };
@@ -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,15 @@
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
+ };
14
+
15
+ 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,6 +1,7 @@
1
1
  import { Asset } from './Asset.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
  /**
@@ -18,7 +19,7 @@ type XChainLinearTransaction = {
18
19
  /**
19
20
  * Type of transaction.
20
21
  */
21
- txType: string;
22
+ txType: XChainTransactionType;
22
23
  /**
23
24
  * Hex encoded memo bytes for this transaction.
24
25
  */
@@ -2,6 +2,7 @@ import { Asset } from './Asset.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
  /**
@@ -19,7 +20,7 @@ type XChainNonLinearTransaction = {
19
20
  /**
20
21
  * Type of transaction.
21
22
  */
22
- txType: string;
23
+ txType: XChainTransactionType;
23
24
  /**
24
25
  * Hex encoded memo bytes for this transaction.
25
26
  */
@@ -0,0 +1,10 @@
1
+ declare enum XChainTransactionType {
2
+ BASE_TX = "BaseTx",
3
+ CREATE_ASSET_TX = "CreateAssetTx",
4
+ OPERATION_TX = "OperationTx",
5
+ IMPORT_TX = "ImportTx",
6
+ EXPORT_TX = "ExportTx",
7
+ UNKNOWN = "UNKNOWN"
8
+ }
9
+
10
+ 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,59 @@
1
+ import { ListWebhooksResponse } from '../models/ListWebhooksResponse.js';
2
+ import { RegisterWebhookRequest } from '../models/RegisterWebhookRequest.js';
3
+ import { WebhookResponse } from '../models/WebhookResponse.js';
4
+ import { WebhookStatus } from '../models/WebhookStatus.js';
5
+ import { CancelablePromise } from '../core/CancelablePromise.js';
6
+ import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
7
+
8
+ declare class DefaultService {
9
+ readonly httpRequest: BaseHttpRequest;
10
+ constructor(httpRequest: BaseHttpRequest);
11
+ /**
12
+ * @returns any
13
+ * @throws ApiError
14
+ */
15
+ mediaControllerUploadImage(): CancelablePromise<any>;
16
+ /**
17
+ * Register a webhook
18
+ * Registers a new webhook.
19
+ * @returns WebhookResponse
20
+ * @throws ApiError
21
+ */
22
+ registerWebhook({ requestBody, }: {
23
+ requestBody: RegisterWebhookRequest;
24
+ }): CancelablePromise<WebhookResponse>;
25
+ /**
26
+ * List webhooks
27
+ * Lists webhooks for the user.
28
+ * @returns ListWebhooksResponse
29
+ * @throws ApiError
30
+ */
31
+ listWebhooks({ pageSize, pageToken, status, }: {
32
+ /**
33
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
34
+ */
35
+ pageSize?: number;
36
+ /**
37
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
38
+ */
39
+ pageToken?: string;
40
+ /**
41
+ * 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.
42
+ */
43
+ status?: WebhookStatus;
44
+ }): CancelablePromise<ListWebhooksResponse>;
45
+ /**
46
+ * Deactivate a webhook
47
+ * Deactivates a webhook by ID.
48
+ * @returns WebhookResponse
49
+ * @throws ApiError
50
+ */
51
+ deactivateWebhook({ id, }: {
52
+ /**
53
+ * The webhook identifier.
54
+ */
55
+ id: string;
56
+ }): CancelablePromise<WebhookResponse>;
57
+ }
58
+
59
+ export { DefaultService };
@@ -0,0 +1,49 @@
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
+ pageSize = 10,
23
+ pageToken,
24
+ status
25
+ }) {
26
+ return this.httpRequest.request({
27
+ method: "GET",
28
+ url: "/v1/webhooks",
29
+ query: {
30
+ "pageSize": pageSize,
31
+ "pageToken": pageToken,
32
+ "status": status
33
+ }
34
+ });
35
+ }
36
+ deactivateWebhook({
37
+ id
38
+ }) {
39
+ return this.httpRequest.request({
40
+ method: "DELETE",
41
+ url: "/v1/webhooks/{id}",
42
+ path: {
43
+ "id": id
44
+ }
45
+ });
46
+ }
47
+ }
48
+
49
+ export { DefaultService };
@@ -0,0 +1,48 @@
1
+ import { ContractSubmissionBody } from '../models/ContractSubmissionBody.js';
2
+ import { Erc1155Contract } from '../models/Erc1155Contract.js';
3
+ import { Erc20Contract } from '../models/Erc20Contract.js';
4
+ import { Erc721Contract } from '../models/Erc721Contract.js';
5
+ import { UnknownContract } from '../models/UnknownContract.js';
6
+ import { UpdateContractResponse } from '../models/UpdateContractResponse.js';
7
+ import { CancelablePromise } from '../core/CancelablePromise.js';
8
+ import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
9
+
10
+ declare class EvmContractsService {
11
+ readonly httpRequest: BaseHttpRequest;
12
+ constructor(httpRequest: BaseHttpRequest);
13
+ /**
14
+ * Get contract metadata
15
+ * Gets metadata about the contract at the given address.
16
+ * @returns any
17
+ * @throws ApiError
18
+ */
19
+ getContractMetadata({ chainId, address, }: {
20
+ /**
21
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
22
+ */
23
+ chainId: string;
24
+ /**
25
+ * Contract address on the relevant chain.
26
+ */
27
+ address: string;
28
+ }): CancelablePromise<(Erc721Contract | Erc1155Contract | Erc20Contract | UnknownContract)>;
29
+ /**
30
+ * Update contract information
31
+ * Update contract information. Updates will be reviewed by the Ava Labs team before they are published.
32
+ * @returns UpdateContractResponse
33
+ * @throws ApiError
34
+ */
35
+ updateContractInfo({ chainId, address, requestBody, }: {
36
+ /**
37
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
38
+ */
39
+ chainId: string;
40
+ /**
41
+ * Contract address on the relevant chain.
42
+ */
43
+ address: string;
44
+ requestBody: ContractSubmissionBody;
45
+ }): CancelablePromise<UpdateContractResponse>;
46
+ }
47
+
48
+ export { EvmContractsService };
@@ -0,0 +1,36 @@
1
+ class EvmContractsService {
2
+ constructor(httpRequest) {
3
+ this.httpRequest = httpRequest;
4
+ }
5
+ getContractMetadata({
6
+ chainId,
7
+ address
8
+ }) {
9
+ return this.httpRequest.request({
10
+ method: "GET",
11
+ url: "/v1/chains/{chainId}/addresses/{address}",
12
+ path: {
13
+ "chainId": chainId,
14
+ "address": address
15
+ }
16
+ });
17
+ }
18
+ updateContractInfo({
19
+ chainId,
20
+ address,
21
+ requestBody
22
+ }) {
23
+ return this.httpRequest.request({
24
+ method: "PATCH",
25
+ url: "/v1/chains/{chainId}/contracts/{address}",
26
+ path: {
27
+ "chainId": chainId,
28
+ "address": address
29
+ },
30
+ body: requestBody,
31
+ mediaType: "application/json"
32
+ });
33
+ }
34
+ }
35
+
36
+ export { EvmContractsService };
@@ -75,7 +75,13 @@ declare class EvmTransactionsService {
75
75
  * A wallet address.
76
76
  */
77
77
  address: string;
78
+ /**
79
+ * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
80
+ */
78
81
  startBlock?: number;
82
+ /**
83
+ * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
84
+ */
79
85
  endBlock?: number;
80
86
  /**
81
87
  * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
@@ -111,7 +117,13 @@ declare class EvmTransactionsService {
111
117
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
112
118
  */
113
119
  pageToken?: string;
120
+ /**
121
+ * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
122
+ */
114
123
  startBlock?: number;
124
+ /**
125
+ * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
126
+ */
115
127
  endBlock?: number;
116
128
  /**
117
129
  * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
@@ -133,7 +145,13 @@ declare class EvmTransactionsService {
133
145
  * A wallet address.
134
146
  */
135
147
  address: string;
148
+ /**
149
+ * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
150
+ */
136
151
  startBlock?: number;
152
+ /**
153
+ * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
154
+ */
137
155
  endBlock?: number;
138
156
  /**
139
157
  * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
@@ -159,7 +177,13 @@ declare class EvmTransactionsService {
159
177
  * A wallet address.
160
178
  */
161
179
  address: string;
180
+ /**
181
+ * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
182
+ */
162
183
  startBlock?: number;
184
+ /**
185
+ * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
186
+ */
163
187
  endBlock?: number;
164
188
  /**
165
189
  * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
@@ -185,7 +209,13 @@ declare class EvmTransactionsService {
185
209
  * A wallet address.
186
210
  */
187
211
  address: string;
212
+ /**
213
+ * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
214
+ */
188
215
  startBlock?: number;
216
+ /**
217
+ * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
218
+ */
189
219
  endBlock?: number;
190
220
  /**
191
221
  * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
@@ -211,7 +241,13 @@ declare class EvmTransactionsService {
211
241
  * A wallet address.
212
242
  */
213
243
  address: string;
244
+ /**
245
+ * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
246
+ */
214
247
  startBlock?: number;
248
+ /**
249
+ * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
250
+ */
215
251
  endBlock?: number;
216
252
  /**
217
253
  * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
@@ -239,7 +275,13 @@ declare class EvmTransactionsService {
239
275
  * A wallet address.
240
276
  */
241
277
  address: string;
278
+ /**
279
+ * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
280
+ */
242
281
  startBlock?: number;
282
+ /**
283
+ * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
284
+ */
243
285
  endBlock?: number;
244
286
  /**
245
287
  * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
@@ -27,7 +27,7 @@ class EvmTransactionsService {
27
27
  }) {
28
28
  return this.httpRequest.request({
29
29
  method: "GET",
30
- url: "/v1/chains/{chainId}/addresses/{address}/deployments",
30
+ url: "/v1/chains/{chainId}/contracts/{address}/deployments",
31
31
  path: {
32
32
  "chainId": chainId,
33
33
  "address": address