algosdk 1.20.0 → 1.22.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/README.md +4 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/src/client/algod.js +21 -0
- package/dist/cjs/src/client/algod.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/algod.js +17 -0
- package/dist/cjs/src/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/getBlockHash.js +19 -0
- package/dist/cjs/src/client/v2/algod/getBlockHash.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupBlock.js +8 -0
- package/dist/cjs/src/client/v2/indexer/lookupBlock.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchAccounts.js +1 -1
- package/dist/esm/src/client/algod.js +21 -0
- package/dist/esm/src/client/algod.js.map +1 -1
- package/dist/esm/src/client/v2/algod/algod.js +17 -0
- package/dist/esm/src/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/src/client/v2/algod/getBlockHash.js +13 -0
- package/dist/esm/src/client/v2/algod/getBlockHash.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupBlock.js +8 -0
- package/dist/esm/src/client/v2/indexer/lookupBlock.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchAccounts.js +1 -1
- package/dist/types/src/client/algod.d.ts +21 -0
- package/dist/types/src/client/v2/algod/algod.d.ts +15 -0
- package/dist/types/src/client/v2/algod/getBlockHash.d.ts +8 -0
- package/dist/types/src/client/v2/indexer/lookupBlock.d.ts +5 -0
- package/dist/types/src/client/v2/indexer/searchAccounts.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
/** @deprecated v1 algod APIs are deprecated, please use the v2 client */
|
|
1
2
|
export function Algod(token?: string, baseServer?: string, port?: number, headers?: {}): void;
|
|
2
3
|
export class Algod {
|
|
4
|
+
/** @deprecated v1 algod APIs are deprecated, please use the v2 client */
|
|
3
5
|
constructor(token?: string, baseServer?: string, port?: number, headers?: {});
|
|
4
6
|
/**
|
|
5
7
|
* status retrieves the StatusResponse from the running node
|
|
6
8
|
* @param headerObj, optional
|
|
7
9
|
* @returns {Promise<*>}
|
|
10
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
8
11
|
*/
|
|
9
12
|
status: (headerObj?: {}) => Promise<any>;
|
|
10
13
|
/**
|
|
11
14
|
* healthCheck returns an empty object iff the node is running
|
|
12
15
|
* @param headerObj, optional
|
|
13
16
|
* @returns {Promise<*>}
|
|
17
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
14
18
|
*/
|
|
15
19
|
healthCheck: (headerObj?: {}) => Promise<any>;
|
|
16
20
|
/**
|
|
@@ -19,6 +23,7 @@ export class Algod {
|
|
|
19
23
|
* @param roundNumber
|
|
20
24
|
* @param headerObj, optional
|
|
21
25
|
* @returns {Promise<*>}
|
|
26
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
22
27
|
*/
|
|
23
28
|
statusAfterBlock: (roundNumber: any, headerObj?: {}) => Promise<any>;
|
|
24
29
|
/**
|
|
@@ -27,18 +32,21 @@ export class Algod {
|
|
|
27
32
|
* @param maxTxns - number
|
|
28
33
|
* @param headerObj, optional
|
|
29
34
|
* @returns {Promise<*>}
|
|
35
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
30
36
|
*/
|
|
31
37
|
pendingTransactions: (maxTxns: any, headerObj?: {}) => Promise<any>;
|
|
32
38
|
/**
|
|
33
39
|
* versions retrieves the VersionResponse from the running node
|
|
34
40
|
* @param headerObj, optional
|
|
35
41
|
* @returns {Promise<*>}
|
|
42
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
36
43
|
*/
|
|
37
44
|
versions: (headerObj?: {}) => Promise<any>;
|
|
38
45
|
/**
|
|
39
46
|
* LedgerSupply gets the supply details for the specified node's Ledger
|
|
40
47
|
* @param headerObj, optional
|
|
41
48
|
* @returns {Promise<*>}
|
|
49
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
42
50
|
*/
|
|
43
51
|
ledgerSupply: (headerObj?: {}) => Promise<any>;
|
|
44
52
|
/**
|
|
@@ -49,6 +57,7 @@ export class Algod {
|
|
|
49
57
|
* @param maxTxns - number, optional
|
|
50
58
|
* @param headers, optional
|
|
51
59
|
* @returns {Promise<*>}
|
|
60
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
52
61
|
*/
|
|
53
62
|
transactionByAddress: (addr: any, first?: any, last?: any, maxTxns?: any, headerObj?: {}) => Promise<any>;
|
|
54
63
|
/**
|
|
@@ -60,6 +69,7 @@ export class Algod {
|
|
|
60
69
|
* @param maxTxns - number, optional
|
|
61
70
|
* @param headerObj, optional
|
|
62
71
|
* @returns {Promise<*>}
|
|
72
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
63
73
|
*/
|
|
64
74
|
transactionByAddressAndDate: (addr: any, fromDate: any, toDate: any, maxTxns?: any, headerObj?: {}) => Promise<any>;
|
|
65
75
|
/**
|
|
@@ -68,6 +78,7 @@ export class Algod {
|
|
|
68
78
|
* @param txid
|
|
69
79
|
* @param headerObj, optional
|
|
70
80
|
* @returns {Promise<*>}
|
|
81
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
71
82
|
*/
|
|
72
83
|
transactionById: (txid: any, headerObj?: {}) => Promise<any>;
|
|
73
84
|
/**
|
|
@@ -76,6 +87,7 @@ export class Algod {
|
|
|
76
87
|
* @param txid
|
|
77
88
|
* @param headerObj, optional
|
|
78
89
|
* @returns {Promise<*>}
|
|
90
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
79
91
|
*/
|
|
80
92
|
transactionInformation: (addr: any, txid: any, headerObj?: {}) => Promise<any>;
|
|
81
93
|
/**
|
|
@@ -83,6 +95,7 @@ export class Algod {
|
|
|
83
95
|
* @param txid
|
|
84
96
|
* @param headerObj, optional
|
|
85
97
|
* @returns {Promise<*>}
|
|
98
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
86
99
|
*/
|
|
87
100
|
pendingTransactionInformation: (txid: any, headerObj?: {}) => Promise<any>;
|
|
88
101
|
/**
|
|
@@ -90,6 +103,7 @@ export class Algod {
|
|
|
90
103
|
* @param addr - string
|
|
91
104
|
* @param headerObj, optional
|
|
92
105
|
* @returns {Promise<*>}
|
|
106
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
93
107
|
*/
|
|
94
108
|
accountInformation: (addr: any, headerObj?: {}) => Promise<any>;
|
|
95
109
|
/**
|
|
@@ -97,12 +111,14 @@ export class Algod {
|
|
|
97
111
|
* @param index - number
|
|
98
112
|
* @param headerObj, optional
|
|
99
113
|
* @returns {Promise<*>}
|
|
114
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
100
115
|
*/
|
|
101
116
|
assetInformation: (index: any, headerObj?: {}) => Promise<any>;
|
|
102
117
|
/**
|
|
103
118
|
* suggestedFee gets the recommended transaction fee from the node
|
|
104
119
|
* @param headerObj, optional
|
|
105
120
|
* @returns {Promise<*>}
|
|
121
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
106
122
|
*/
|
|
107
123
|
suggestedFee: (headerObj?: {}) => Promise<any>;
|
|
108
124
|
/**
|
|
@@ -110,6 +126,7 @@ export class Algod {
|
|
|
110
126
|
* @param txn - Uin8Array
|
|
111
127
|
* @param headerObj, optional
|
|
112
128
|
* @returns {Promise<*>}
|
|
129
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
113
130
|
*/
|
|
114
131
|
sendRawTransaction: (txn: any, headerObj?: {}) => Promise<any>;
|
|
115
132
|
/**
|
|
@@ -117,18 +134,21 @@ export class Algod {
|
|
|
117
134
|
* @param txn - Array of Uin8Array
|
|
118
135
|
* @param headerObj, optional
|
|
119
136
|
* @returns {Promise<*>}
|
|
137
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
120
138
|
*/
|
|
121
139
|
sendRawTransactions: (txns: any, headerObj?: {}) => Promise<any>;
|
|
122
140
|
/**
|
|
123
141
|
* getTransactionParams returns to common needed parameters for a new transaction
|
|
124
142
|
* @param headerObj, optional
|
|
125
143
|
* @returns {Promise<*>}
|
|
144
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
126
145
|
*/
|
|
127
146
|
getTransactionParams: (headerObj?: {}) => Promise<any>;
|
|
128
147
|
/**
|
|
129
148
|
* suggestParams returns to common needed parameters for a new transaction, in a format the transaction builder expects
|
|
130
149
|
* @param headerObj, optional
|
|
131
150
|
* @returns {Object}
|
|
151
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
132
152
|
*/
|
|
133
153
|
suggestParams: (headerObj?: {}) => any;
|
|
134
154
|
/**
|
|
@@ -136,6 +156,7 @@ export class Algod {
|
|
|
136
156
|
* @param roundNumber
|
|
137
157
|
* @param headerObj, optional
|
|
138
158
|
* @returns {Promise<*>}
|
|
159
|
+
* @deprecated v1 algod APIs are deprecated, please use the v2 client
|
|
139
160
|
*/
|
|
140
161
|
block: (roundNumber: any, headerObj?: {}) => Promise<any>;
|
|
141
162
|
}
|
|
@@ -9,6 +9,7 @@ import Dryrun from './dryrun';
|
|
|
9
9
|
import Genesis from './genesis';
|
|
10
10
|
import GetAssetByID from './getAssetByID';
|
|
11
11
|
import GetApplicationByID from './getApplicationByID';
|
|
12
|
+
import GetBlockHash from './getBlockHash';
|
|
12
13
|
import HealthCheck from './healthCheck';
|
|
13
14
|
import PendingTransactionInformation from './pendingTransactionInformation';
|
|
14
15
|
import PendingTransactions from './pendingTransactions';
|
|
@@ -158,6 +159,20 @@ export default class AlgodClient extends ServiceClient {
|
|
|
158
159
|
* @category GET
|
|
159
160
|
*/
|
|
160
161
|
block(roundNumber: number): Block;
|
|
162
|
+
/**
|
|
163
|
+
* Get the block hash for the block on the given round.
|
|
164
|
+
*
|
|
165
|
+
* #### Example
|
|
166
|
+
* ```typescript
|
|
167
|
+
* const roundNumber = 18038133;
|
|
168
|
+
* const block = await algodClient.getBlockHash(roundNumber).do();
|
|
169
|
+
* ```
|
|
170
|
+
*
|
|
171
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2blocksroundhash)
|
|
172
|
+
* @param roundNumber - The round number of the block to get.
|
|
173
|
+
* @category GET
|
|
174
|
+
*/
|
|
175
|
+
getBlockHash(roundNumber: number): GetBlockHash;
|
|
161
176
|
/**
|
|
162
177
|
* Returns the transaction information for a specific pending transaction.
|
|
163
178
|
*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import HTTPClient from '../../client';
|
|
3
|
+
import IntDecoding from '../../../types/intDecoding';
|
|
4
|
+
export default class GetBlockHash extends JSONRequest {
|
|
5
|
+
round: number;
|
|
6
|
+
constructor(c: HTTPClient, intDecoding: IntDecoding, roundNumber: number);
|
|
7
|
+
path(): string;
|
|
8
|
+
}
|
|
@@ -21,4 +21,9 @@ export default class LookupBlock extends JSONRequest {
|
|
|
21
21
|
* @returns `/v2/blocks/${round}`
|
|
22
22
|
*/
|
|
23
23
|
path(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Header only flag. When this is set to true, returned block does not contain the
|
|
26
|
+
* transactions.
|
|
27
|
+
*/
|
|
28
|
+
headerOnly(headerOnly: boolean): this;
|
|
24
29
|
}
|
|
@@ -38,7 +38,7 @@ export default class SearchAccounts extends JSONRequest {
|
|
|
38
38
|
* .do();
|
|
39
39
|
* ```
|
|
40
40
|
* @remarks
|
|
41
|
-
* If you are looking for accounts with the currency amount greater than 0, simply construct the query without `currencyGreaterThan` because it doesn't accept `-1`, and passing the `0` `currency-greater-than` value would exclude
|
|
41
|
+
* If you are looking for accounts with the currency amount greater than 0, simply construct the query without `currencyGreaterThan` because it doesn't accept `-1`, and passing the `0` `currency-greater-than` value would exclude accounts with a 0 amount.
|
|
42
42
|
*
|
|
43
43
|
* @param greater
|
|
44
44
|
* @category query
|