algosdk 1.13.1 → 1.15.0-beta.1
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 +6 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/src/client/client.js +16 -41
- package/dist/cjs/src/client/client.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/accountApplicationInformation.js +20 -0
- package/dist/cjs/src/client/v2/algod/accountApplicationInformation.js.map +1 -0
- package/dist/cjs/src/client/v2/algod/accountAssetInformation.js +20 -0
- package/dist/cjs/src/client/v2/algod/accountAssetInformation.js.map +1 -0
- package/dist/cjs/src/client/v2/algod/accountInformation.js +18 -0
- package/dist/cjs/src/client/v2/algod/accountInformation.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/algod.js +38 -0
- package/dist/cjs/src/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/models/types.js +98 -11
- package/dist/cjs/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/indexer.js +68 -0
- package/dist/cjs/src/client/v2/indexer/indexer.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js +110 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js +110 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js +5 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js +110 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js +110 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js +280 -15
- package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js +0 -18
- package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js +37 -1
- package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchAccounts.js +5 -0
- package/dist/cjs/src/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchForApplications.js +5 -0
- package/dist/cjs/src/client/v2/indexer/searchForApplications.js.map +1 -1
- package/dist/cjs/src/client/v2/jsonrequest.js +3 -0
- package/dist/cjs/src/client/v2/jsonrequest.js.map +1 -1
- package/dist/cjs/src/composer.js +5 -4
- package/dist/cjs/src/composer.js.map +1 -1
- package/dist/cjs/src/dryrun.js +1 -1
- package/dist/cjs/src/dryrun.js.map +1 -1
- package/dist/cjs/src/logic/langspec.json +456 -153
- package/dist/cjs/src/logicTemplates/dynamicfee.js +8 -0
- package/dist/cjs/src/logicTemplates/dynamicfee.js.map +1 -1
- package/dist/cjs/src/logicTemplates/htlc.js +5 -0
- package/dist/cjs/src/logicTemplates/htlc.js.map +1 -1
- package/dist/cjs/src/logicTemplates/limitorder.js +6 -0
- package/dist/cjs/src/logicTemplates/limitorder.js.map +1 -1
- package/dist/cjs/src/logicTemplates/periodicpayment.js +5 -0
- package/dist/cjs/src/logicTemplates/periodicpayment.js.map +1 -1
- package/dist/cjs/src/logicTemplates/split.js +6 -0
- package/dist/cjs/src/logicTemplates/split.js.map +1 -1
- package/dist/cjs/src/main.js +4 -1
- package/dist/cjs/src/main.js.map +1 -1
- package/dist/cjs/src/makeTxn.js +5 -4
- package/dist/cjs/src/makeTxn.js.map +1 -1
- package/dist/cjs/src/transaction.js +39 -7
- package/dist/cjs/src/transaction.js.map +1 -1
- package/dist/cjs/src/types/transactions/base.js +11 -2
- package/dist/cjs/src/types/transactions/base.js.map +1 -1
- package/dist/esm/src/client/client.js +16 -41
- package/dist/esm/src/client/client.js.map +1 -1
- package/dist/esm/src/client/v2/algod/accountApplicationInformation.js +14 -0
- package/dist/esm/src/client/v2/algod/accountApplicationInformation.js.map +1 -0
- package/dist/esm/src/client/v2/algod/accountAssetInformation.js +14 -0
- package/dist/esm/src/client/v2/algod/accountAssetInformation.js.map +1 -0
- package/dist/esm/src/client/v2/algod/accountInformation.js +18 -0
- package/dist/esm/src/client/v2/algod/accountInformation.js.map +1 -1
- package/dist/esm/src/client/v2/algod/algod.js +38 -0
- package/dist/esm/src/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/src/client/v2/algod/models/types.js +95 -10
- package/dist/esm/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/indexer.js +68 -0
- package/dist/esm/src/client/v2/indexer/indexer.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js +104 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js +104 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountByID.js +5 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js +104 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js +104 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js +280 -15
- package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js +0 -18
- package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAssetByID.js +37 -1
- package/dist/esm/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchAccounts.js +5 -0
- package/dist/esm/src/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchForApplications.js +5 -0
- package/dist/esm/src/client/v2/indexer/searchForApplications.js.map +1 -1
- package/dist/esm/src/client/v2/jsonrequest.js +3 -0
- package/dist/esm/src/client/v2/jsonrequest.js.map +1 -1
- package/dist/esm/src/composer.js +5 -4
- package/dist/esm/src/composer.js.map +1 -1
- package/dist/esm/src/dryrun.js +1 -1
- package/dist/esm/src/dryrun.js.map +1 -1
- package/dist/esm/src/logic/langspec.json +456 -153
- package/dist/esm/src/logicTemplates/dynamicfee.js +8 -0
- package/dist/esm/src/logicTemplates/dynamicfee.js.map +1 -1
- package/dist/esm/src/logicTemplates/htlc.js +5 -0
- package/dist/esm/src/logicTemplates/htlc.js.map +1 -1
- package/dist/esm/src/logicTemplates/limitorder.js +6 -0
- package/dist/esm/src/logicTemplates/limitorder.js.map +1 -1
- package/dist/esm/src/logicTemplates/periodicpayment.js +5 -0
- package/dist/esm/src/logicTemplates/periodicpayment.js.map +1 -1
- package/dist/esm/src/logicTemplates/split.js +6 -0
- package/dist/esm/src/logicTemplates/split.js.map +1 -1
- package/dist/esm/src/main.js +1 -0
- package/dist/esm/src/main.js.map +1 -1
- package/dist/esm/src/makeTxn.js +5 -4
- package/dist/esm/src/makeTxn.js.map +1 -1
- package/dist/esm/src/transaction.js +40 -8
- package/dist/esm/src/transaction.js.map +1 -1
- package/dist/esm/src/types/transactions/base.js +9 -1
- package/dist/esm/src/types/transactions/base.js.map +1 -1
- package/dist/types/src/client/client.d.ts +7 -7
- package/dist/types/src/client/v2/algod/accountApplicationInformation.d.ts +9 -0
- package/dist/types/src/client/v2/algod/accountAssetInformation.d.ts +9 -0
- package/dist/types/src/client/v2/algod/accountInformation.d.ts +15 -0
- package/dist/types/src/client/v2/algod/algod.d.ts +34 -0
- package/dist/types/src/client/v2/algod/models/types.d.ts +141 -17
- package/dist/types/src/client/v2/indexer/indexer.d.ts +60 -0
- package/dist/types/src/client/v2/indexer/lookupAccountAppLocalStates.d.ts +85 -0
- package/dist/types/src/client/v2/indexer/lookupAccountAssets.d.ts +85 -0
- package/dist/types/src/client/v2/indexer/lookupAccountByID.d.ts +1 -0
- package/dist/types/src/client/v2/indexer/lookupAccountCreatedApplications.d.ts +85 -0
- package/dist/types/src/client/v2/indexer/lookupAccountCreatedAssets.d.ts +85 -0
- package/dist/types/src/client/v2/indexer/lookupAccountTransactions.d.ts +280 -1
- package/dist/types/src/client/v2/indexer/lookupAssetBalances.d.ts +0 -15
- package/dist/types/src/client/v2/indexer/lookupAssetByID.d.ts +37 -0
- package/dist/types/src/client/v2/indexer/searchAccounts.d.ts +1 -0
- package/dist/types/src/client/v2/indexer/searchForApplications.d.ts +1 -0
- package/dist/types/src/client/v2/jsonrequest.d.ts +4 -0
- package/dist/types/src/composer.d.ts +2 -0
- package/dist/types/src/logicTemplates/dynamicfee.d.ts +8 -0
- package/dist/types/src/logicTemplates/htlc.d.ts +5 -0
- package/dist/types/src/logicTemplates/limitorder.d.ts +6 -0
- package/dist/types/src/logicTemplates/periodicpayment.d.ts +5 -0
- package/dist/types/src/logicTemplates/split.d.ts +6 -0
- package/dist/types/src/main.d.ts +1 -0
- package/dist/types/src/makeTxn.d.ts +41 -39
- package/dist/types/src/transaction.d.ts +3 -1
- package/dist/types/src/types/transactions/base.d.ts +10 -5
- package/dist/types/src/types/transactions/encoded.d.ts +4 -0
- package/dist/types/src/types/transactions/keyreg.d.ts +1 -1
- package/dist/types/src/types/utils.d.ts +7 -0
- package/package.json +3 -3
|
@@ -9,25 +9,304 @@ import IntDecoding from '../../../types/intDecoding';
|
|
|
9
9
|
export declare function base64StringFunnel(data: Uint8Array | string): string;
|
|
10
10
|
export default class LookupAccountTransactions extends JSONRequest {
|
|
11
11
|
private account;
|
|
12
|
+
/**
|
|
13
|
+
* Returns transactions relating to the given account.
|
|
14
|
+
*
|
|
15
|
+
* #### Example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
18
|
+
* const accountTxns = await indexerClient.lookupAccountTransactions(address).do();
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idtransactions)
|
|
22
|
+
* @param account - The address of the account.
|
|
23
|
+
*/
|
|
12
24
|
constructor(c: HTTPClient, intDecoding: IntDecoding, account: string);
|
|
25
|
+
/**
|
|
26
|
+
* @returns /v2/accounts/`${account}`/transactions
|
|
27
|
+
*/
|
|
13
28
|
path(): string;
|
|
14
29
|
/**
|
|
15
|
-
*
|
|
30
|
+
* Specifies a prefix which must be contained in the note field
|
|
31
|
+
*
|
|
32
|
+
* #### Example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const notePrefixBase64Encoded = "Y3JlYXRl";
|
|
35
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
36
|
+
* const accountTxns = await indexerClient
|
|
37
|
+
* .lookupAccountTransactions(address)
|
|
38
|
+
* .notePrefix(notePrefixBase64Encoded)
|
|
39
|
+
* .do();
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
16
42
|
* @param prefix - base64 string or uint8array
|
|
43
|
+
* @category query
|
|
17
44
|
*/
|
|
18
45
|
notePrefix(prefix: Uint8Array | string): this;
|
|
46
|
+
/**
|
|
47
|
+
* Type of transaction to filter with
|
|
48
|
+
*
|
|
49
|
+
* #### Example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
52
|
+
* const accountTxns = await indexerClient
|
|
53
|
+
* .lookupAccountTransactions(address)
|
|
54
|
+
* .txType("appl")
|
|
55
|
+
* .do();
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @param type - one of “pay”, “keyreg”, “acfg”, “axfer”, “afrz”, "appl"
|
|
59
|
+
* @category query
|
|
60
|
+
*/
|
|
19
61
|
txType(type: string): this;
|
|
62
|
+
/**
|
|
63
|
+
* Type of signature to filter with
|
|
64
|
+
* - sig: Standard
|
|
65
|
+
* - msig: MultiSig
|
|
66
|
+
* - lsig: LogicSig
|
|
67
|
+
*
|
|
68
|
+
* #### Example
|
|
69
|
+
* ```typescript
|
|
70
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
71
|
+
* const accountTxns = await indexerClient
|
|
72
|
+
* .lookupAccountTransactions(address)
|
|
73
|
+
* .sigType("msig")
|
|
74
|
+
* .do();
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @param type - one of “sig”, “msig”, “lsig”
|
|
78
|
+
* @category query
|
|
79
|
+
*/
|
|
20
80
|
sigType(type: string): this;
|
|
81
|
+
/**
|
|
82
|
+
* Lookup the specific transaction by ID
|
|
83
|
+
*
|
|
84
|
+
* #### Example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const txId = "MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA";
|
|
87
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
88
|
+
* const accountTxns = await indexerClient
|
|
89
|
+
* .lookupAccountTransactions(address)
|
|
90
|
+
* .txid(txId)
|
|
91
|
+
* .do();
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* @param txid
|
|
95
|
+
* @category query
|
|
96
|
+
*/
|
|
21
97
|
txid(txid: string): this;
|
|
98
|
+
/**
|
|
99
|
+
* Include results for the specified round
|
|
100
|
+
*
|
|
101
|
+
* #### Example
|
|
102
|
+
* ```typescript
|
|
103
|
+
* const targetBlock = 18309917;
|
|
104
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
105
|
+
* const accountTxns = await indexerClient
|
|
106
|
+
* .lookupAccountTransactions(address)
|
|
107
|
+
* .round(targetBlock)
|
|
108
|
+
* .do();
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* @param round
|
|
112
|
+
* @category query
|
|
113
|
+
*/
|
|
22
114
|
round(round: number): this;
|
|
115
|
+
/**
|
|
116
|
+
* Include results at or after the specified min-round
|
|
117
|
+
*
|
|
118
|
+
* #### Example
|
|
119
|
+
* ```typescript
|
|
120
|
+
* const minRound = 18309917;
|
|
121
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
122
|
+
* const accountTxns = await indexerClient
|
|
123
|
+
* .lookupAccountTransactions(address)
|
|
124
|
+
* .minRound(minRound)
|
|
125
|
+
* .do();
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* @param round
|
|
129
|
+
* @category query
|
|
130
|
+
*/
|
|
23
131
|
minRound(round: number): this;
|
|
132
|
+
/**
|
|
133
|
+
* Include results at or before the specified max-round
|
|
134
|
+
*
|
|
135
|
+
* #### Example
|
|
136
|
+
* ```typescript
|
|
137
|
+
* const maxRound = 18309917;
|
|
138
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
139
|
+
* const accountTxns = await indexerClient
|
|
140
|
+
* .lookupAccountTransactions(address)
|
|
141
|
+
* .maxRound(maxRound)
|
|
142
|
+
* .do();
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* @param round
|
|
146
|
+
* @category query
|
|
147
|
+
*/
|
|
24
148
|
maxRound(round: number): this;
|
|
149
|
+
/**
|
|
150
|
+
* Asset ID to filter with
|
|
151
|
+
*
|
|
152
|
+
* #### Example
|
|
153
|
+
* ```typescript
|
|
154
|
+
* const assetID = 163650;
|
|
155
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
156
|
+
* const accountTxns = await indexerClient
|
|
157
|
+
* .lookupAccountTransactions(address)
|
|
158
|
+
* .assetID(assetID)
|
|
159
|
+
* .do();
|
|
160
|
+
* ```
|
|
161
|
+
*
|
|
162
|
+
* @param id
|
|
163
|
+
* @category query
|
|
164
|
+
*/
|
|
25
165
|
assetID(id: number): this;
|
|
166
|
+
/**
|
|
167
|
+
* Maximum number of results to return
|
|
168
|
+
*
|
|
169
|
+
* #### Example
|
|
170
|
+
* ```typescript
|
|
171
|
+
* const limit = 25;
|
|
172
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
173
|
+
* const accountTxns = await indexerClient
|
|
174
|
+
* .lookupAccountTransactions(address)
|
|
175
|
+
* .limit(limit)
|
|
176
|
+
* .do();
|
|
177
|
+
* ```
|
|
178
|
+
*
|
|
179
|
+
* @param limit
|
|
180
|
+
* @category query
|
|
181
|
+
*/
|
|
26
182
|
limit(limit: number): this;
|
|
183
|
+
/**
|
|
184
|
+
* Include results before the given time
|
|
185
|
+
*
|
|
186
|
+
* #### Example
|
|
187
|
+
* ```typescript
|
|
188
|
+
* const beforeTime = "2022-02-02T20:20:22.02Z";
|
|
189
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
190
|
+
* const accountTxns = await indexerClient
|
|
191
|
+
* .lookupAccountTransactions(address)
|
|
192
|
+
* .beforeTime(beforeTime)
|
|
193
|
+
* .do();
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* @param before - rfc3339 string
|
|
197
|
+
* @category query
|
|
198
|
+
*/
|
|
27
199
|
beforeTime(before: string): this;
|
|
200
|
+
/**
|
|
201
|
+
* Include results after the given time
|
|
202
|
+
*
|
|
203
|
+
* #### Example
|
|
204
|
+
* ```typescript
|
|
205
|
+
* const afterTime = "2022-10-21T00:00:11.55Z";
|
|
206
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
207
|
+
* const accountTxns = await indexerClient
|
|
208
|
+
* .lookupAccountTransactions(address)
|
|
209
|
+
* .afterTime(afterTime)
|
|
210
|
+
* .do();
|
|
211
|
+
* ```
|
|
212
|
+
*
|
|
213
|
+
* @param after - rfc3339 string
|
|
214
|
+
* @category query
|
|
215
|
+
*/
|
|
28
216
|
afterTime(after: string): this;
|
|
217
|
+
/**
|
|
218
|
+
* Filtered results should have an amount greater than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
|
|
219
|
+
*
|
|
220
|
+
* #### Example 1
|
|
221
|
+
* ```typescript
|
|
222
|
+
* const minBalance = 300000;
|
|
223
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
224
|
+
* const accountTxns = await indexerClient
|
|
225
|
+
* .lookupAccountTransactions(address)
|
|
226
|
+
* .currencyGreaterThan(minBalance - 1)
|
|
227
|
+
* .do();
|
|
228
|
+
* ```
|
|
229
|
+
*
|
|
230
|
+
* #### Example 2
|
|
231
|
+
* ```typescript
|
|
232
|
+
* const assetID = 163650;
|
|
233
|
+
* const minBalance = 300000;
|
|
234
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
235
|
+
* const accountTxns = await indexerClient
|
|
236
|
+
* .lookupAccountTransactions(address)
|
|
237
|
+
* .assetID(assetID)
|
|
238
|
+
* .currencyGreaterThan(minBalance - 1)
|
|
239
|
+
* .do();
|
|
240
|
+
* ```
|
|
241
|
+
* @remarks
|
|
242
|
+
* If you are looking for transactions 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 transactions with a 0 amount.
|
|
243
|
+
*
|
|
244
|
+
* @param greater
|
|
245
|
+
* @category query
|
|
246
|
+
*/
|
|
29
247
|
currencyGreaterThan(greater: number): this;
|
|
248
|
+
/**
|
|
249
|
+
* Filtered results should have an amount less than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units
|
|
250
|
+
*
|
|
251
|
+
* #### Example 1
|
|
252
|
+
* ```typescript
|
|
253
|
+
* const maxBalance = 500000;
|
|
254
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
255
|
+
* const accountTxns = await indexerClient
|
|
256
|
+
* .lookupAccountTransactions(address)
|
|
257
|
+
* .currencyLessThan(maxBalance + 1)
|
|
258
|
+
* .do();
|
|
259
|
+
* ```
|
|
260
|
+
*
|
|
261
|
+
* #### Example 2
|
|
262
|
+
* ```typescript
|
|
263
|
+
* const assetID = 163650;
|
|
264
|
+
* const maxBalance = 500000;
|
|
265
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
266
|
+
* const accountTxns = await indexerClient
|
|
267
|
+
* .lookupAccountTransactions(address)
|
|
268
|
+
* .assetID(assetID)
|
|
269
|
+
* .currencyLessThan(maxBalance + 1)
|
|
270
|
+
* .do();
|
|
271
|
+
* ```
|
|
272
|
+
*
|
|
273
|
+
* @param lesser
|
|
274
|
+
* @category query
|
|
275
|
+
*/
|
|
30
276
|
currencyLessThan(lesser: number): this;
|
|
277
|
+
/**
|
|
278
|
+
* The next page of results. Use the next token provided by the previous results.
|
|
279
|
+
*
|
|
280
|
+
* #### Example
|
|
281
|
+
* ```typescript
|
|
282
|
+
* const limit = 25;
|
|
283
|
+
* const nextToken = "the next token returned in the previous query response";
|
|
284
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
285
|
+
* const accountTxns = await indexerClient
|
|
286
|
+
* .lookupAccountTransactions(address)
|
|
287
|
+
* .limit(limit)
|
|
288
|
+
* .nextToken(nextToken)
|
|
289
|
+
* .do();
|
|
290
|
+
* ```
|
|
291
|
+
*
|
|
292
|
+
* @param nextToken
|
|
293
|
+
* @category query
|
|
294
|
+
*/
|
|
31
295
|
nextToken(nextToken: string): this;
|
|
296
|
+
/**
|
|
297
|
+
* Include results which include the rekey-to field
|
|
298
|
+
*
|
|
299
|
+
* #### Example
|
|
300
|
+
* ```typescript
|
|
301
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
302
|
+
* const accountTxns = await indexerClient
|
|
303
|
+
* .lookupAccountTransactions(address)
|
|
304
|
+
* .rekeyTo(false)
|
|
305
|
+
* .do();
|
|
306
|
+
* ```
|
|
307
|
+
*
|
|
308
|
+
* @param rekeyTo
|
|
309
|
+
* @category query
|
|
310
|
+
*/
|
|
32
311
|
rekeyTo(rekeyTo: boolean): this;
|
|
33
312
|
}
|
|
@@ -33,21 +33,6 @@ export default class LookupAssetBalances extends JSONRequest {
|
|
|
33
33
|
* @param limit - maximum number of results to return.
|
|
34
34
|
*/
|
|
35
35
|
limit(limit: number): this;
|
|
36
|
-
/**
|
|
37
|
-
* Specify round to filter with.
|
|
38
|
-
*
|
|
39
|
-
* #### Example
|
|
40
|
-
* ```typescript
|
|
41
|
-
* const assetId = 163650;
|
|
42
|
-
* const targetBlock = 18309917;
|
|
43
|
-
* const assetBalances = await indexerClient
|
|
44
|
-
* .lookupAssetBalances(assetId)
|
|
45
|
-
* .round(targetBlock)
|
|
46
|
-
* .do();
|
|
47
|
-
* ```
|
|
48
|
-
* @param round
|
|
49
|
-
*/
|
|
50
|
-
round(round: number): this;
|
|
51
36
|
/**
|
|
52
37
|
* Filtered results should have an asset balance greater than this value.
|
|
53
38
|
*
|
|
@@ -3,7 +3,44 @@ import HTTPClient from '../../client';
|
|
|
3
3
|
import IntDecoding from '../../../types/intDecoding';
|
|
4
4
|
export default class LookupAssetByID extends JSONRequest {
|
|
5
5
|
private index;
|
|
6
|
+
/**
|
|
7
|
+
* Returns asset information of the queried asset.
|
|
8
|
+
*
|
|
9
|
+
* #### Example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const assetId = 163650;
|
|
12
|
+
* const assetInfo = await indexerClient.lookupAssetByID(assetId).do();
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-id)
|
|
16
|
+
* @param index - The asset ID to look up.
|
|
17
|
+
*/
|
|
6
18
|
constructor(c: HTTPClient, intDecoding: IntDecoding, index: number);
|
|
19
|
+
/**
|
|
20
|
+
* @returns `/v2/assets/${index}`
|
|
21
|
+
*/
|
|
7
22
|
path(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
25
|
+
*
|
|
26
|
+
* #### Example 1
|
|
27
|
+
* ```typescript
|
|
28
|
+
* const assetInfo = await indexerClient
|
|
29
|
+
* .lookupAssetByID(assetId)
|
|
30
|
+
* .includeAll(false)
|
|
31
|
+
* .do();
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* #### Example 2
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const assetInfo = await indexerClient
|
|
37
|
+
* .lookupAssetByID(assetId)
|
|
38
|
+
* .includeAll()
|
|
39
|
+
* .do();
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @param value - default true when called without passing a value
|
|
43
|
+
* @category query
|
|
44
|
+
*/
|
|
8
45
|
includeAll(value?: boolean): this;
|
|
9
46
|
}
|
|
@@ -2,6 +2,7 @@ import JSONRequest from '../jsonrequest';
|
|
|
2
2
|
export default class SearchForApplications extends JSONRequest {
|
|
3
3
|
path(): string;
|
|
4
4
|
index(index: number): this;
|
|
5
|
+
creator(index: number): this;
|
|
5
6
|
nextToken(next: string): this;
|
|
6
7
|
limit(limit: number): this;
|
|
7
8
|
includeAll(value?: boolean): this;
|
|
@@ -20,6 +20,7 @@ export default abstract class JSONRequest<Data = Record<string, any>, Body = Dat
|
|
|
20
20
|
constructor(client: HTTPClient, intDecoding?: IntDecoding);
|
|
21
21
|
/**
|
|
22
22
|
* @returns The path of this request.
|
|
23
|
+
* @category JSONRequest
|
|
23
24
|
*/
|
|
24
25
|
abstract path(): string;
|
|
25
26
|
/**
|
|
@@ -28,12 +29,14 @@ export default abstract class JSONRequest<Data = Record<string, any>, Body = Dat
|
|
|
28
29
|
* Use this method to change and restructure response
|
|
29
30
|
* data as needed after receiving it from the `do()` method.
|
|
30
31
|
* @param body - Response body received
|
|
32
|
+
* @category JSONRequest
|
|
31
33
|
*/
|
|
32
34
|
prepare(body: Body): Data;
|
|
33
35
|
/**
|
|
34
36
|
* Execute the request.
|
|
35
37
|
* @param headers - Additional headers to send in the request. Optional.
|
|
36
38
|
* @returns A promise which resolves to the response data.
|
|
39
|
+
* @category JSONRequest
|
|
37
40
|
*/
|
|
38
41
|
do(headers?: Record<string, any>): Promise<Data>;
|
|
39
42
|
/**
|
|
@@ -50,6 +53,7 @@ export default abstract class JSONRequest<Data = Record<string, any>, Body = Dat
|
|
|
50
53
|
*
|
|
51
54
|
* @param method - The method to use when parsing the
|
|
52
55
|
* response for this request. Must be one of "default", "safe", "mixed", or "bigint".
|
|
56
|
+
* @category JSONRequest
|
|
53
57
|
*/
|
|
54
58
|
setIntDecoding(method: IntDecoding): this;
|
|
55
59
|
}
|
|
@@ -19,6 +19,8 @@ export interface ABIResult {
|
|
|
19
19
|
returnValue?: ABIValue;
|
|
20
20
|
/** If the SDK was unable to decode a return value, the error will be here. */
|
|
21
21
|
decodeError?: Error;
|
|
22
|
+
/** The pending transaction information from the method transaction */
|
|
23
|
+
txInfo?: Record<string, any>;
|
|
22
24
|
}
|
|
23
25
|
export declare enum AtomicTransactionComposerStatus {
|
|
24
26
|
/** The atomic group is still under construction. */
|
|
@@ -4,6 +4,8 @@ export class DynamicFee {
|
|
|
4
4
|
* specifying the fee. The fee will be determined at the moment of
|
|
5
5
|
* transfer.
|
|
6
6
|
*
|
|
7
|
+
* @deprecated This feature will be removed in v2.
|
|
8
|
+
*
|
|
7
9
|
* Constructor Parameters:
|
|
8
10
|
* @param {string} receiver: address to receive the assets
|
|
9
11
|
* @param {int} amount: amount of assets to transfer
|
|
@@ -31,6 +33,9 @@ export class DynamicFee {
|
|
|
31
33
|
* getDynamicFeeTransactions creates and signs the secondary dynamic fee transaction, updates
|
|
32
34
|
* transaction fields, and signs as the fee payer; it returns both
|
|
33
35
|
* transactions as bytes suitable for sendRaw.
|
|
36
|
+
*
|
|
37
|
+
* @deprecated This feature will be removed in v2.
|
|
38
|
+
*
|
|
34
39
|
* Parameters:
|
|
35
40
|
* @param {dict} txn - main transaction from payer's signDynamicFee output (a dict of constructor arguments, NOT a transaction.Transaction)
|
|
36
41
|
* @param {LogicSig} lsig - the signed logic received from the payer's signDynamicFee output
|
|
@@ -43,6 +48,9 @@ export function getDynamicFeeTransactions(txn: any, lsig: any, privateKey: Uint8
|
|
|
43
48
|
/**
|
|
44
49
|
* signDynamicFee returns the main transaction and signed logic needed to complete the transfer.
|
|
45
50
|
* These should be sent to the fee payer, who can use GetDynamicFeeTransactions
|
|
51
|
+
*
|
|
52
|
+
* @deprecated This feature will be removed in v2.
|
|
53
|
+
*
|
|
46
54
|
* @param {Uint8Array} contract: the bytearray representing the contract
|
|
47
55
|
* @param {Uint8Array} secretKey: the secret key for building the logic sig
|
|
48
56
|
* @param {string} genesisHash: the genesisHash to use for the txn
|
|
@@ -10,6 +10,8 @@ export class HTLC {
|
|
|
10
10
|
* 2. To owner if txn.FirstValid > expiry_round
|
|
11
11
|
* ...
|
|
12
12
|
*
|
|
13
|
+
* @deprecated This feature will be removed in v2.
|
|
14
|
+
*
|
|
13
15
|
*Parameters
|
|
14
16
|
*----------
|
|
15
17
|
* @param {string} owner: an address that can receive the asset after the expiry round
|
|
@@ -36,6 +38,9 @@ export class HTLC {
|
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
40
|
* signTransactionWithHTLCUnlock accepts a transaction, such as a payment, and builds the HTLC-unlocking signature around that transaction
|
|
41
|
+
*
|
|
42
|
+
* @deprecated This feature will be removed in v2.
|
|
43
|
+
*
|
|
39
44
|
* @param {Uint8Array} contract : byte representation of the HTLC
|
|
40
45
|
* @param {Object} txn dictionary containing constructor arguments for a transaction
|
|
41
46
|
* @param {string} preImageAsBase64 : preimage of the hash as base64 string
|
|
@@ -19,6 +19,9 @@ export class LimitOrder {
|
|
|
19
19
|
*
|
|
20
20
|
* close-out case:
|
|
21
21
|
* txn alone, close out value after timeout
|
|
22
|
+
*
|
|
23
|
+
* @deprecated This class will be removed in v2.
|
|
24
|
+
*
|
|
22
25
|
* Constructor Parameters:
|
|
23
26
|
* @param {string} owner: the address to refund funds to on timeout
|
|
24
27
|
* @param {int} assetid: the ID of the transferred asset
|
|
@@ -47,6 +50,9 @@ export class LimitOrder {
|
|
|
47
50
|
}
|
|
48
51
|
/**
|
|
49
52
|
* returns a group transactions array which transfer funds according to the contract's ratio
|
|
53
|
+
*
|
|
54
|
+
* @deprecated This feature will be removed in v2.
|
|
55
|
+
*
|
|
50
56
|
* @param {Uint8Array} contract: byteform of the contract from the payer
|
|
51
57
|
* @param {int} assetAmount: the amount of assets to be sent
|
|
52
58
|
* @param {int} microAlgoAmount: number of microAlgos to transfer
|
|
@@ -10,6 +10,8 @@ export class PeriodicPayment {
|
|
|
10
10
|
* After expiryRound, all remaining funds in the escrow
|
|
11
11
|
* are available to receiver.
|
|
12
12
|
*
|
|
13
|
+
* @deprecated This class will be removed in v2.
|
|
14
|
+
*
|
|
13
15
|
* Constructor Parameters:
|
|
14
16
|
* @param {string} receiver: address which is authorized to receive withdrawals
|
|
15
17
|
* @param {int} amount: the amount to send each period
|
|
@@ -43,6 +45,9 @@ export class PeriodicPayment {
|
|
|
43
45
|
}
|
|
44
46
|
/**
|
|
45
47
|
* getPeriodicPaymentWithdrawalTransaction returns a signed transaction extracting funds form the contract
|
|
48
|
+
*
|
|
49
|
+
* @deprecated This feature will be removed in v2.
|
|
50
|
+
*
|
|
46
51
|
* @param {Uint8Array} contract: the bytearray defining the contract, received from the payer
|
|
47
52
|
* @param {int} fee: the fee per byte for the transaction
|
|
48
53
|
* @param {int} firstValid: the first round on which the txn will be valid
|
|
@@ -13,6 +13,9 @@ export class Split {
|
|
|
13
13
|
* (CloseRemainderTo must be zero.)
|
|
14
14
|
*
|
|
15
15
|
* After expiryRound passes, all funds can be refunded to owner.
|
|
16
|
+
*
|
|
17
|
+
* @deprecated This feature will be removed in v2.
|
|
18
|
+
*
|
|
16
19
|
* Constructor Parameters:
|
|
17
20
|
* @param {string} owner: the address to refund funds to on timeout
|
|
18
21
|
* @param {string} receiverOne: the first recipient in the split account
|
|
@@ -40,6 +43,9 @@ export class Split {
|
|
|
40
43
|
}
|
|
41
44
|
/**
|
|
42
45
|
* returns a group transactions array which transfer funds according to the contract's ratio
|
|
46
|
+
*
|
|
47
|
+
* @deprecated This feature will be removed in v2.
|
|
48
|
+
*
|
|
43
49
|
* @param {Uint8Array} contract: bytes representing the contract in question
|
|
44
50
|
* @param {int} amount: the amount to be transferred
|
|
45
51
|
* @param {int} firstRound: the first round on which the transaction group will be valid
|
package/dist/types/src/main.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export { default as Indexer } from './client/v2/indexer/indexer';
|
|
|
69
69
|
export { BaseHTTPClient, BaseHTTPClientResponse, BaseHTTPClientError, } from './client/baseHTTPClient';
|
|
70
70
|
export { waitForConfirmation } from './wait';
|
|
71
71
|
export { isValidAddress, encodeAddress, decodeAddress, getApplicationAddress, } from './encoding/address';
|
|
72
|
+
export { bytesToBigInt, bigIntToBytes } from './encoding/bigint';
|
|
72
73
|
export { encodeUint64, decodeUint64 } from './encoding/uint64';
|
|
73
74
|
export { default as generateAccount } from './account';
|
|
74
75
|
export * as modelsv2 from './client/v2/algod/models/types';
|