algosdk 1.14.0 → 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 +4 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.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 +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/lookupAssetBalances.js +0 -18
- package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.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/dryrun.js +1 -1
- package/dist/cjs/src/dryrun.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 +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/lookupAssetBalances.js +0 -18
- package/dist/esm/src/client/v2/indexer/lookupAssetBalances.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/dryrun.js +1 -1
- package/dist/esm/src/dryrun.js.map +1 -1
- 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 +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/lookupAssetBalances.d.ts +0 -15
- 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/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
export default class LookupAccountCreatedAssets extends JSONRequest {
|
|
3
|
+
constructor(c, intDecoding, account) {
|
|
4
|
+
super(c, intDecoding);
|
|
5
|
+
this.account = account;
|
|
6
|
+
this.account = account;
|
|
7
|
+
}
|
|
8
|
+
path() {
|
|
9
|
+
return `/v2/accounts/${this.account}/created-assets`;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Add a limit for filter.
|
|
13
|
+
*
|
|
14
|
+
* #### Example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
17
|
+
* const maxResults = 20;
|
|
18
|
+
* const accountAssets = await indexerClient
|
|
19
|
+
* .lookupAccountCreatedAssets(address)
|
|
20
|
+
* .limit(maxResults)
|
|
21
|
+
* .do();
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param limit - maximum number of results to return.
|
|
25
|
+
*/
|
|
26
|
+
limit(limit) {
|
|
27
|
+
this.query.limit = limit;
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Specify round to filter with.
|
|
32
|
+
*
|
|
33
|
+
* #### Example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
36
|
+
* const targetBlock = 18309917;
|
|
37
|
+
* const accountAssets = await indexerClient
|
|
38
|
+
* .lookupAccountCreatedAssets(address)
|
|
39
|
+
* .round(targetBlock)
|
|
40
|
+
* .do();
|
|
41
|
+
* ```
|
|
42
|
+
* @param round
|
|
43
|
+
*/
|
|
44
|
+
round(round) {
|
|
45
|
+
this.query.round = round;
|
|
46
|
+
return this;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Specify the next page of results.
|
|
50
|
+
*
|
|
51
|
+
* #### Example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
54
|
+
* const maxResults = 20;
|
|
55
|
+
* const nextToken = "APA6C7C3NCANRPIBUWQOF7WSKLJMK6RPQUVFLLDV4U5WCQE4DEF26D4E3E";
|
|
56
|
+
* const accountAssets = await indexerClient
|
|
57
|
+
* .lookupAccountCreatedAssets(address)
|
|
58
|
+
* .limit(maxResults)
|
|
59
|
+
* .next(nextToken)
|
|
60
|
+
* .do();
|
|
61
|
+
* ```
|
|
62
|
+
* @param nextToken - provided by the previous results.
|
|
63
|
+
*/
|
|
64
|
+
nextToken(nextToken) {
|
|
65
|
+
this.query.next = nextToken;
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
70
|
+
*
|
|
71
|
+
* #### Example
|
|
72
|
+
* ```typescript
|
|
73
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
74
|
+
* const accountAssets = await indexerClient
|
|
75
|
+
* .lookupAccountCreatedAssets(address)
|
|
76
|
+
* .includeAll(false)
|
|
77
|
+
* .do();
|
|
78
|
+
* ```
|
|
79
|
+
* @param value
|
|
80
|
+
*/
|
|
81
|
+
includeAll(value = true) {
|
|
82
|
+
this.query['include-all'] = value;
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Specify an assetID to search for.
|
|
87
|
+
*
|
|
88
|
+
* #### Example
|
|
89
|
+
* ```typescript
|
|
90
|
+
* const assetID = 163650;
|
|
91
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
92
|
+
* const assetAssets = await indexerClient
|
|
93
|
+
* .lookupAccountCreatedAssets(address)
|
|
94
|
+
* .assetID(assetID)
|
|
95
|
+
* .do();
|
|
96
|
+
* ```
|
|
97
|
+
* @param index - the assetID
|
|
98
|
+
*/
|
|
99
|
+
assetID(index) {
|
|
100
|
+
this.query['asset-id'] = index;
|
|
101
|
+
return this;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//# 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,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,iBAAiB,CAAC;IACvD,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,SAAiB;QACzB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,KAAK,GAAG,IAAI;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,KAAa;QACnB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -39,24 +39,6 @@ export default class LookupAssetBalances extends JSONRequest {
|
|
|
39
39
|
this.query.limit = limit;
|
|
40
40
|
return this;
|
|
41
41
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Specify round to filter with.
|
|
44
|
-
*
|
|
45
|
-
* #### Example
|
|
46
|
-
* ```typescript
|
|
47
|
-
* const assetId = 163650;
|
|
48
|
-
* const targetBlock = 18309917;
|
|
49
|
-
* const assetBalances = await indexerClient
|
|
50
|
-
* .lookupAssetBalances(assetId)
|
|
51
|
-
* .round(targetBlock)
|
|
52
|
-
* .do();
|
|
53
|
-
* ```
|
|
54
|
-
* @param round
|
|
55
|
-
*/
|
|
56
|
-
round(round) {
|
|
57
|
-
this.query.round = round;
|
|
58
|
-
return this;
|
|
59
|
-
}
|
|
60
42
|
/**
|
|
61
43
|
* Filtered results should have an asset balance greater than this value.
|
|
62
44
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lookupAssetBalances.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAssetBalances.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D;;;;;;;;;;;OAWG;IACH,YAAY,CAAa,EAAE,WAAwB,EAAU,KAAa;QACxE,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QADqC,UAAK,GAAL,KAAK,CAAQ;QAExE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAI;QACF,OAAO,cAAc,IAAI,CAAC,KAAK,WAAW,CAAC;IAC7C,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,
|
|
1
|
+
{"version":3,"file":"lookupAssetBalances.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/lookupAssetBalances.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D;;;;;;;;;;;OAWG;IACH,YAAY,CAAa,EAAE,WAAwB,EAAU,KAAa;QACxE,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QADqC,UAAK,GAAL,KAAK,CAAQ;QAExE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAI;QACF,OAAO,cAAc,IAAI,CAAC,KAAK,WAAW,CAAC;IAC7C,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,mBAAmB,CAAC,OAAe;QACjC,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAG,OAAO,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CAAC,MAAc;QAC7B,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,SAAiB;QACzB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,KAAK,GAAG,IAAI;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -49,5 +49,10 @@ export default class SearchAccounts extends JSONRequest {
|
|
|
49
49
|
this.query['include-all'] = value;
|
|
50
50
|
return this;
|
|
51
51
|
}
|
|
52
|
+
// exclude
|
|
53
|
+
exclude(exclude) {
|
|
54
|
+
this.query.exclude = exclude;
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
52
57
|
}
|
|
53
58
|
//# sourceMappingURL=searchAccounts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchAccounts.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/searchAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,kDAAkD;IAClD,IAAI;QACF,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,gLAAgL;IAChL,mBAAmB,CAAC,OAAe;QACjC,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAG,OAAO,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,6KAA6K;IAC7K,gBAAgB,CAAC,MAAc;QAC7B,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,2BAA2B;IAC3B,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kCAAkC;IAClC,OAAO,CAAC,EAAU;QAChB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,sBAAsB;IACtB,SAAS,CAAC,SAAiB;QACzB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,2BAA2B;IAC3B,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8CAA8C;IAC9C,QAAQ,CAAC,QAAgB;QACvB,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8BAA8B;IAC9B,aAAa,CAAC,aAAqB;QACjC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,wJAAwJ;IACxJ,UAAU,CAAC,KAAK,GAAG,IAAI;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"searchAccounts.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/searchAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,kDAAkD;IAClD,IAAI;QACF,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,gLAAgL;IAChL,mBAAmB,CAAC,OAAe;QACjC,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAG,OAAO,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,6KAA6K;IAC7K,gBAAgB,CAAC,MAAc;QAC7B,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,2BAA2B;IAC3B,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kCAAkC;IAClC,OAAO,CAAC,EAAU;QAChB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,sBAAsB;IACtB,SAAS,CAAC,SAAiB;QACzB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,2BAA2B;IAC3B,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8CAA8C;IAC9C,QAAQ,CAAC,QAAgB;QACvB,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8BAA8B;IAC9B,aAAa,CAAC,aAAqB;QACjC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,wJAAwJ;IACxJ,UAAU,CAAC,KAAK,GAAG,IAAI;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,UAAU;IACV,OAAO,CAAC,OAAe;QACrB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -9,6 +9,11 @@ export default class SearchForApplications extends JSONRequest {
|
|
|
9
9
|
this.query['application-id'] = index;
|
|
10
10
|
return this;
|
|
11
11
|
}
|
|
12
|
+
// creator for filter, as int
|
|
13
|
+
creator(index) {
|
|
14
|
+
this.query.creator = index;
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
12
17
|
// token for pagination
|
|
13
18
|
nextToken(next) {
|
|
14
19
|
this.query.next = next;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchForApplications.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/searchForApplications.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,kDAAkD;IAClD,IAAI;QACF,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,oCAAoC;IACpC,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,uBAAuB;IACvB,SAAS,CAAC,IAAY;QACpB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,+BAA+B;IAC/B,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,wJAAwJ;IACxJ,UAAU,CAAC,KAAK,GAAG,IAAI;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"searchForApplications.js","sourceRoot":"","sources":["../../../../../../src/client/v2/indexer/searchForApplications.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,kDAAkD;IAClD,IAAI;QACF,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,oCAAoC;IACpC,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,6BAA6B;IAC7B,OAAO,CAAC,KAAa;QACnB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,uBAAuB;IACvB,SAAS,CAAC,IAAY;QACpB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,+BAA+B;IAC/B,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,wJAAwJ;IACxJ,UAAU,CAAC,KAAK,GAAG,IAAI;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
package/dist/esm/src/dryrun.js
CHANGED
|
@@ -34,7 +34,7 @@ export async function createDryrun({ client, txns, protocolVersion, latestTimest
|
|
|
34
34
|
if (t.txn.appForeignAssets)
|
|
35
35
|
assets.push(...t.txn.appForeignAssets);
|
|
36
36
|
// Create application,
|
|
37
|
-
if (t.txn.appIndex === 0) {
|
|
37
|
+
if (t.txn.appIndex === undefined || t.txn.appIndex === 0) {
|
|
38
38
|
appInfos.push(new Application(defaultAppId, new ApplicationParams({
|
|
39
39
|
creator: encodeAddress(t.txn.from.publicKey),
|
|
40
40
|
approvalProgram: t.txn.appApprovalProgram,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dryrun.js","sourceRoot":"","sources":["../../../src/dryrun.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAEd,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE1E,MAAM,YAAY,GAAG,UAAU,CAAC;AAahC,SAAS,cAAc,CAAC,EAAoB;IAC1C,6CAA6C;IAC7C,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAA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,CAAC,CAAC;IAE/B,MAAM,YAAY,GAAG,EAAE,CAAC;IACxB,KAAK,MAAM,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;QACtC,YAAY,CAAC,IAAI,CACf,MAAM;aACH,kBAAkB,CAAC,IAAI,CAAC;aACxB,EAAE,EAAE;aACJ,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,IAAI,cAAc,IAAI,QAAQ,EAAE;gBAC9B,6CAA6C;gBAC7C,QAAQ,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC9D,cAAc,CAAC,GAAG,CAAC,CACpB,CAAC;aACH;YACD,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3B,CAAC,CAAC,CACL,CAAC;KACH;IACD,MAAM,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAEhC,OAAO,IAAI,aAAa,CAAC;QACvB,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;QACvE,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,QAAQ;QACd,eAAe;QACf,KAAK;QACL,eAAe;QACf,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import HTTPClient from '../../client';
|
|
3
|
+
import IntDecoding from '../../../types/intDecoding';
|
|
4
|
+
export default class AccountApplicationInformation extends JSONRequest {
|
|
5
|
+
private account;
|
|
6
|
+
private applicationID;
|
|
7
|
+
constructor(c: HTTPClient, intDecoding: IntDecoding, account: string, applicationID: number);
|
|
8
|
+
path(): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import HTTPClient from '../../client';
|
|
3
|
+
import IntDecoding from '../../../types/intDecoding';
|
|
4
|
+
export default class AccountAssetInformation extends JSONRequest {
|
|
5
|
+
private account;
|
|
6
|
+
private assetID;
|
|
7
|
+
constructor(c: HTTPClient, intDecoding: IntDecoding, account: string, assetID: number);
|
|
8
|
+
path(): string;
|
|
9
|
+
}
|
|
@@ -5,4 +5,19 @@ export default class AccountInformation extends JSONRequest {
|
|
|
5
5
|
private account;
|
|
6
6
|
constructor(c: HTTPClient, intDecoding: IntDecoding, account: string);
|
|
7
7
|
path(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Exclude assets and application data from results
|
|
10
|
+
*
|
|
11
|
+
* #### Example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
14
|
+
* const accountInfo = await algodClient.accountInformation(address)
|
|
15
|
+
* .exclude('all')
|
|
16
|
+
* .do();
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @param round
|
|
20
|
+
* @category query
|
|
21
|
+
*/
|
|
22
|
+
exclude(exclude: string): this;
|
|
8
23
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import ServiceClient from '../serviceClient';
|
|
2
2
|
import * as modelsv2 from './models/types';
|
|
3
3
|
import AccountInformation from './accountInformation';
|
|
4
|
+
import AccountAssetInformation from './accountAssetInformation';
|
|
5
|
+
import AccountApplicationInformation from './accountApplicationInformation';
|
|
4
6
|
import Block from './block';
|
|
5
7
|
import Compile from './compile';
|
|
6
8
|
import Dryrun from './dryrun';
|
|
@@ -108,6 +110,38 @@ export default class AlgodClient extends ServiceClient {
|
|
|
108
110
|
* @category GET
|
|
109
111
|
*/
|
|
110
112
|
accountInformation(account: string): AccountInformation;
|
|
113
|
+
/**
|
|
114
|
+
* Returns the given account's asset information for a specific asset.
|
|
115
|
+
*
|
|
116
|
+
* #### Example
|
|
117
|
+
* ```typescript
|
|
118
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
119
|
+
* const index = 60553466;
|
|
120
|
+
* const accountAssetInfo = await algodClient.accountAssetInformation(address, index).do();
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2accountsaddress)
|
|
124
|
+
* @param account - The address of the account to look up.
|
|
125
|
+
* @param index - The asset ID to look up.
|
|
126
|
+
* @category GET
|
|
127
|
+
*/
|
|
128
|
+
accountAssetInformation(account: string, index: number): AccountAssetInformation;
|
|
129
|
+
/**
|
|
130
|
+
* Returns the given account's application information for a specific application.
|
|
131
|
+
*
|
|
132
|
+
* #### Example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
135
|
+
* const index = 60553466;
|
|
136
|
+
* const accountInfo = await algodClient.accountApplicationInformation(address).do();
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2accountsaddress)
|
|
140
|
+
* @param account - The address of the account to look up.
|
|
141
|
+
* @param index - The application ID to look up.
|
|
142
|
+
* @category GET
|
|
143
|
+
*/
|
|
144
|
+
accountApplicationInformation(account: string, index: number): AccountApplicationInformation;
|
|
111
145
|
/**
|
|
112
146
|
* Gets the block info for the given round.
|
|
113
147
|
*
|
|
@@ -49,6 +49,24 @@ export declare class Account extends BaseModel {
|
|
|
49
49
|
* delegator nor a delegate.
|
|
50
50
|
*/
|
|
51
51
|
status: string;
|
|
52
|
+
/**
|
|
53
|
+
* The count of all applications that have been opted in, equivalent to the count
|
|
54
|
+
* of application local data (AppLocalState objects) stored in this account.
|
|
55
|
+
*/
|
|
56
|
+
totalAppsOptedIn: number | bigint;
|
|
57
|
+
/**
|
|
58
|
+
* The count of all assets that have been opted in, equivalent to the count of
|
|
59
|
+
* AssetHolding objects held by this account.
|
|
60
|
+
*/
|
|
61
|
+
totalAssetsOptedIn: number | bigint;
|
|
62
|
+
/**
|
|
63
|
+
* The count of all apps (AppParams objects) created by this account.
|
|
64
|
+
*/
|
|
65
|
+
totalCreatedApps: number | bigint;
|
|
66
|
+
/**
|
|
67
|
+
* The count of all assets (AssetParams objects) created by this account.
|
|
68
|
+
*/
|
|
69
|
+
totalCreatedAssets: number | bigint;
|
|
52
70
|
/**
|
|
53
71
|
* (appl) applications local data stored in this account.
|
|
54
72
|
* Note the raw object uses `map[int] -> AppLocalState` for this type.
|
|
@@ -120,6 +138,12 @@ export declare class Account extends BaseModel {
|
|
|
120
138
|
* pool.
|
|
121
139
|
* * NotParticipating - indicates that the associated account is neither a
|
|
122
140
|
* delegator nor a delegate.
|
|
141
|
+
* @param totalAppsOptedIn - The count of all applications that have been opted in, equivalent to the count
|
|
142
|
+
* of application local data (AppLocalState objects) stored in this account.
|
|
143
|
+
* @param totalAssetsOptedIn - The count of all assets that have been opted in, equivalent to the count of
|
|
144
|
+
* AssetHolding objects held by this account.
|
|
145
|
+
* @param totalCreatedApps - The count of all apps (AppParams objects) created by this account.
|
|
146
|
+
* @param totalCreatedAssets - The count of all assets (AssetParams objects) created by this account.
|
|
123
147
|
* @param appsLocalState - (appl) applications local data stored in this account.
|
|
124
148
|
* Note the raw object uses `map[int] -> AppLocalState` for this type.
|
|
125
149
|
* @param appsTotalExtraPages - (teap) the sum of all extra application program pages for this account.
|
|
@@ -145,7 +169,7 @@ export declare class Account extends BaseModel {
|
|
|
145
169
|
* * msig
|
|
146
170
|
* * lsig
|
|
147
171
|
*/
|
|
148
|
-
constructor({ address, amount, amountWithoutPendingRewards, minBalance, pendingRewards, rewards, round, status, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, createdApps, createdAssets, participation, rewardBase, sigType, }: {
|
|
172
|
+
constructor({ address, amount, amountWithoutPendingRewards, minBalance, pendingRewards, rewards, round, status, totalAppsOptedIn, totalAssetsOptedIn, totalCreatedApps, totalCreatedAssets, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, createdApps, createdAssets, participation, rewardBase, sigType, }: {
|
|
149
173
|
address: string;
|
|
150
174
|
amount: number | bigint;
|
|
151
175
|
amountWithoutPendingRewards: number | bigint;
|
|
@@ -154,6 +178,10 @@ export declare class Account extends BaseModel {
|
|
|
154
178
|
rewards: number | bigint;
|
|
155
179
|
round: number | bigint;
|
|
156
180
|
status: string;
|
|
181
|
+
totalAppsOptedIn: number | bigint;
|
|
182
|
+
totalAssetsOptedIn: number | bigint;
|
|
183
|
+
totalCreatedApps: number | bigint;
|
|
184
|
+
totalCreatedAssets: number | bigint;
|
|
157
185
|
appsLocalState?: ApplicationLocalState[];
|
|
158
186
|
appsTotalExtraPages?: number | bigint;
|
|
159
187
|
appsTotalSchema?: ApplicationStateSchema;
|
|
@@ -166,6 +194,69 @@ export declare class Account extends BaseModel {
|
|
|
166
194
|
sigType?: string;
|
|
167
195
|
});
|
|
168
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* AccountApplicationResponse describes the account's application local state and
|
|
199
|
+
* global state (AppLocalState and AppParams, if either exists) for a specific
|
|
200
|
+
* application ID. Global state will only be returned if the provided address is
|
|
201
|
+
* the application's creator.
|
|
202
|
+
*/
|
|
203
|
+
export declare class AccountApplicationResponse extends BaseModel {
|
|
204
|
+
/**
|
|
205
|
+
* The round for which this information is relevant.
|
|
206
|
+
*/
|
|
207
|
+
round: number | bigint;
|
|
208
|
+
/**
|
|
209
|
+
* (appl) the application local data stored in this account.
|
|
210
|
+
* The raw account uses `AppLocalState` for this type.
|
|
211
|
+
*/
|
|
212
|
+
appLocalState?: ApplicationLocalState;
|
|
213
|
+
/**
|
|
214
|
+
* (appp) parameters of the application created by this account including app
|
|
215
|
+
* global data.
|
|
216
|
+
* The raw account uses `AppParams` for this type.
|
|
217
|
+
*/
|
|
218
|
+
createdApp?: ApplicationParams;
|
|
219
|
+
/**
|
|
220
|
+
* Creates a new `AccountApplicationResponse` object.
|
|
221
|
+
* @param round - The round for which this information is relevant.
|
|
222
|
+
* @param appLocalState - (appl) the application local data stored in this account.
|
|
223
|
+
* The raw account uses `AppLocalState` for this type.
|
|
224
|
+
* @param createdApp - (appp) parameters of the application created by this account including app
|
|
225
|
+
* global data.
|
|
226
|
+
* The raw account uses `AppParams` for this type.
|
|
227
|
+
*/
|
|
228
|
+
constructor(round: number | bigint, appLocalState?: ApplicationLocalState, createdApp?: ApplicationParams);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* AccountAssetResponse describes the account's asset holding and asset parameters
|
|
232
|
+
* (if either exist) for a specific asset ID. Asset parameters will only be
|
|
233
|
+
* returned if the provided address is the asset's creator.
|
|
234
|
+
*/
|
|
235
|
+
export declare class AccountAssetResponse extends BaseModel {
|
|
236
|
+
/**
|
|
237
|
+
* The round for which this information is relevant.
|
|
238
|
+
*/
|
|
239
|
+
round: number | bigint;
|
|
240
|
+
/**
|
|
241
|
+
* (asset) Details about the asset held by this account.
|
|
242
|
+
* The raw account uses `AssetHolding` for this type.
|
|
243
|
+
*/
|
|
244
|
+
assetHolding?: AssetHolding;
|
|
245
|
+
/**
|
|
246
|
+
* (apar) parameters of the asset created by this account.
|
|
247
|
+
* The raw account uses `AssetParams` for this type.
|
|
248
|
+
*/
|
|
249
|
+
createdAsset?: AssetParams;
|
|
250
|
+
/**
|
|
251
|
+
* Creates a new `AccountAssetResponse` object.
|
|
252
|
+
* @param round - The round for which this information is relevant.
|
|
253
|
+
* @param assetHolding - (asset) Details about the asset held by this account.
|
|
254
|
+
* The raw account uses `AssetHolding` for this type.
|
|
255
|
+
* @param createdAsset - (apar) parameters of the asset created by this account.
|
|
256
|
+
* The raw account uses `AssetParams` for this type.
|
|
257
|
+
*/
|
|
258
|
+
constructor(round: number | bigint, assetHolding?: AssetHolding, createdAsset?: AssetParams);
|
|
259
|
+
}
|
|
169
260
|
/**
|
|
170
261
|
* AccountParticipation describes the parameters used by this account in consensus
|
|
171
262
|
* protocol.
|
|
@@ -386,12 +477,6 @@ export declare class AssetHolding extends BaseModel {
|
|
|
386
477
|
* Asset ID of the holding.
|
|
387
478
|
*/
|
|
388
479
|
assetId: number | bigint;
|
|
389
|
-
/**
|
|
390
|
-
* Address that created this asset. This is the address where the parameters for
|
|
391
|
-
* this asset can be found, and also the address where unwanted asset units can be
|
|
392
|
-
* sent in the worst case.
|
|
393
|
-
*/
|
|
394
|
-
creator: string;
|
|
395
480
|
/**
|
|
396
481
|
* (f) whether or not the holding is frozen.
|
|
397
482
|
*/
|
|
@@ -400,12 +485,9 @@ export declare class AssetHolding extends BaseModel {
|
|
|
400
485
|
* Creates a new `AssetHolding` object.
|
|
401
486
|
* @param amount - (a) number of units held.
|
|
402
487
|
* @param assetId - Asset ID of the holding.
|
|
403
|
-
* @param creator - Address that created this asset. This is the address where the parameters for
|
|
404
|
-
* this asset can be found, and also the address where unwanted asset units can be
|
|
405
|
-
* sent in the worst case.
|
|
406
488
|
* @param isFrozen - (f) whether or not the holding is frozen.
|
|
407
489
|
*/
|
|
408
|
-
constructor(amount: number | bigint, assetId: number | bigint,
|
|
490
|
+
constructor(amount: number | bigint, assetId: number | bigint, isFrozen: boolean);
|
|
409
491
|
}
|
|
410
492
|
/**
|
|
411
493
|
* AssetParams specifies the parameters for an asset.
|
|
@@ -807,13 +889,13 @@ export declare class DryrunTxnResult extends BaseModel {
|
|
|
807
889
|
*/
|
|
808
890
|
export declare class ErrorResponse extends BaseModel {
|
|
809
891
|
message: string;
|
|
810
|
-
data?: string
|
|
892
|
+
data?: Record<string, any>;
|
|
811
893
|
/**
|
|
812
894
|
* Creates a new `ErrorResponse` object.
|
|
813
895
|
* @param message -
|
|
814
896
|
* @param data -
|
|
815
897
|
*/
|
|
816
|
-
constructor(message: string, data?: string);
|
|
898
|
+
constructor(message: string, data?: Record<string, any>);
|
|
817
899
|
}
|
|
818
900
|
/**
|
|
819
901
|
* Represents a TEAL value delta.
|
|
@@ -6,6 +6,10 @@ import LookupAccountTransactions from './lookupAccountTransactions';
|
|
|
6
6
|
import LookupBlock from './lookupBlock';
|
|
7
7
|
import LookupTransactionByID from './lookupTransactionByID';
|
|
8
8
|
import LookupAccountByID from './lookupAccountByID';
|
|
9
|
+
import LookupAccountAssets from './lookupAccountAssets';
|
|
10
|
+
import LookupAccountCreatedAssets from './lookupAccountCreatedAssets';
|
|
11
|
+
import LookupAccountAppLocalStates from './lookupAccountAppLocalStates';
|
|
12
|
+
import LookupAccountCreatedApplications from './lookupAccountCreatedApplications';
|
|
9
13
|
import LookupAssetByID from './lookupAssetByID';
|
|
10
14
|
import LookupApplications from './lookupApplications';
|
|
11
15
|
import LookupApplicationLogs from './lookupApplicationLogs';
|
|
@@ -149,6 +153,62 @@ export default class IndexerClient extends ServiceClient {
|
|
|
149
153
|
* @category GET
|
|
150
154
|
*/
|
|
151
155
|
lookupAccountByID(account: string): LookupAccountByID;
|
|
156
|
+
/**
|
|
157
|
+
* Returns asset about the given account.
|
|
158
|
+
*
|
|
159
|
+
* #### Example
|
|
160
|
+
* ```typescript
|
|
161
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
162
|
+
* const accountInfo = await indexerClient.lookupAccountAssets(address).do();
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
|
|
166
|
+
* @param account - The address of the account to look up.
|
|
167
|
+
* @category GET
|
|
168
|
+
*/
|
|
169
|
+
lookupAccountAssets(account: string): LookupAccountAssets;
|
|
170
|
+
/**
|
|
171
|
+
* Returns asset information created by the given account.
|
|
172
|
+
*
|
|
173
|
+
* #### Example
|
|
174
|
+
* ```typescript
|
|
175
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
176
|
+
* const accountInfo = await indexerClient.lookupAccountCreatedAssets(address).do();
|
|
177
|
+
* ```
|
|
178
|
+
*
|
|
179
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
|
|
180
|
+
* @param account - The address of the account to look up.
|
|
181
|
+
* @category GET
|
|
182
|
+
*/
|
|
183
|
+
lookupAccountCreatedAssets(account: string): LookupAccountCreatedAssets;
|
|
184
|
+
/**
|
|
185
|
+
* Returns application local state about the given account.
|
|
186
|
+
*
|
|
187
|
+
* #### Example
|
|
188
|
+
* ```typescript
|
|
189
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
190
|
+
* const accountInfo = await indexerClient.lookupAccountAppLocalStates(address).do();
|
|
191
|
+
* ```
|
|
192
|
+
*
|
|
193
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
|
|
194
|
+
* @param account - The address of the account to look up.
|
|
195
|
+
* @category GET
|
|
196
|
+
*/
|
|
197
|
+
lookupAccountAppLocalStates(account: string): LookupAccountAppLocalStates;
|
|
198
|
+
/**
|
|
199
|
+
* Returns application information created by the given account.
|
|
200
|
+
*
|
|
201
|
+
* #### Example
|
|
202
|
+
* ```typescript
|
|
203
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
204
|
+
* const accountInfo = await indexerClient.lookupAccountCreatedApplications(address).do();
|
|
205
|
+
* ```
|
|
206
|
+
*
|
|
207
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
|
|
208
|
+
* @param account - The address of the account to look up.
|
|
209
|
+
* @category GET
|
|
210
|
+
*/
|
|
211
|
+
lookupAccountCreatedApplications(account: string): LookupAccountCreatedApplications;
|
|
152
212
|
/**
|
|
153
213
|
* Returns information about the passed asset.
|
|
154
214
|
*
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import HTTPClient from '../../client';
|
|
3
|
+
import IntDecoding from '../../../types/intDecoding';
|
|
4
|
+
export default class LookupAccountAppLocalStates extends JSONRequest {
|
|
5
|
+
private account;
|
|
6
|
+
constructor(c: HTTPClient, intDecoding: IntDecoding, account: string);
|
|
7
|
+
path(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Add a limit for filter.
|
|
10
|
+
*
|
|
11
|
+
* #### Example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
14
|
+
* const maxResults = 20;
|
|
15
|
+
* const accountAssets = await indexerClient
|
|
16
|
+
* .lookupAccountAppLocalStates(address)
|
|
17
|
+
* .limit(maxResults)
|
|
18
|
+
* .do();
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @param limit - maximum number of results to return.
|
|
22
|
+
*/
|
|
23
|
+
limit(limit: number): this;
|
|
24
|
+
/**
|
|
25
|
+
* Specify round to filter with.
|
|
26
|
+
*
|
|
27
|
+
* #### Example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
30
|
+
* const targetBlock = 18309917;
|
|
31
|
+
* const accountAssets = await indexerClient
|
|
32
|
+
* .lookupAccountAppLocalStates(address)
|
|
33
|
+
* .round(targetBlock)
|
|
34
|
+
* .do();
|
|
35
|
+
* ```
|
|
36
|
+
* @param round
|
|
37
|
+
*/
|
|
38
|
+
round(round: number): this;
|
|
39
|
+
/**
|
|
40
|
+
* Specify the next page of results.
|
|
41
|
+
*
|
|
42
|
+
* #### Example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
45
|
+
* const maxResults = 20;
|
|
46
|
+
* const nextToken = "APA6C7C3NCANRPIBUWQOF7WSKLJMK6RPQUVFLLDV4U5WCQE4DEF26D4E3E";
|
|
47
|
+
* const accountAssets = await indexerClient
|
|
48
|
+
* .lookupAccountAppLocalStates(address)
|
|
49
|
+
* .limit(maxResults)
|
|
50
|
+
* .next(nextToken)
|
|
51
|
+
* .do();
|
|
52
|
+
* ```
|
|
53
|
+
* @param nextToken - provided by the previous results.
|
|
54
|
+
*/
|
|
55
|
+
nextToken(nextToken: string): this;
|
|
56
|
+
/**
|
|
57
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
58
|
+
*
|
|
59
|
+
* #### Example
|
|
60
|
+
* ```typescript
|
|
61
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
62
|
+
* const accountAssets = await indexerClient
|
|
63
|
+
* .lookupAccountAppLocalStates(address)
|
|
64
|
+
* .includeAll(false)
|
|
65
|
+
* .do();
|
|
66
|
+
* ```
|
|
67
|
+
* @param value
|
|
68
|
+
*/
|
|
69
|
+
includeAll(value?: boolean): this;
|
|
70
|
+
/**
|
|
71
|
+
* Specify an applicationID to search for
|
|
72
|
+
*
|
|
73
|
+
* #### Example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const applicationID = 163650;
|
|
76
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
77
|
+
* const accountApplications = await indexerClient
|
|
78
|
+
* .lookupAccountAppLocalStates(address)
|
|
79
|
+
* .applicationID(applicationID)
|
|
80
|
+
* .do();
|
|
81
|
+
* ```
|
|
82
|
+
* @param index - the applicationID
|
|
83
|
+
*/
|
|
84
|
+
applicationID(index: number): this;
|
|
85
|
+
}
|