@avalabs/glacier-sdk 2.8.0-alpha.88 → 2.8.0-alpha.89
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 +61 -3
- package/dist/index.js +21 -0
- package/esm/generated/models/Erc721Token.d.ts +4 -0
- package/esm/generated/models/Erc721TokenBalance.d.ts +4 -0
- package/esm/generated/models/PChainTransaction.d.ts +23 -1
- package/esm/generated/services/PrimaryNetworkService.d.ts +30 -2
- package/esm/generated/services/PrimaryNetworkService.js +21 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -164,6 +164,10 @@ type Erc721Token = {
|
|
|
164
164
|
tokenId: string;
|
|
165
165
|
tokenUri: string;
|
|
166
166
|
metadata: Erc721TokenMetadata;
|
|
167
|
+
/**
|
|
168
|
+
* A wallet or contract address in mixed-case checksum encoding.
|
|
169
|
+
*/
|
|
170
|
+
ownerAddress?: string;
|
|
167
171
|
};
|
|
168
172
|
declare namespace Erc721Token {
|
|
169
173
|
enum ercType {
|
|
@@ -755,6 +759,10 @@ type Erc721TokenBalance = {
|
|
|
755
759
|
tokenId: string;
|
|
756
760
|
tokenUri: string;
|
|
757
761
|
metadata: Erc721TokenMetadata;
|
|
762
|
+
/**
|
|
763
|
+
* A wallet or contract address in mixed-case checksum encoding.
|
|
764
|
+
*/
|
|
765
|
+
ownerAddress?: string;
|
|
758
766
|
/**
|
|
759
767
|
* The evm chain id.
|
|
760
768
|
*/
|
|
@@ -2525,17 +2533,39 @@ type PChainTransaction = {
|
|
|
2525
2533
|
*/
|
|
2526
2534
|
amountBurned?: Array<PChainAsset>;
|
|
2527
2535
|
/**
|
|
2528
|
-
* A list of objects containing P-chain Asset ID and the amount of that Asset ID.
|
|
2536
|
+
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
2529
2537
|
*/
|
|
2530
2538
|
amountStaked?: Array<PChainAsset>;
|
|
2539
|
+
/**
|
|
2540
|
+
* Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
2541
|
+
*/
|
|
2531
2542
|
startTimestamp?: number;
|
|
2543
|
+
/**
|
|
2544
|
+
* Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
2545
|
+
*/
|
|
2532
2546
|
endTimestamp?: number;
|
|
2547
|
+
/**
|
|
2548
|
+
* Present for AddValidatorTx, AddPermissionlessValidatorTx
|
|
2549
|
+
*/
|
|
2533
2550
|
delegationFeePercent?: string;
|
|
2551
|
+
/**
|
|
2552
|
+
* Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
2553
|
+
*/
|
|
2534
2554
|
nodeId?: string;
|
|
2555
|
+
/**
|
|
2556
|
+
* Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx, CreateChainTx, CreateSubnetTx
|
|
2557
|
+
*/
|
|
2535
2558
|
subnetId?: string;
|
|
2559
|
+
/**
|
|
2560
|
+
* Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
2561
|
+
*/
|
|
2536
2562
|
estimatedReward?: string;
|
|
2537
2563
|
rewardTx?: string;
|
|
2538
2564
|
memo?: string;
|
|
2565
|
+
/**
|
|
2566
|
+
* Present for RewardValidatorTx
|
|
2567
|
+
*/
|
|
2568
|
+
stakingTxHash?: string;
|
|
2539
2569
|
};
|
|
2540
2570
|
|
|
2541
2571
|
type ListPChainTransactionsResponse = {
|
|
@@ -2956,6 +2986,34 @@ declare class PrimaryNetworkService {
|
|
|
2956
2986
|
*/
|
|
2957
2987
|
blockId: string;
|
|
2958
2988
|
}): CancelablePromise<ListBlocksResponse>;
|
|
2989
|
+
/**
|
|
2990
|
+
* Returns latest blocks proposed by a given NodeID, up to user defined limit.
|
|
2991
|
+
* @returns ListBlocksResponse
|
|
2992
|
+
* @throws ApiError
|
|
2993
|
+
*/
|
|
2994
|
+
listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageSize, pageToken, }: {
|
|
2995
|
+
/**
|
|
2996
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
2997
|
+
*/
|
|
2998
|
+
blockchainId: BlockchainId;
|
|
2999
|
+
/**
|
|
3000
|
+
* Either mainnet or a testnet.
|
|
3001
|
+
*/
|
|
3002
|
+
network: Network;
|
|
3003
|
+
/**
|
|
3004
|
+
* A primary network (P or X chain) nodeId.
|
|
3005
|
+
*/
|
|
3006
|
+
nodeId: string;
|
|
3007
|
+
/**
|
|
3008
|
+
* The maximum number of items to return. The minimum page size
|
|
3009
|
+
* is 1. The maximum pageSize is 100.
|
|
3010
|
+
*/
|
|
3011
|
+
pageSize?: number;
|
|
3012
|
+
/**
|
|
3013
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
3014
|
+
*/
|
|
3015
|
+
pageToken?: string;
|
|
3016
|
+
}): CancelablePromise<ListBlocksResponse>;
|
|
2959
3017
|
/**
|
|
2960
3018
|
* Returns latest blocks, up to user defined limit on P-Chain or C-Chain.
|
|
2961
3019
|
* @returns ListBlocksResponse
|
|
@@ -2963,9 +3021,9 @@ declare class PrimaryNetworkService {
|
|
|
2963
3021
|
*/
|
|
2964
3022
|
listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
|
|
2965
3023
|
/**
|
|
2966
|
-
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain or c-chain instead!
|
|
3024
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
2967
3025
|
*/
|
|
2968
|
-
blockchainId:
|
|
3026
|
+
blockchainId: BlockchainId;
|
|
2969
3027
|
/**
|
|
2970
3028
|
* Either mainnet or a testnet.
|
|
2971
3029
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1033,6 +1033,27 @@ class PrimaryNetworkService {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
|
+
listPrimaryNetworkBlocksByNodeId({
|
|
1037
|
+
blockchainId,
|
|
1038
|
+
network,
|
|
1039
|
+
nodeId,
|
|
1040
|
+
pageSize = 10,
|
|
1041
|
+
pageToken
|
|
1042
|
+
}) {
|
|
1043
|
+
return this.httpRequest.request({
|
|
1044
|
+
method: "GET",
|
|
1045
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/nodes/{nodeId}/blocks",
|
|
1046
|
+
path: {
|
|
1047
|
+
"blockchainId": blockchainId,
|
|
1048
|
+
"network": network,
|
|
1049
|
+
"nodeId": nodeId
|
|
1050
|
+
},
|
|
1051
|
+
query: {
|
|
1052
|
+
"pageSize": pageSize,
|
|
1053
|
+
"pageToken": pageToken
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1036
1057
|
listLatestPrimaryNetworkBlocks({
|
|
1037
1058
|
blockchainId,
|
|
1038
1059
|
network,
|
|
@@ -17,6 +17,10 @@ type Erc721Token = {
|
|
|
17
17
|
tokenId: string;
|
|
18
18
|
tokenUri: string;
|
|
19
19
|
metadata: Erc721TokenMetadata;
|
|
20
|
+
/**
|
|
21
|
+
* A wallet or contract address in mixed-case checksum encoding.
|
|
22
|
+
*/
|
|
23
|
+
ownerAddress?: string;
|
|
20
24
|
};
|
|
21
25
|
declare namespace Erc721Token {
|
|
22
26
|
enum ercType {
|
|
@@ -31,17 +31,39 @@ type PChainTransaction = {
|
|
|
31
31
|
*/
|
|
32
32
|
amountBurned?: Array<PChainAsset>;
|
|
33
33
|
/**
|
|
34
|
-
* A list of objects containing P-chain Asset ID and the amount of that Asset ID.
|
|
34
|
+
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
35
35
|
*/
|
|
36
36
|
amountStaked?: Array<PChainAsset>;
|
|
37
|
+
/**
|
|
38
|
+
* Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
39
|
+
*/
|
|
37
40
|
startTimestamp?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
43
|
+
*/
|
|
38
44
|
endTimestamp?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Present for AddValidatorTx, AddPermissionlessValidatorTx
|
|
47
|
+
*/
|
|
39
48
|
delegationFeePercent?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
51
|
+
*/
|
|
40
52
|
nodeId?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx, CreateChainTx, CreateSubnetTx
|
|
55
|
+
*/
|
|
41
56
|
subnetId?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
59
|
+
*/
|
|
42
60
|
estimatedReward?: string;
|
|
43
61
|
rewardTx?: string;
|
|
44
62
|
memo?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Present for RewardValidatorTx
|
|
65
|
+
*/
|
|
66
|
+
stakingTxHash?: string;
|
|
45
67
|
};
|
|
46
68
|
|
|
47
69
|
export { PChainTransaction };
|
|
@@ -191,6 +191,34 @@ declare class PrimaryNetworkService {
|
|
|
191
191
|
*/
|
|
192
192
|
blockId: string;
|
|
193
193
|
}): CancelablePromise<ListBlocksResponse>;
|
|
194
|
+
/**
|
|
195
|
+
* Returns latest blocks proposed by a given NodeID, up to user defined limit.
|
|
196
|
+
* @returns ListBlocksResponse
|
|
197
|
+
* @throws ApiError
|
|
198
|
+
*/
|
|
199
|
+
listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageSize, pageToken, }: {
|
|
200
|
+
/**
|
|
201
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
202
|
+
*/
|
|
203
|
+
blockchainId: BlockchainId;
|
|
204
|
+
/**
|
|
205
|
+
* Either mainnet or a testnet.
|
|
206
|
+
*/
|
|
207
|
+
network: Network;
|
|
208
|
+
/**
|
|
209
|
+
* A primary network (P or X chain) nodeId.
|
|
210
|
+
*/
|
|
211
|
+
nodeId: string;
|
|
212
|
+
/**
|
|
213
|
+
* The maximum number of items to return. The minimum page size
|
|
214
|
+
* is 1. The maximum pageSize is 100.
|
|
215
|
+
*/
|
|
216
|
+
pageSize?: number;
|
|
217
|
+
/**
|
|
218
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
219
|
+
*/
|
|
220
|
+
pageToken?: string;
|
|
221
|
+
}): CancelablePromise<ListBlocksResponse>;
|
|
194
222
|
/**
|
|
195
223
|
* Returns latest blocks, up to user defined limit on P-Chain or C-Chain.
|
|
196
224
|
* @returns ListBlocksResponse
|
|
@@ -198,9 +226,9 @@ declare class PrimaryNetworkService {
|
|
|
198
226
|
*/
|
|
199
227
|
listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
|
|
200
228
|
/**
|
|
201
|
-
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain or c-chain instead!
|
|
229
|
+
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
202
230
|
*/
|
|
203
|
-
blockchainId:
|
|
231
|
+
blockchainId: BlockchainId;
|
|
204
232
|
/**
|
|
205
233
|
* Either mainnet or a testnet.
|
|
206
234
|
*/
|
|
@@ -120,6 +120,27 @@ class PrimaryNetworkService {
|
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
+
listPrimaryNetworkBlocksByNodeId({
|
|
124
|
+
blockchainId,
|
|
125
|
+
network,
|
|
126
|
+
nodeId,
|
|
127
|
+
pageSize = 10,
|
|
128
|
+
pageToken
|
|
129
|
+
}) {
|
|
130
|
+
return this.httpRequest.request({
|
|
131
|
+
method: "GET",
|
|
132
|
+
url: "/v1/networks/{network}/blockchains/{blockchainId}/nodes/{nodeId}/blocks",
|
|
133
|
+
path: {
|
|
134
|
+
"blockchainId": blockchainId,
|
|
135
|
+
"network": network,
|
|
136
|
+
"nodeId": nodeId
|
|
137
|
+
},
|
|
138
|
+
query: {
|
|
139
|
+
"pageSize": pageSize,
|
|
140
|
+
"pageToken": pageToken
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
123
144
|
listLatestPrimaryNetworkBlocks({
|
|
124
145
|
blockchainId,
|
|
125
146
|
network,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avalabs/glacier-sdk",
|
|
3
|
-
"version": "2.8.0-alpha.
|
|
3
|
+
"version": "2.8.0-alpha.89",
|
|
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",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"url": "https://github.com/ava-labs/avalanche-sdks/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@avalabs/utils-sdk": "2.8.0-alpha.
|
|
36
|
+
"@avalabs/utils-sdk": "2.8.0-alpha.89"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "43bc24b5bd9dcdcceaf2d11aaea62e008b7d4ba9"
|
|
39
39
|
}
|