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,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsonrequest_1 = __importDefault(require("../jsonrequest"));
|
|
7
|
+
class LookupAccountAppLocalStates extends jsonrequest_1.default {
|
|
8
|
+
/**
|
|
9
|
+
* Returns application local state about the given account.
|
|
10
|
+
*
|
|
11
|
+
* #### Example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
14
|
+
* const accountAppLocalStates = await indexerClient.lookupAccountAppLocalStates(address).do();
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idapps-local-state)
|
|
18
|
+
* @param account - The address of the account to look up.
|
|
19
|
+
* @category GET
|
|
20
|
+
*/
|
|
21
|
+
constructor(c, intDecoding, account) {
|
|
22
|
+
super(c, intDecoding);
|
|
23
|
+
this.account = account;
|
|
24
|
+
this.account = account;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @returns `/v2/accounts/${account}/apps-local-state`
|
|
28
|
+
*/
|
|
29
|
+
path() {
|
|
30
|
+
return `/v2/accounts/${this.account}/apps-local-state`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Add a limit for filter.
|
|
34
|
+
*
|
|
35
|
+
* #### Example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
38
|
+
* const maxResults = 20;
|
|
39
|
+
* const accountAssets = await indexerClient
|
|
40
|
+
* .lookupAccountAppLocalStates(address)
|
|
41
|
+
* .limit(maxResults)
|
|
42
|
+
* .do();
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @param limit - maximum number of results to return.
|
|
46
|
+
* @category query
|
|
47
|
+
*/
|
|
48
|
+
limit(limit) {
|
|
49
|
+
this.query.limit = limit;
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Specify round to filter with.
|
|
54
|
+
*
|
|
55
|
+
* #### Example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
58
|
+
* const targetBlock = 18309917;
|
|
59
|
+
* const accountAssets = await indexerClient
|
|
60
|
+
* .lookupAccountAppLocalStates(address)
|
|
61
|
+
* .round(targetBlock)
|
|
62
|
+
* .do();
|
|
63
|
+
* ```
|
|
64
|
+
* @param round
|
|
65
|
+
* @category query
|
|
66
|
+
*/
|
|
67
|
+
round(round) {
|
|
68
|
+
this.query.round = round;
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Specify the next page of results.
|
|
73
|
+
*
|
|
74
|
+
* #### Example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
77
|
+
* const maxResults = 20;
|
|
78
|
+
*
|
|
79
|
+
* const accountAssetsPage1 = await indexerClient
|
|
80
|
+
* .lookupAccountAppLocalStates(address)
|
|
81
|
+
* .limit(maxResults)
|
|
82
|
+
* .do();
|
|
83
|
+
*
|
|
84
|
+
* const accountAssetsPage2 = await indexerClient
|
|
85
|
+
* .lookupAccountAppLocalStates(address)
|
|
86
|
+
* .limit(maxResults)
|
|
87
|
+
* .next(accountAssetsPage1["next-token"])
|
|
88
|
+
* .do();
|
|
89
|
+
* ```
|
|
90
|
+
* @param nextToken - provided by the previous results.
|
|
91
|
+
*/
|
|
92
|
+
nextToken(nextToken) {
|
|
93
|
+
this.query.next = nextToken;
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
98
|
+
*
|
|
99
|
+
* #### Example
|
|
100
|
+
* ```typescript
|
|
101
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
102
|
+
* const accountAssets = await indexerClient
|
|
103
|
+
* .lookupAccountAppLocalStates(address)
|
|
104
|
+
* .includeAll(false)
|
|
105
|
+
* .do();
|
|
106
|
+
* ```
|
|
107
|
+
* @param value
|
|
108
|
+
* @category query
|
|
109
|
+
*/
|
|
110
|
+
includeAll(value = true) {
|
|
111
|
+
this.query['include-all'] = value;
|
|
112
|
+
return this;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Specify an applicationID to search for.
|
|
116
|
+
*
|
|
117
|
+
* #### Example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* const applicationID = 163650;
|
|
120
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
121
|
+
* const accountApplications = await indexerClient
|
|
122
|
+
* .lookupAccountAppLocalStates(address)
|
|
123
|
+
* .applicationID(applicationID)
|
|
124
|
+
* .do();
|
|
125
|
+
* ```
|
|
126
|
+
* @param index - the applicationID
|
|
127
|
+
* @category query
|
|
128
|
+
*/
|
|
129
|
+
applicationID(index) {
|
|
130
|
+
this.query['application-id'] = index;
|
|
131
|
+
return this;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
exports.default = LookupAccountAppLocalStates;
|
|
135
|
+
//# sourceMappingURL=lookupAccountAppLocalStates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookupAccountAppLocalStates.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAccountAppLocalStates.ts"],"names":[],"mappings":";;;;;AAAA,iEAAyC;AAIzC,MAAqB,2BAA4B,SAAQ,qBAAW;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;AAvID,8CAuIC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsonrequest_1 = __importDefault(require("../jsonrequest"));
|
|
7
|
+
class LookupAccountAssets extends jsonrequest_1.default {
|
|
8
|
+
/**
|
|
9
|
+
* Returns asset about the given account.
|
|
10
|
+
*
|
|
11
|
+
* #### Example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
14
|
+
* const accountAssets = await indexerClient.lookupAccountAssets(address).do();
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idassets)
|
|
18
|
+
* @param account - The address of the account to look up.
|
|
19
|
+
* @category GET
|
|
20
|
+
*/
|
|
21
|
+
constructor(c, intDecoding, account) {
|
|
22
|
+
super(c, intDecoding);
|
|
23
|
+
this.account = account;
|
|
24
|
+
this.account = account;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @returns `/v2/accounts/${account}/assets`
|
|
28
|
+
*/
|
|
29
|
+
path() {
|
|
30
|
+
return `/v2/accounts/${this.account}/assets`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Add a limit for filter.
|
|
34
|
+
*
|
|
35
|
+
* #### Example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
38
|
+
* const maxResults = 20;
|
|
39
|
+
* const accountAssets = await indexerClient
|
|
40
|
+
* .lookupAccountAssets(address)
|
|
41
|
+
* .limit(maxResults)
|
|
42
|
+
* .do();
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @param limit - maximum number of results to return.
|
|
46
|
+
* @category query
|
|
47
|
+
*/
|
|
48
|
+
limit(limit) {
|
|
49
|
+
this.query.limit = limit;
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Specify round to filter with.
|
|
54
|
+
*
|
|
55
|
+
* #### Example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
58
|
+
* const targetBlock = 18309917;
|
|
59
|
+
* const accountAssets = await indexerClient
|
|
60
|
+
* .lookupAccountAssets(address)
|
|
61
|
+
* .round(targetBlock)
|
|
62
|
+
* .do();
|
|
63
|
+
* ```
|
|
64
|
+
* @param round
|
|
65
|
+
* @category query
|
|
66
|
+
*/
|
|
67
|
+
round(round) {
|
|
68
|
+
this.query.round = round;
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Specify the next page of results.
|
|
73
|
+
*
|
|
74
|
+
* #### Example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
77
|
+
* const maxResults = 20;
|
|
78
|
+
*
|
|
79
|
+
* const accountAssetsPage1 = await indexerClient
|
|
80
|
+
* .lookupAccountAssets(address)
|
|
81
|
+
* .limit(maxResults)
|
|
82
|
+
* .do();
|
|
83
|
+
*
|
|
84
|
+
* const accountAssetsPage2 = await indexerClient
|
|
85
|
+
* .lookupAccountAssets(address)
|
|
86
|
+
* .limit(maxResults)
|
|
87
|
+
* .next(accountAssetsPage1["next-token"])
|
|
88
|
+
* .do();
|
|
89
|
+
* ```
|
|
90
|
+
* @param nextToken - provided by the previous results.
|
|
91
|
+
* @category query
|
|
92
|
+
*/
|
|
93
|
+
nextToken(nextToken) {
|
|
94
|
+
this.query.next = nextToken;
|
|
95
|
+
return this;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
99
|
+
*
|
|
100
|
+
* #### Example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
103
|
+
* const accountAssets = await indexerClient
|
|
104
|
+
* .lookupAccountAssets(address)
|
|
105
|
+
* .includeAll(false)
|
|
106
|
+
* .do();
|
|
107
|
+
* ```
|
|
108
|
+
* @param value
|
|
109
|
+
* @category query
|
|
110
|
+
*/
|
|
111
|
+
includeAll(value = true) {
|
|
112
|
+
this.query['include-all'] = value;
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Specify an assetID to search for.
|
|
117
|
+
*
|
|
118
|
+
* #### Example
|
|
119
|
+
* ```typescript
|
|
120
|
+
* const assetId = 163650;
|
|
121
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
122
|
+
* const assetAssets = await indexerClient
|
|
123
|
+
* .lookupAccountAssets(address)
|
|
124
|
+
* .assetId(assetId)
|
|
125
|
+
* .do();
|
|
126
|
+
* ```
|
|
127
|
+
* @param index - the assetID
|
|
128
|
+
* @category query
|
|
129
|
+
*/
|
|
130
|
+
assetId(index) {
|
|
131
|
+
this.query['asset-id'] = index;
|
|
132
|
+
return this;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.default = LookupAccountAssets;
|
|
136
|
+
//# sourceMappingURL=lookupAccountAssets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookupAccountAssets.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAccountAssets.ts"],"names":[],"mappings":";;;;;AAAA,iEAAyC;AAIzC,MAAqB,mBAAoB,SAAQ,qBAAW;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;AAxID,sCAwIC"}
|
|
@@ -5,24 +5,102 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsonrequest_1 = __importDefault(require("../jsonrequest"));
|
|
7
7
|
class LookupAccountByID extends jsonrequest_1.default {
|
|
8
|
+
/**
|
|
9
|
+
* Returns information about the given account.
|
|
10
|
+
*
|
|
11
|
+
* #### Example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
14
|
+
* const accountInfo = await indexerClient.lookupAccountByID(address).do();
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
|
|
18
|
+
* @param account - The address of the account to look up.
|
|
19
|
+
* @category GET
|
|
20
|
+
*/
|
|
8
21
|
constructor(c, intDecoding, account) {
|
|
9
22
|
super(c, intDecoding);
|
|
10
23
|
this.account = account;
|
|
11
24
|
this.account = account;
|
|
12
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* @returns `/v2/accounts/${account}`
|
|
28
|
+
*/
|
|
13
29
|
path() {
|
|
14
30
|
return `/v2/accounts/${this.account}`;
|
|
15
31
|
}
|
|
16
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Specify round to filter with.
|
|
34
|
+
*
|
|
35
|
+
* #### Example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
38
|
+
* const targetBlock = 18309917;
|
|
39
|
+
* const accountInfo = await indexerClient
|
|
40
|
+
* .lookupAccountByID(address)
|
|
41
|
+
* .round(targetBlock)
|
|
42
|
+
* .do();
|
|
43
|
+
* ```
|
|
44
|
+
* @param round
|
|
45
|
+
*/
|
|
17
46
|
round(round) {
|
|
18
47
|
this.query.round = round;
|
|
19
48
|
return this;
|
|
20
49
|
}
|
|
21
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
|
|
52
|
+
*
|
|
53
|
+
* #### Example 1
|
|
54
|
+
* ```typescript
|
|
55
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
56
|
+
* const accountInfo = await indexerClient
|
|
57
|
+
* .lookupAccountByID(address)
|
|
58
|
+
* .includeAll(false)
|
|
59
|
+
* .do();
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* #### Example 2
|
|
63
|
+
* ```typescript
|
|
64
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
65
|
+
* const accountInfo = await indexerClient
|
|
66
|
+
* .lookupAccountByID(address)
|
|
67
|
+
* .includeAll()
|
|
68
|
+
* .do();
|
|
69
|
+
* ```
|
|
70
|
+
* @param value
|
|
71
|
+
*/
|
|
22
72
|
includeAll(value = true) {
|
|
23
73
|
this.query['include-all'] = value;
|
|
24
74
|
return this;
|
|
25
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* 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.
|
|
78
|
+
*
|
|
79
|
+
* #### Example 1
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
82
|
+
* const accountInfo = await indexerClient
|
|
83
|
+
* .lookupAccountByID(address)
|
|
84
|
+
* .exclude("all")
|
|
85
|
+
* .do();
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* #### Example 2
|
|
89
|
+
* ```typescript
|
|
90
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
91
|
+
* const accountInfo = await indexerClient
|
|
92
|
+
* .lookupAccountByID(address)
|
|
93
|
+
* .exclude("assets,created-assets")
|
|
94
|
+
* .do();
|
|
95
|
+
* ```
|
|
96
|
+
* @remarks By default, it behaves as exclude=none
|
|
97
|
+
* @param exclude - Array of `all`, `assets`, `created-assets`, `apps-local-state`, `created-apps`, `none`
|
|
98
|
+
* @category query
|
|
99
|
+
*/
|
|
100
|
+
exclude(exclude) {
|
|
101
|
+
this.query.exclude = exclude;
|
|
102
|
+
return this;
|
|
103
|
+
}
|
|
26
104
|
}
|
|
27
105
|
exports.default = LookupAccountByID;
|
|
28
106
|
//# sourceMappingURL=lookupAccountByID.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lookupAccountByID.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAccountByID.ts"],"names":[],"mappings":";;;;;AAAA,iEAAyC;AAIzC,MAAqB,iBAAkB,SAAQ,qBAAW;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,iEAAyC;AAIzC,MAAqB,iBAAkB,SAAQ,qBAAW;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;AAxGD,oCAwGC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsonrequest_1 = __importDefault(require("../jsonrequest"));
|
|
7
|
+
class LookupAccountCreatedApplications extends jsonrequest_1.default {
|
|
8
|
+
/**
|
|
9
|
+
* Returns application information created by the given account.
|
|
10
|
+
*
|
|
11
|
+
* #### Example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
14
|
+
* const accountCreatedApps = await indexerClient.lookupAccountCreatedApplications(address).do();
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idcreated-applications)
|
|
18
|
+
* @param account - The address of the account to look up.
|
|
19
|
+
* @category GET
|
|
20
|
+
*/
|
|
21
|
+
constructor(c, intDecoding, account) {
|
|
22
|
+
super(c, intDecoding);
|
|
23
|
+
this.account = account;
|
|
24
|
+
this.account = account;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @returns `/v2/accounts/${account}/created-applications`
|
|
28
|
+
*/
|
|
29
|
+
path() {
|
|
30
|
+
return `/v2/accounts/${this.account}/created-applications`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Add a limit for filter.
|
|
34
|
+
*
|
|
35
|
+
* #### Example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
38
|
+
* const maxResults = 20;
|
|
39
|
+
* const accountAssets = await indexerClient
|
|
40
|
+
* .lookupAccountCreatedApplications(address)
|
|
41
|
+
* .limit(maxResults)
|
|
42
|
+
* .do();
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @param limit - maximum number of results to return.
|
|
46
|
+
* @category query
|
|
47
|
+
*/
|
|
48
|
+
limit(limit) {
|
|
49
|
+
this.query.limit = limit;
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Specify round to filter with.
|
|
54
|
+
*
|
|
55
|
+
* #### Example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
58
|
+
* const targetBlock = 18309917;
|
|
59
|
+
* const accountAssets = await indexerClient
|
|
60
|
+
* .lookupAccountCreatedApplications(address)
|
|
61
|
+
* .round(targetBlock)
|
|
62
|
+
* .do();
|
|
63
|
+
* ```
|
|
64
|
+
* @param round
|
|
65
|
+
* @category query
|
|
66
|
+
*/
|
|
67
|
+
round(round) {
|
|
68
|
+
this.query.round = round;
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Specify the next page of results.
|
|
73
|
+
*
|
|
74
|
+
* #### Example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
77
|
+
* const maxResults = 20;
|
|
78
|
+
*
|
|
79
|
+
* const accountAssetsPage1 = await indexerClient
|
|
80
|
+
* .lookupAccountCreatedApplications(address)
|
|
81
|
+
* .limit(maxResults)
|
|
82
|
+
* .do();
|
|
83
|
+
*
|
|
84
|
+
* const accountAssetsPage2 = await indexerClient
|
|
85
|
+
* .lookupAccountCreatedApplications(address)
|
|
86
|
+
* .limit(maxResults)
|
|
87
|
+
* .next(accountAssetsPage1["next-token"])
|
|
88
|
+
* .do();
|
|
89
|
+
* ```
|
|
90
|
+
* @param nextToken - provided by the previous results.
|
|
91
|
+
* @category query
|
|
92
|
+
*/
|
|
93
|
+
nextToken(nextToken) {
|
|
94
|
+
this.query.next = nextToken;
|
|
95
|
+
return this;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
99
|
+
*
|
|
100
|
+
* #### Example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
103
|
+
* const accountAssets = await indexerClient
|
|
104
|
+
* .lookupAccountCreatedApplications(address)
|
|
105
|
+
* .includeAll(false)
|
|
106
|
+
* .do();
|
|
107
|
+
* ```
|
|
108
|
+
* @param value
|
|
109
|
+
* @category query
|
|
110
|
+
*/
|
|
111
|
+
includeAll(value = true) {
|
|
112
|
+
this.query['include-all'] = value;
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Specify an applicationID to search for.
|
|
117
|
+
*
|
|
118
|
+
* #### Example
|
|
119
|
+
* ```typescript
|
|
120
|
+
* const applicationID = 163650;
|
|
121
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
122
|
+
* const accountApplications = await indexerClient
|
|
123
|
+
* .lookupAccountAppLocalStates(address)
|
|
124
|
+
* .applicationID(applicationID)
|
|
125
|
+
* .do();
|
|
126
|
+
* ```
|
|
127
|
+
* @param index - the applicationID
|
|
128
|
+
* @category query
|
|
129
|
+
*/
|
|
130
|
+
applicationID(index) {
|
|
131
|
+
this.query['application-id'] = index;
|
|
132
|
+
return this;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.default = LookupAccountCreatedApplications;
|
|
136
|
+
//# sourceMappingURL=lookupAccountCreatedApplications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookupAccountCreatedApplications.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAccountCreatedApplications.ts"],"names":[],"mappings":";;;;;AAAA,iEAAyC;AAIzC,MAAqB,gCAAiC,SAAQ,qBAAW;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;AAxID,mDAwIC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsonrequest_1 = __importDefault(require("../jsonrequest"));
|
|
7
|
+
class LookupAccountCreatedAssets extends jsonrequest_1.default {
|
|
8
|
+
/**
|
|
9
|
+
* Returns asset information created by the given account.
|
|
10
|
+
*
|
|
11
|
+
* #### Example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
14
|
+
* const accountCreatedAssets = await indexerClient.lookupAccountCreatedAssets(address).do();
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idcreated-assets)
|
|
18
|
+
* @param account - The address of the account to look up.
|
|
19
|
+
* @category GET
|
|
20
|
+
*/
|
|
21
|
+
constructor(c, intDecoding, account) {
|
|
22
|
+
super(c, intDecoding);
|
|
23
|
+
this.account = account;
|
|
24
|
+
this.account = account;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @returns `/v2/accounts/${account}/created-assets`
|
|
28
|
+
*/
|
|
29
|
+
path() {
|
|
30
|
+
return `/v2/accounts/${this.account}/created-assets`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Add a limit for filter.
|
|
34
|
+
*
|
|
35
|
+
* #### Example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
38
|
+
* const maxResults = 20;
|
|
39
|
+
* const accountAssets = await indexerClient
|
|
40
|
+
* .lookupAccountCreatedAssets(address)
|
|
41
|
+
* .limit(maxResults)
|
|
42
|
+
* .do();
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @param limit - maximum number of results to return.
|
|
46
|
+
* @category query
|
|
47
|
+
*/
|
|
48
|
+
limit(limit) {
|
|
49
|
+
this.query.limit = limit;
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Specify round to filter with.
|
|
54
|
+
*
|
|
55
|
+
* #### Example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
58
|
+
* const targetBlock = 18309917;
|
|
59
|
+
* const accountAssets = await indexerClient
|
|
60
|
+
* .lookupAccountCreatedAssets(address)
|
|
61
|
+
* .round(targetBlock)
|
|
62
|
+
* .do();
|
|
63
|
+
* ```
|
|
64
|
+
* @param round
|
|
65
|
+
* @category query
|
|
66
|
+
*/
|
|
67
|
+
round(round) {
|
|
68
|
+
this.query.round = round;
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Specify the next page of results.
|
|
73
|
+
*
|
|
74
|
+
* #### Example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
77
|
+
* const maxResults = 20;
|
|
78
|
+
*
|
|
79
|
+
* const accountAssetsPage1 = await indexerClient
|
|
80
|
+
* .lookupAccountCreatedAssets(address)
|
|
81
|
+
* .limit(maxResults)
|
|
82
|
+
* .do();
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* const accountAssetsPage2 = await indexerClient
|
|
86
|
+
* .lookupAccountCreatedAssets(address)
|
|
87
|
+
* .limit(maxResults)
|
|
88
|
+
* .next(accountAssetsPage1["next-token"])
|
|
89
|
+
* .do();
|
|
90
|
+
* ```
|
|
91
|
+
* @param nextToken - provided by the previous results.
|
|
92
|
+
* @category query
|
|
93
|
+
*/
|
|
94
|
+
nextToken(nextToken) {
|
|
95
|
+
this.query.next = nextToken;
|
|
96
|
+
return this;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
100
|
+
*
|
|
101
|
+
* #### Example
|
|
102
|
+
* ```typescript
|
|
103
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
104
|
+
* const accountAssets = await indexerClient
|
|
105
|
+
* .lookupAccountCreatedAssets(address)
|
|
106
|
+
* .includeAll(false)
|
|
107
|
+
* .do();
|
|
108
|
+
* ```
|
|
109
|
+
* @param value
|
|
110
|
+
* @category query
|
|
111
|
+
*/
|
|
112
|
+
includeAll(value = true) {
|
|
113
|
+
this.query['include-all'] = value;
|
|
114
|
+
return this;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Specify an assetID to search for.
|
|
118
|
+
*
|
|
119
|
+
* #### Example
|
|
120
|
+
* ```typescript
|
|
121
|
+
* const assetID = 163650;
|
|
122
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
123
|
+
* const assetAssets = await indexerClient
|
|
124
|
+
* .lookupAccountCreatedAssets(address)
|
|
125
|
+
* .assetID(assetID)
|
|
126
|
+
* .do();
|
|
127
|
+
* ```
|
|
128
|
+
* @param index - the assetID
|
|
129
|
+
* @category query
|
|
130
|
+
*/
|
|
131
|
+
assetID(index) {
|
|
132
|
+
this.query['asset-id'] = index;
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.default = LookupAccountCreatedAssets;
|
|
137
|
+
//# sourceMappingURL=lookupAccountCreatedAssets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookupAccountCreatedAssets.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAccountCreatedAssets.ts"],"names":[],"mappings":";;;;;AAAA,iEAAyC;AAIzC,MAAqB,0BAA2B,SAAQ,qBAAW;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;AAzID,6CAyIC"}
|