@avalabs/glacier-sdk 2.8.0-canary.3b325a0.0 → 2.8.0-canary.3b6c80d.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.
- package/dist/index.d.ts +38 -6
- package/dist/index.js +4 -2
- package/esm/generated/models/AssetWithPriceInfo.d.ts +34 -0
- package/esm/generated/models/HistoricalReward.d.ts +2 -5
- package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +6 -1
- package/esm/generated/services/PrimaryNetworkRewardsService.js +4 -2
- package/esm/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -3159,6 +3159,37 @@ declare class PrimaryNetworkBlocksService {
|
|
|
3159
3159
|
}): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
|
|
3160
3160
|
}
|
|
3161
3161
|
|
|
3162
|
+
type AssetWithPriceInfo = {
|
|
3163
|
+
/**
|
|
3164
|
+
* Unique ID for an asset.
|
|
3165
|
+
*/
|
|
3166
|
+
assetId: string;
|
|
3167
|
+
/**
|
|
3168
|
+
* Name of this asset.
|
|
3169
|
+
*/
|
|
3170
|
+
name: string;
|
|
3171
|
+
/**
|
|
3172
|
+
* Symbol for this asset (max 4 characters).
|
|
3173
|
+
*/
|
|
3174
|
+
symbol: string;
|
|
3175
|
+
/**
|
|
3176
|
+
* Denomination of this asset to represent fungibility.
|
|
3177
|
+
*/
|
|
3178
|
+
denomination: number;
|
|
3179
|
+
/**
|
|
3180
|
+
* Type of asset like SECP256K1 or NFT.
|
|
3181
|
+
*/
|
|
3182
|
+
type: string;
|
|
3183
|
+
/**
|
|
3184
|
+
* Amount of the asset.
|
|
3185
|
+
*/
|
|
3186
|
+
amount: string;
|
|
3187
|
+
/**
|
|
3188
|
+
* The historical asset price at the time the reward was granted, if available. Note, this is only provided if the reward occured more than 24 hours ago.
|
|
3189
|
+
*/
|
|
3190
|
+
historicalPrice?: Money;
|
|
3191
|
+
};
|
|
3192
|
+
|
|
3162
3193
|
declare enum RewardType {
|
|
3163
3194
|
VALIDATOR = "VALIDATOR",
|
|
3164
3195
|
DELEGATOR = "DELEGATOR",
|
|
@@ -3178,10 +3209,7 @@ type HistoricalReward = {
|
|
|
3178
3209
|
rewardType: RewardType;
|
|
3179
3210
|
utxoId: string;
|
|
3180
3211
|
outputIndex: number;
|
|
3181
|
-
|
|
3182
|
-
* An object containing P-chain Asset ID and the amount of that Asset ID.
|
|
3183
|
-
*/
|
|
3184
|
-
reward: Asset;
|
|
3212
|
+
reward: AssetWithPriceInfo;
|
|
3185
3213
|
rewardTxHash: string;
|
|
3186
3214
|
};
|
|
3187
3215
|
|
|
@@ -3260,7 +3288,7 @@ declare class PrimaryNetworkRewardsService {
|
|
|
3260
3288
|
* @returns ListHistoricalRewardsResponse
|
|
3261
3289
|
* @throws ApiError
|
|
3262
3290
|
*/
|
|
3263
|
-
listHistoricalPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, nodeIds, sortOrder, }: {
|
|
3291
|
+
listHistoricalPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, nodeIds, sortOrder, currency, }: {
|
|
3264
3292
|
/**
|
|
3265
3293
|
* Either mainnet or a testnet.
|
|
3266
3294
|
*/
|
|
@@ -3285,6 +3313,10 @@ declare class PrimaryNetworkRewardsService {
|
|
|
3285
3313
|
* 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.
|
|
3286
3314
|
*/
|
|
3287
3315
|
sortOrder?: SortOrder;
|
|
3316
|
+
/**
|
|
3317
|
+
* The currency that return values should use. Defaults to USD.
|
|
3318
|
+
*/
|
|
3319
|
+
currency?: CurrencyCode;
|
|
3288
3320
|
}): CancelablePromise<ListHistoricalRewardsResponse>;
|
|
3289
3321
|
}
|
|
3290
3322
|
|
|
@@ -4360,4 +4392,4 @@ declare class ApiError extends Error {
|
|
|
4360
4392
|
constructor(request: ApiRequestOptions, response: ApiResult, message: string);
|
|
4361
4393
|
}
|
|
4362
4394
|
|
|
4363
|
-
export { ActiveDelegatorDetails, ActiveValidatorDetails, AddressActivityMetadata, ApiError, Asset, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, ContractSubmissionBody, ContractSubmissionErc1155, ContractSubmissionErc20, ContractSubmissionErc721, ContractSubmissionUnknown, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DefaultService, DelegationStatusType, DelegatorsDetails, DeliveredSourceNotIndexedTeleporterMessage, DeliveredTeleporterMessage, EVMInput, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EventType, EvmBalancesService, EvmBlock, EvmBlocksService, EvmChainsService, EvmContractsService, EvmNetworkOptions, EvmTransactionsService, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, HealthCheckService, HistoricalReward, ImageAsset, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListContractsResponse, ListDelegatorDetailsResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListHistoricalRewardsResponse, ListInternalTransactionsResponse, ListNativeTransactionsResponse, ListNftTokens, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListWebhooksResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NetworkType, NextPageToken, NfTsService, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingTeleporterMessage, PendingValidatorDetails, PricingProviders, PrimaryNetwork, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, RegisterWebhookRequest, RemovedValidatorDetails, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, SharedSecretsResponse, SortOrder, StakingDistribution, Subnet, TeleporterDestinationTransaction, TeleporterRewardDetails, TeleporterService, TeleporterSourceTransaction, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, UnknownContract, UpdateContractResponse, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorHealthDetails, ValidatorsDetails, VmName, WebhookResponse, WebhookStatus, WebhookStatusType, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainTransactionType, XChainVertex };
|
|
4395
|
+
export { ActiveDelegatorDetails, ActiveValidatorDetails, AddressActivityMetadata, ApiError, Asset, AssetWithPriceInfo, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, ContractSubmissionBody, ContractSubmissionErc1155, ContractSubmissionErc20, ContractSubmissionErc721, ContractSubmissionUnknown, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DefaultService, DelegationStatusType, DelegatorsDetails, DeliveredSourceNotIndexedTeleporterMessage, DeliveredTeleporterMessage, EVMInput, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EventType, EvmBalancesService, EvmBlock, EvmBlocksService, EvmChainsService, EvmContractsService, EvmNetworkOptions, EvmTransactionsService, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, HealthCheckService, HistoricalReward, ImageAsset, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListContractsResponse, ListDelegatorDetailsResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListHistoricalRewardsResponse, ListInternalTransactionsResponse, ListNativeTransactionsResponse, ListNftTokens, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListWebhooksResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NetworkType, NextPageToken, NfTsService, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingTeleporterMessage, PendingValidatorDetails, PricingProviders, PrimaryNetwork, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, RegisterWebhookRequest, RemovedValidatorDetails, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, SharedSecretsResponse, SortOrder, StakingDistribution, Subnet, TeleporterDestinationTransaction, TeleporterRewardDetails, TeleporterService, TeleporterSourceTransaction, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, UnknownContract, UpdateContractResponse, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorHealthDetails, ValidatorsDetails, VmName, WebhookResponse, WebhookStatus, WebhookStatusType, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainTransactionType, XChainVertex };
|
package/dist/index.js
CHANGED
|
@@ -1249,7 +1249,8 @@ class PrimaryNetworkRewardsService {
|
|
|
1249
1249
|
pageSize = 10,
|
|
1250
1250
|
pageToken,
|
|
1251
1251
|
nodeIds,
|
|
1252
|
-
sortOrder
|
|
1252
|
+
sortOrder,
|
|
1253
|
+
currency
|
|
1253
1254
|
}) {
|
|
1254
1255
|
return this.httpRequest.request({
|
|
1255
1256
|
method: "GET",
|
|
@@ -1262,7 +1263,8 @@ class PrimaryNetworkRewardsService {
|
|
|
1262
1263
|
"pageSize": pageSize,
|
|
1263
1264
|
"pageToken": pageToken,
|
|
1264
1265
|
"nodeIds": nodeIds,
|
|
1265
|
-
"sortOrder": sortOrder
|
|
1266
|
+
"sortOrder": sortOrder,
|
|
1267
|
+
"currency": currency
|
|
1266
1268
|
}
|
|
1267
1269
|
});
|
|
1268
1270
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Money } from './Money.js';
|
|
2
|
+
|
|
3
|
+
type AssetWithPriceInfo = {
|
|
4
|
+
/**
|
|
5
|
+
* Unique ID for an asset.
|
|
6
|
+
*/
|
|
7
|
+
assetId: string;
|
|
8
|
+
/**
|
|
9
|
+
* Name of this asset.
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* Symbol for this asset (max 4 characters).
|
|
14
|
+
*/
|
|
15
|
+
symbol: string;
|
|
16
|
+
/**
|
|
17
|
+
* Denomination of this asset to represent fungibility.
|
|
18
|
+
*/
|
|
19
|
+
denomination: number;
|
|
20
|
+
/**
|
|
21
|
+
* Type of asset like SECP256K1 or NFT.
|
|
22
|
+
*/
|
|
23
|
+
type: string;
|
|
24
|
+
/**
|
|
25
|
+
* Amount of the asset.
|
|
26
|
+
*/
|
|
27
|
+
amount: string;
|
|
28
|
+
/**
|
|
29
|
+
* The historical asset price at the time the reward was granted, if available. Note, this is only provided if the reward occured more than 24 hours ago.
|
|
30
|
+
*/
|
|
31
|
+
historicalPrice?: Money;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { AssetWithPriceInfo };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssetWithPriceInfo } from './AssetWithPriceInfo.js';
|
|
2
2
|
import { RewardType } from './RewardType.js';
|
|
3
3
|
|
|
4
4
|
type HistoricalReward = {
|
|
@@ -14,10 +14,7 @@ type HistoricalReward = {
|
|
|
14
14
|
rewardType: RewardType;
|
|
15
15
|
utxoId: string;
|
|
16
16
|
outputIndex: number;
|
|
17
|
-
|
|
18
|
-
* An object containing P-chain Asset ID and the amount of that Asset ID.
|
|
19
|
-
*/
|
|
20
|
-
reward: Asset;
|
|
17
|
+
reward: AssetWithPriceInfo;
|
|
21
18
|
rewardTxHash: string;
|
|
22
19
|
};
|
|
23
20
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CurrencyCode } from '../models/CurrencyCode.js';
|
|
1
2
|
import { ListHistoricalRewardsResponse } from '../models/ListHistoricalRewardsResponse.js';
|
|
2
3
|
import { ListPendingRewardsResponse } from '../models/ListPendingRewardsResponse.js';
|
|
3
4
|
import { Network } from '../models/Network.js';
|
|
@@ -46,7 +47,7 @@ declare class PrimaryNetworkRewardsService {
|
|
|
46
47
|
* @returns ListHistoricalRewardsResponse
|
|
47
48
|
* @throws ApiError
|
|
48
49
|
*/
|
|
49
|
-
listHistoricalPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, nodeIds, sortOrder, }: {
|
|
50
|
+
listHistoricalPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, nodeIds, sortOrder, currency, }: {
|
|
50
51
|
/**
|
|
51
52
|
* Either mainnet or a testnet.
|
|
52
53
|
*/
|
|
@@ -71,6 +72,10 @@ declare class PrimaryNetworkRewardsService {
|
|
|
71
72
|
* 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.
|
|
72
73
|
*/
|
|
73
74
|
sortOrder?: SortOrder;
|
|
75
|
+
/**
|
|
76
|
+
* The currency that return values should use. Defaults to USD.
|
|
77
|
+
*/
|
|
78
|
+
currency?: CurrencyCode;
|
|
74
79
|
}): CancelablePromise<ListHistoricalRewardsResponse>;
|
|
75
80
|
}
|
|
76
81
|
|
|
@@ -31,7 +31,8 @@ class PrimaryNetworkRewardsService {
|
|
|
31
31
|
pageSize = 10,
|
|
32
32
|
pageToken,
|
|
33
33
|
nodeIds,
|
|
34
|
-
sortOrder
|
|
34
|
+
sortOrder,
|
|
35
|
+
currency
|
|
35
36
|
}) {
|
|
36
37
|
return this.httpRequest.request({
|
|
37
38
|
method: "GET",
|
|
@@ -44,7 +45,8 @@ class PrimaryNetworkRewardsService {
|
|
|
44
45
|
"pageSize": pageSize,
|
|
45
46
|
"pageToken": pageToken,
|
|
46
47
|
"nodeIds": nodeIds,
|
|
47
|
-
"sortOrder": sortOrder
|
|
48
|
+
"sortOrder": sortOrder,
|
|
49
|
+
"currency": currency
|
|
48
50
|
}
|
|
49
51
|
});
|
|
50
52
|
}
|
package/esm/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { ActiveDelegatorDetails } from './generated/models/ActiveDelegatorDetail
|
|
|
7
7
|
export { ActiveValidatorDetails } from './generated/models/ActiveValidatorDetails.js';
|
|
8
8
|
export { AddressActivityMetadata } from './generated/models/AddressActivityMetadata.js';
|
|
9
9
|
export { Asset } from './generated/models/Asset.js';
|
|
10
|
+
export { AssetWithPriceInfo } from './generated/models/AssetWithPriceInfo.js';
|
|
10
11
|
export { Blockchain } from './generated/models/Blockchain.js';
|
|
11
12
|
export { BlockchainId } from './generated/models/BlockchainId.js';
|
|
12
13
|
export { BlockchainIds } from './generated/models/BlockchainIds.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avalabs/glacier-sdk",
|
|
3
|
-
"version": "2.8.0-canary.
|
|
3
|
+
"version": "2.8.0-canary.3b6c80d.0+3b6c80d",
|
|
4
4
|
"description": "sdk for interacting with glacier-api",
|
|
5
5
|
"author": "Oliver Wang <oliver.wang@avalabs.org>",
|
|
6
6
|
"homepage": "https://github.com/ava-labs/avalanche-sdks#readme",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"bugs": {
|
|
30
30
|
"url": "https://github.com/ava-labs/avalanche-sdks/issues"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "3b6c80da7d23bb319edc8357b3dda5d179d7783c"
|
|
33
33
|
}
|