algosdk 1.14.0 → 1.16.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/kmd.js +1 -1
- package/dist/cjs/src/client/kmd.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 +73 -8
- 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 +135 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js +136 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js +80 -2
- package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js +136 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js +137 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js +30 -25
- package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupApplicationLogs.js +112 -6
- package/dist/cjs/src/client/v2/indexer/lookupApplicationLogs.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupApplications.js +40 -1
- package/dist/cjs/src/client/v2/indexer/lookupApplications.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js +29 -24
- package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js +2 -0
- package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAssetTransactions.js +298 -18
- package/dist/cjs/src/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupBlock.js +16 -0
- package/dist/cjs/src/client/v2/indexer/lookupBlock.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupTransactionByID.js +16 -0
- package/dist/cjs/src/client/v2/indexer/lookupTransactionByID.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/makeHealthCheck.js +15 -0
- package/dist/cjs/src/client/v2/indexer/makeHealthCheck.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchAccounts.js +214 -9
- package/dist/cjs/src/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchForApplications.js +105 -4
- package/dist/cjs/src/client/v2/indexer/searchForApplications.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchForAssets.js +132 -7
- package/dist/cjs/src/client/v2/indexer/searchForAssets.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchForTransactions.js +328 -19
- package/dist/cjs/src/client/v2/indexer/searchForTransactions.js.map +1 -1
- package/dist/cjs/src/dryrun.js +200 -3
- package/dist/cjs/src/dryrun.js.map +1 -1
- package/dist/esm/src/client/kmd.js +1 -1
- package/dist/esm/src/client/kmd.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 +70 -7
- 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 +129 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js +130 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountByID.js +80 -2
- package/dist/esm/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js +130 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js +131 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js +30 -25
- package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupApplicationLogs.js +112 -6
- package/dist/esm/src/client/v2/indexer/lookupApplicationLogs.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupApplications.js +40 -1
- package/dist/esm/src/client/v2/indexer/lookupApplications.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js +29 -24
- package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAssetByID.js +2 -0
- package/dist/esm/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAssetTransactions.js +298 -18
- package/dist/esm/src/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupBlock.js +16 -0
- package/dist/esm/src/client/v2/indexer/lookupBlock.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupTransactionByID.js +16 -0
- package/dist/esm/src/client/v2/indexer/lookupTransactionByID.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/makeHealthCheck.js +15 -0
- package/dist/esm/src/client/v2/indexer/makeHealthCheck.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchAccounts.js +214 -9
- package/dist/esm/src/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchForApplications.js +105 -4
- package/dist/esm/src/client/v2/indexer/searchForApplications.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchForAssets.js +132 -7
- package/dist/esm/src/client/v2/indexer/searchForAssets.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchForTransactions.js +328 -19
- package/dist/esm/src/client/v2/indexer/searchForTransactions.js.map +1 -1
- package/dist/esm/src/dryrun.js +198 -2
- package/dist/esm/src/dryrun.js.map +1 -1
- package/dist/types/src/client/kmd.d.ts +2 -2
- 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 +95 -13
- package/dist/types/src/client/v2/indexer/indexer.d.ts +60 -0
- package/dist/types/src/client/v2/indexer/lookupAccountAppLocalStates.d.ts +110 -0
- package/dist/types/src/client/v2/indexer/lookupAccountAssets.d.ts +111 -0
- package/dist/types/src/client/v2/indexer/lookupAccountByID.d.ts +77 -0
- package/dist/types/src/client/v2/indexer/lookupAccountCreatedApplications.d.ts +111 -0
- package/dist/types/src/client/v2/indexer/lookupAccountCreatedAssets.d.ts +112 -0
- package/dist/types/src/client/v2/indexer/lookupAccountTransactions.d.ts +30 -25
- package/dist/types/src/client/v2/indexer/lookupApplicationLogs.d.ts +112 -6
- package/dist/types/src/client/v2/indexer/lookupApplications.d.ts +40 -0
- package/dist/types/src/client/v2/indexer/lookupAssetBalances.d.ts +29 -21
- package/dist/types/src/client/v2/indexer/lookupAssetByID.d.ts +2 -0
- package/dist/types/src/client/v2/indexer/lookupAssetTransactions.d.ts +298 -1
- package/dist/types/src/client/v2/indexer/lookupBlock.d.ts +16 -0
- package/dist/types/src/client/v2/indexer/lookupTransactionByID.d.ts +16 -0
- package/dist/types/src/client/v2/indexer/makeHealthCheck.d.ts +15 -0
- package/dist/types/src/client/v2/indexer/searchAccounts.d.ts +211 -0
- package/dist/types/src/client/v2/indexer/searchForApplications.d.ts +102 -0
- package/dist/types/src/client/v2/indexer/searchForAssets.d.ts +132 -0
- package/dist/types/src/client/v2/indexer/searchForTransactions.d.ts +328 -1
- package/dist/types/src/dryrun.d.ts +81 -1
- package/package.json +4 -3
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
export default class LookupAccountAppLocalStates extends JSONRequest {
|
|
3
|
+
/**
|
|
4
|
+
* Returns application local state about the given account.
|
|
5
|
+
*
|
|
6
|
+
* #### Example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
9
|
+
* const accountAppLocalStates = await indexerClient.lookupAccountAppLocalStates(address).do();
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idapps-local-state)
|
|
13
|
+
* @param account - The address of the account to look up.
|
|
14
|
+
* @category GET
|
|
15
|
+
*/
|
|
16
|
+
constructor(c, intDecoding, account) {
|
|
17
|
+
super(c, intDecoding);
|
|
18
|
+
this.account = account;
|
|
19
|
+
this.account = account;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns `/v2/accounts/${account}/apps-local-state`
|
|
23
|
+
*/
|
|
24
|
+
path() {
|
|
25
|
+
return `/v2/accounts/${this.account}/apps-local-state`;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Add a limit for filter.
|
|
29
|
+
*
|
|
30
|
+
* #### Example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
33
|
+
* const maxResults = 20;
|
|
34
|
+
* const accountAssets = await indexerClient
|
|
35
|
+
* .lookupAccountAppLocalStates(address)
|
|
36
|
+
* .limit(maxResults)
|
|
37
|
+
* .do();
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @param limit - maximum number of results to return.
|
|
41
|
+
* @category query
|
|
42
|
+
*/
|
|
43
|
+
limit(limit) {
|
|
44
|
+
this.query.limit = limit;
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Specify round to filter with.
|
|
49
|
+
*
|
|
50
|
+
* #### Example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
53
|
+
* const targetBlock = 18309917;
|
|
54
|
+
* const accountAssets = await indexerClient
|
|
55
|
+
* .lookupAccountAppLocalStates(address)
|
|
56
|
+
* .round(targetBlock)
|
|
57
|
+
* .do();
|
|
58
|
+
* ```
|
|
59
|
+
* @param round
|
|
60
|
+
* @category query
|
|
61
|
+
*/
|
|
62
|
+
round(round) {
|
|
63
|
+
this.query.round = round;
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Specify the next page of results.
|
|
68
|
+
*
|
|
69
|
+
* #### Example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
72
|
+
* const maxResults = 20;
|
|
73
|
+
*
|
|
74
|
+
* const accountAssetsPage1 = await indexerClient
|
|
75
|
+
* .lookupAccountAppLocalStates(address)
|
|
76
|
+
* .limit(maxResults)
|
|
77
|
+
* .do();
|
|
78
|
+
*
|
|
79
|
+
* const accountAssetsPage2 = await indexerClient
|
|
80
|
+
* .lookupAccountAppLocalStates(address)
|
|
81
|
+
* .limit(maxResults)
|
|
82
|
+
* .next(accountAssetsPage1["next-token"])
|
|
83
|
+
* .do();
|
|
84
|
+
* ```
|
|
85
|
+
* @param nextToken - provided by the previous results.
|
|
86
|
+
*/
|
|
87
|
+
nextToken(nextToken) {
|
|
88
|
+
this.query.next = nextToken;
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
93
|
+
*
|
|
94
|
+
* #### Example
|
|
95
|
+
* ```typescript
|
|
96
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
97
|
+
* const accountAssets = await indexerClient
|
|
98
|
+
* .lookupAccountAppLocalStates(address)
|
|
99
|
+
* .includeAll(false)
|
|
100
|
+
* .do();
|
|
101
|
+
* ```
|
|
102
|
+
* @param value
|
|
103
|
+
* @category query
|
|
104
|
+
*/
|
|
105
|
+
includeAll(value = true) {
|
|
106
|
+
this.query['include-all'] = value;
|
|
107
|
+
return this;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Specify an applicationID to search for.
|
|
111
|
+
*
|
|
112
|
+
* #### Example
|
|
113
|
+
* ```typescript
|
|
114
|
+
* const applicationID = 163650;
|
|
115
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
116
|
+
* const accountApplications = await indexerClient
|
|
117
|
+
* .lookupAccountAppLocalStates(address)
|
|
118
|
+
* .applicationID(applicationID)
|
|
119
|
+
* .do();
|
|
120
|
+
* ```
|
|
121
|
+
* @param index - the applicationID
|
|
122
|
+
* @category query
|
|
123
|
+
*/
|
|
124
|
+
applicationID(index) {
|
|
125
|
+
this.query['application-id'] = index;
|
|
126
|
+
return this;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=lookupAccountAppLocalStates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookupAccountAppLocalStates.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAccountAppLocalStates.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,WAAW;IAClE;;;;;;;;;;;;OAYG;IACH,YACE,CAAa,EACb,WAAwB,EAChB,OAAe;QAEvB,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAFd,YAAO,GAAP,OAAO,CAAQ;QAGvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,OAAO,gBAAgB,IAAI,CAAC,OAAO,mBAAmB,CAAC;IACzD,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,SAAS,CAAC,SAAiB;QACzB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,KAAK,GAAG,IAAI;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,KAAa;QACzB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
export default class LookupAccountAssets extends JSONRequest {
|
|
3
|
+
/**
|
|
4
|
+
* Returns asset about the given account.
|
|
5
|
+
*
|
|
6
|
+
* #### Example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
9
|
+
* const accountAssets = await indexerClient.lookupAccountAssets(address).do();
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idassets)
|
|
13
|
+
* @param account - The address of the account to look up.
|
|
14
|
+
* @category GET
|
|
15
|
+
*/
|
|
16
|
+
constructor(c, intDecoding, account) {
|
|
17
|
+
super(c, intDecoding);
|
|
18
|
+
this.account = account;
|
|
19
|
+
this.account = account;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns `/v2/accounts/${account}/assets`
|
|
23
|
+
*/
|
|
24
|
+
path() {
|
|
25
|
+
return `/v2/accounts/${this.account}/assets`;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Add a limit for filter.
|
|
29
|
+
*
|
|
30
|
+
* #### Example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
33
|
+
* const maxResults = 20;
|
|
34
|
+
* const accountAssets = await indexerClient
|
|
35
|
+
* .lookupAccountAssets(address)
|
|
36
|
+
* .limit(maxResults)
|
|
37
|
+
* .do();
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @param limit - maximum number of results to return.
|
|
41
|
+
* @category query
|
|
42
|
+
*/
|
|
43
|
+
limit(limit) {
|
|
44
|
+
this.query.limit = limit;
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Specify round to filter with.
|
|
49
|
+
*
|
|
50
|
+
* #### Example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
53
|
+
* const targetBlock = 18309917;
|
|
54
|
+
* const accountAssets = await indexerClient
|
|
55
|
+
* .lookupAccountAssets(address)
|
|
56
|
+
* .round(targetBlock)
|
|
57
|
+
* .do();
|
|
58
|
+
* ```
|
|
59
|
+
* @param round
|
|
60
|
+
* @category query
|
|
61
|
+
*/
|
|
62
|
+
round(round) {
|
|
63
|
+
this.query.round = round;
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Specify the next page of results.
|
|
68
|
+
*
|
|
69
|
+
* #### Example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
72
|
+
* const maxResults = 20;
|
|
73
|
+
*
|
|
74
|
+
* const accountAssetsPage1 = await indexerClient
|
|
75
|
+
* .lookupAccountAssets(address)
|
|
76
|
+
* .limit(maxResults)
|
|
77
|
+
* .do();
|
|
78
|
+
*
|
|
79
|
+
* const accountAssetsPage2 = await indexerClient
|
|
80
|
+
* .lookupAccountAssets(address)
|
|
81
|
+
* .limit(maxResults)
|
|
82
|
+
* .next(accountAssetsPage1["next-token"])
|
|
83
|
+
* .do();
|
|
84
|
+
* ```
|
|
85
|
+
* @param nextToken - provided by the previous results.
|
|
86
|
+
* @category query
|
|
87
|
+
*/
|
|
88
|
+
nextToken(nextToken) {
|
|
89
|
+
this.query.next = nextToken;
|
|
90
|
+
return this;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
94
|
+
*
|
|
95
|
+
* #### Example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
98
|
+
* const accountAssets = await indexerClient
|
|
99
|
+
* .lookupAccountAssets(address)
|
|
100
|
+
* .includeAll(false)
|
|
101
|
+
* .do();
|
|
102
|
+
* ```
|
|
103
|
+
* @param value
|
|
104
|
+
* @category query
|
|
105
|
+
*/
|
|
106
|
+
includeAll(value = true) {
|
|
107
|
+
this.query['include-all'] = value;
|
|
108
|
+
return this;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Specify an assetID to search for.
|
|
112
|
+
*
|
|
113
|
+
* #### Example
|
|
114
|
+
* ```typescript
|
|
115
|
+
* const assetId = 163650;
|
|
116
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
117
|
+
* const assetAssets = await indexerClient
|
|
118
|
+
* .lookupAccountAssets(address)
|
|
119
|
+
* .assetId(assetId)
|
|
120
|
+
* .do();
|
|
121
|
+
* ```
|
|
122
|
+
* @param index - the assetID
|
|
123
|
+
* @category query
|
|
124
|
+
*/
|
|
125
|
+
assetId(index) {
|
|
126
|
+
this.query['asset-id'] = index;
|
|
127
|
+
return this;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=lookupAccountAssets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookupAccountAssets.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAccountAssets.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D;;;;;;;;;;;;OAYG;IACH,YACE,CAAa,EACb,WAAwB,EAChB,OAAe;QAEvB,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAFd,YAAO,GAAP,OAAO,CAAQ;QAGvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,OAAO,gBAAgB,IAAI,CAAC,OAAO,SAAS,CAAC;IAC/C,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CAAC,SAAiB;QACzB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,KAAK,GAAG,IAAI;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,KAAa;QACnB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -1,22 +1,100 @@
|
|
|
1
1
|
import JSONRequest from '../jsonrequest';
|
|
2
2
|
export default class LookupAccountByID extends JSONRequest {
|
|
3
|
+
/**
|
|
4
|
+
* Returns information about the given account.
|
|
5
|
+
*
|
|
6
|
+
* #### Example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
9
|
+
* const accountInfo = await indexerClient.lookupAccountByID(address).do();
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
|
|
13
|
+
* @param account - The address of the account to look up.
|
|
14
|
+
* @category GET
|
|
15
|
+
*/
|
|
3
16
|
constructor(c, intDecoding, account) {
|
|
4
17
|
super(c, intDecoding);
|
|
5
18
|
this.account = account;
|
|
6
19
|
this.account = account;
|
|
7
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns `/v2/accounts/${account}`
|
|
23
|
+
*/
|
|
8
24
|
path() {
|
|
9
25
|
return `/v2/accounts/${this.account}`;
|
|
10
26
|
}
|
|
11
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Specify round to filter with.
|
|
29
|
+
*
|
|
30
|
+
* #### Example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
33
|
+
* const targetBlock = 18309917;
|
|
34
|
+
* const accountInfo = await indexerClient
|
|
35
|
+
* .lookupAccountByID(address)
|
|
36
|
+
* .round(targetBlock)
|
|
37
|
+
* .do();
|
|
38
|
+
* ```
|
|
39
|
+
* @param round
|
|
40
|
+
*/
|
|
12
41
|
round(round) {
|
|
13
42
|
this.query.round = round;
|
|
14
43
|
return this;
|
|
15
44
|
}
|
|
16
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
|
|
47
|
+
*
|
|
48
|
+
* #### Example 1
|
|
49
|
+
* ```typescript
|
|
50
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
51
|
+
* const accountInfo = await indexerClient
|
|
52
|
+
* .lookupAccountByID(address)
|
|
53
|
+
* .includeAll(false)
|
|
54
|
+
* .do();
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* #### Example 2
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
60
|
+
* const accountInfo = await indexerClient
|
|
61
|
+
* .lookupAccountByID(address)
|
|
62
|
+
* .includeAll()
|
|
63
|
+
* .do();
|
|
64
|
+
* ```
|
|
65
|
+
* @param value
|
|
66
|
+
*/
|
|
17
67
|
includeAll(value = true) {
|
|
18
68
|
this.query['include-all'] = value;
|
|
19
69
|
return this;
|
|
20
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Exclude additional items such as asset holdings, application local data stored for this account, asset parameters created by this account, and application parameters created by this account.
|
|
73
|
+
*
|
|
74
|
+
* #### Example 1
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
77
|
+
* const accountInfo = await indexerClient
|
|
78
|
+
* .lookupAccountByID(address)
|
|
79
|
+
* .exclude("all")
|
|
80
|
+
* .do();
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* #### Example 2
|
|
84
|
+
* ```typescript
|
|
85
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
86
|
+
* const accountInfo = await indexerClient
|
|
87
|
+
* .lookupAccountByID(address)
|
|
88
|
+
* .exclude("assets,created-assets")
|
|
89
|
+
* .do();
|
|
90
|
+
* ```
|
|
91
|
+
* @remarks By default, it behaves as exclude=none
|
|
92
|
+
* @param exclude - Array of `all`, `assets`, `created-assets`, `apps-local-state`, `created-apps`, `none`
|
|
93
|
+
* @category query
|
|
94
|
+
*/
|
|
95
|
+
exclude(exclude) {
|
|
96
|
+
this.query.exclude = exclude;
|
|
97
|
+
return this;
|
|
98
|
+
}
|
|
21
99
|
}
|
|
22
100
|
//# sourceMappingURL=lookupAccountByID.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lookupAccountByID.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAccountByID.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,YACE,CAAa,EACb,WAAwB,EAChB,OAAe;QAEvB,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAFd,YAAO,GAAP,OAAO,CAAQ;QAGvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,IAAI;QACF,OAAO,gBAAgB,IAAI,CAAC,OAAO,EAAE,CAAC;IACxC,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"lookupAccountByID.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAccountByID.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD;;;;;;;;;;;;OAYG;IACH,YACE,CAAa,EACb,WAAwB,EAChB,OAAe;QAEvB,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAFd,YAAO,GAAP,OAAO,CAAQ;QAGvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,OAAO,gBAAgB,IAAI,CAAC,OAAO,EAAE,CAAC;IACxC,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,UAAU,CAAC,KAAK,GAAG,IAAI;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,OAAe;QACrB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
export default class LookupAccountCreatedApplications extends JSONRequest {
|
|
3
|
+
/**
|
|
4
|
+
* Returns application information created by the given account.
|
|
5
|
+
*
|
|
6
|
+
* #### Example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
9
|
+
* const accountCreatedApps = await indexerClient.lookupAccountCreatedApplications(address).do();
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idcreated-applications)
|
|
13
|
+
* @param account - The address of the account to look up.
|
|
14
|
+
* @category GET
|
|
15
|
+
*/
|
|
16
|
+
constructor(c, intDecoding, account) {
|
|
17
|
+
super(c, intDecoding);
|
|
18
|
+
this.account = account;
|
|
19
|
+
this.account = account;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns `/v2/accounts/${account}/created-applications`
|
|
23
|
+
*/
|
|
24
|
+
path() {
|
|
25
|
+
return `/v2/accounts/${this.account}/created-applications`;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Add a limit for filter.
|
|
29
|
+
*
|
|
30
|
+
* #### Example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
33
|
+
* const maxResults = 20;
|
|
34
|
+
* const accountAssets = await indexerClient
|
|
35
|
+
* .lookupAccountCreatedApplications(address)
|
|
36
|
+
* .limit(maxResults)
|
|
37
|
+
* .do();
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @param limit - maximum number of results to return.
|
|
41
|
+
* @category query
|
|
42
|
+
*/
|
|
43
|
+
limit(limit) {
|
|
44
|
+
this.query.limit = limit;
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Specify round to filter with.
|
|
49
|
+
*
|
|
50
|
+
* #### Example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
53
|
+
* const targetBlock = 18309917;
|
|
54
|
+
* const accountAssets = await indexerClient
|
|
55
|
+
* .lookupAccountCreatedApplications(address)
|
|
56
|
+
* .round(targetBlock)
|
|
57
|
+
* .do();
|
|
58
|
+
* ```
|
|
59
|
+
* @param round
|
|
60
|
+
* @category query
|
|
61
|
+
*/
|
|
62
|
+
round(round) {
|
|
63
|
+
this.query.round = round;
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Specify the next page of results.
|
|
68
|
+
*
|
|
69
|
+
* #### Example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
72
|
+
* const maxResults = 20;
|
|
73
|
+
*
|
|
74
|
+
* const accountAssetsPage1 = await indexerClient
|
|
75
|
+
* .lookupAccountCreatedApplications(address)
|
|
76
|
+
* .limit(maxResults)
|
|
77
|
+
* .do();
|
|
78
|
+
*
|
|
79
|
+
* const accountAssetsPage2 = await indexerClient
|
|
80
|
+
* .lookupAccountCreatedApplications(address)
|
|
81
|
+
* .limit(maxResults)
|
|
82
|
+
* .next(accountAssetsPage1["next-token"])
|
|
83
|
+
* .do();
|
|
84
|
+
* ```
|
|
85
|
+
* @param nextToken - provided by the previous results.
|
|
86
|
+
* @category query
|
|
87
|
+
*/
|
|
88
|
+
nextToken(nextToken) {
|
|
89
|
+
this.query.next = nextToken;
|
|
90
|
+
return this;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
94
|
+
*
|
|
95
|
+
* #### Example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
98
|
+
* const accountAssets = await indexerClient
|
|
99
|
+
* .lookupAccountCreatedApplications(address)
|
|
100
|
+
* .includeAll(false)
|
|
101
|
+
* .do();
|
|
102
|
+
* ```
|
|
103
|
+
* @param value
|
|
104
|
+
* @category query
|
|
105
|
+
*/
|
|
106
|
+
includeAll(value = true) {
|
|
107
|
+
this.query['include-all'] = value;
|
|
108
|
+
return this;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Specify an applicationID to search for.
|
|
112
|
+
*
|
|
113
|
+
* #### Example
|
|
114
|
+
* ```typescript
|
|
115
|
+
* const applicationID = 163650;
|
|
116
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
117
|
+
* const accountApplications = await indexerClient
|
|
118
|
+
* .lookupAccountAppLocalStates(address)
|
|
119
|
+
* .applicationID(applicationID)
|
|
120
|
+
* .do();
|
|
121
|
+
* ```
|
|
122
|
+
* @param index - the applicationID
|
|
123
|
+
* @category query
|
|
124
|
+
*/
|
|
125
|
+
applicationID(index) {
|
|
126
|
+
this.query['application-id'] = index;
|
|
127
|
+
return this;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=lookupAccountCreatedApplications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookupAccountCreatedApplications.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAccountCreatedApplications.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,gCAAiC,SAAQ,WAAW;IACvE;;;;;;;;;;;;OAYG;IACH,YACE,CAAa,EACb,WAAwB,EAChB,OAAe;QAEvB,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAFd,YAAO,GAAP,OAAO,CAAQ;QAGvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,OAAO,gBAAgB,IAAI,CAAC,OAAO,uBAAuB,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CAAC,SAAiB;QACzB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,KAAK,GAAG,IAAI;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,KAAa;QACzB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
export default class LookupAccountCreatedAssets extends JSONRequest {
|
|
3
|
+
/**
|
|
4
|
+
* Returns asset information created by the given account.
|
|
5
|
+
*
|
|
6
|
+
* #### Example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
9
|
+
* const accountCreatedAssets = await indexerClient.lookupAccountCreatedAssets(address).do();
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idcreated-assets)
|
|
13
|
+
* @param account - The address of the account to look up.
|
|
14
|
+
* @category GET
|
|
15
|
+
*/
|
|
16
|
+
constructor(c, intDecoding, account) {
|
|
17
|
+
super(c, intDecoding);
|
|
18
|
+
this.account = account;
|
|
19
|
+
this.account = account;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns `/v2/accounts/${account}/created-assets`
|
|
23
|
+
*/
|
|
24
|
+
path() {
|
|
25
|
+
return `/v2/accounts/${this.account}/created-assets`;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Add a limit for filter.
|
|
29
|
+
*
|
|
30
|
+
* #### Example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
33
|
+
* const maxResults = 20;
|
|
34
|
+
* const accountAssets = await indexerClient
|
|
35
|
+
* .lookupAccountCreatedAssets(address)
|
|
36
|
+
* .limit(maxResults)
|
|
37
|
+
* .do();
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @param limit - maximum number of results to return.
|
|
41
|
+
* @category query
|
|
42
|
+
*/
|
|
43
|
+
limit(limit) {
|
|
44
|
+
this.query.limit = limit;
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Specify round to filter with.
|
|
49
|
+
*
|
|
50
|
+
* #### Example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
53
|
+
* const targetBlock = 18309917;
|
|
54
|
+
* const accountAssets = await indexerClient
|
|
55
|
+
* .lookupAccountCreatedAssets(address)
|
|
56
|
+
* .round(targetBlock)
|
|
57
|
+
* .do();
|
|
58
|
+
* ```
|
|
59
|
+
* @param round
|
|
60
|
+
* @category query
|
|
61
|
+
*/
|
|
62
|
+
round(round) {
|
|
63
|
+
this.query.round = round;
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Specify the next page of results.
|
|
68
|
+
*
|
|
69
|
+
* #### Example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
72
|
+
* const maxResults = 20;
|
|
73
|
+
*
|
|
74
|
+
* const accountAssetsPage1 = await indexerClient
|
|
75
|
+
* .lookupAccountCreatedAssets(address)
|
|
76
|
+
* .limit(maxResults)
|
|
77
|
+
* .do();
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* const accountAssetsPage2 = await indexerClient
|
|
81
|
+
* .lookupAccountCreatedAssets(address)
|
|
82
|
+
* .limit(maxResults)
|
|
83
|
+
* .next(accountAssetsPage1["next-token"])
|
|
84
|
+
* .do();
|
|
85
|
+
* ```
|
|
86
|
+
* @param nextToken - provided by the previous results.
|
|
87
|
+
* @category query
|
|
88
|
+
*/
|
|
89
|
+
nextToken(nextToken) {
|
|
90
|
+
this.query.next = nextToken;
|
|
91
|
+
return this;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
95
|
+
*
|
|
96
|
+
* #### Example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
99
|
+
* const accountAssets = await indexerClient
|
|
100
|
+
* .lookupAccountCreatedAssets(address)
|
|
101
|
+
* .includeAll(false)
|
|
102
|
+
* .do();
|
|
103
|
+
* ```
|
|
104
|
+
* @param value
|
|
105
|
+
* @category query
|
|
106
|
+
*/
|
|
107
|
+
includeAll(value = true) {
|
|
108
|
+
this.query['include-all'] = value;
|
|
109
|
+
return this;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Specify an assetID to search for.
|
|
113
|
+
*
|
|
114
|
+
* #### Example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* const assetID = 163650;
|
|
117
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
118
|
+
* const assetAssets = await indexerClient
|
|
119
|
+
* .lookupAccountCreatedAssets(address)
|
|
120
|
+
* .assetID(assetID)
|
|
121
|
+
* .do();
|
|
122
|
+
* ```
|
|
123
|
+
* @param index - the assetID
|
|
124
|
+
* @category query
|
|
125
|
+
*/
|
|
126
|
+
assetID(index) {
|
|
127
|
+
this.query['asset-id'] = index;
|
|
128
|
+
return this;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=lookupAccountCreatedAssets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookupAccountCreatedAssets.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAccountCreatedAssets.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,WAAW;IACjE;;;;;;;;;;;;OAYG;IACH,YACE,CAAa,EACb,WAAwB,EAChB,OAAe;QAEvB,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAFd,YAAO,GAAP,OAAO,CAAQ;QAGvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,OAAO,gBAAgB,IAAI,CAAC,OAAO,iBAAiB,CAAC;IACvD,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,SAAiB;QACzB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,KAAK,GAAG,IAAI;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,KAAa;QACnB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|