@alephium/web3 0.11.1 → 0.11.3
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/dist/alephium-web3.min.js +1 -1
- package/dist/alephium-web3.min.js.map +1 -1
- package/dist/src/api/api-alephium.d.ts +10 -1
- package/dist/src/api/api-alephium.js +15 -1
- package/dist/src/api/api-explorer.d.ts +35 -2
- package/dist/src/api/api-explorer.js +17 -2
- package/package.json +3 -3
- package/src/api/api-alephium.ts +17 -1
- package/src/api/api-explorer.ts +52 -2
|
@@ -929,7 +929,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
929
929
|
}
|
|
930
930
|
/**
|
|
931
931
|
* @title Alephium API
|
|
932
|
-
* @version 2.2.
|
|
932
|
+
* @version 2.2.2
|
|
933
933
|
* @baseUrl ../
|
|
934
934
|
*/
|
|
935
935
|
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
@@ -1235,6 +1235,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1235
1235
|
*/
|
|
1236
1236
|
timespan?: number;
|
|
1237
1237
|
}, params?: RequestParams) => Promise<string>;
|
|
1238
|
+
/**
|
|
1239
|
+
* No description
|
|
1240
|
+
*
|
|
1241
|
+
* @tags Infos
|
|
1242
|
+
* @name GetInfosCurrentDifficulty
|
|
1243
|
+
* @summary Get the average difficulty of the latest blocks from all shards
|
|
1244
|
+
* @request GET:/infos/current-difficulty
|
|
1245
|
+
*/
|
|
1246
|
+
getInfosCurrentDifficulty: (params?: RequestParams) => Promise<string>;
|
|
1238
1247
|
};
|
|
1239
1248
|
blockflow: {
|
|
1240
1249
|
/**
|
|
@@ -151,7 +151,7 @@ class HttpClient {
|
|
|
151
151
|
exports.HttpClient = HttpClient;
|
|
152
152
|
/**
|
|
153
153
|
* @title Alephium API
|
|
154
|
-
* @version 2.2.
|
|
154
|
+
* @version 2.2.2
|
|
155
155
|
* @baseUrl ../
|
|
156
156
|
*/
|
|
157
157
|
class Api extends HttpClient {
|
|
@@ -614,6 +614,20 @@ class Api extends HttpClient {
|
|
|
614
614
|
query: query,
|
|
615
615
|
format: 'json',
|
|
616
616
|
...params
|
|
617
|
+
}).then(utils_1.convertHttpResponse),
|
|
618
|
+
/**
|
|
619
|
+
* No description
|
|
620
|
+
*
|
|
621
|
+
* @tags Infos
|
|
622
|
+
* @name GetInfosCurrentDifficulty
|
|
623
|
+
* @summary Get the average difficulty of the latest blocks from all shards
|
|
624
|
+
* @request GET:/infos/current-difficulty
|
|
625
|
+
*/
|
|
626
|
+
getInfosCurrentDifficulty: (params = {}) => this.request({
|
|
627
|
+
path: `/infos/current-difficulty`,
|
|
628
|
+
method: 'GET',
|
|
629
|
+
format: 'json',
|
|
630
|
+
...params
|
|
617
631
|
}).then(utils_1.convertHttpResponse)
|
|
618
632
|
};
|
|
619
633
|
this.blockflow = {
|
|
@@ -360,7 +360,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
360
360
|
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
361
361
|
blocks: {
|
|
362
362
|
/**
|
|
363
|
-
* @description List blocks
|
|
363
|
+
* @description List latest blocks
|
|
364
364
|
*
|
|
365
365
|
* @tags Blocks
|
|
366
366
|
* @name GetBlocks
|
|
@@ -533,7 +533,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
533
533
|
* @name GetAddressesAddressTokens
|
|
534
534
|
* @request GET:/addresses/{address}/tokens
|
|
535
535
|
*/
|
|
536
|
-
getAddressesAddressTokens: (address: string,
|
|
536
|
+
getAddressesAddressTokens: (address: string, query?: {
|
|
537
|
+
/**
|
|
538
|
+
* Page number
|
|
539
|
+
* @format int32
|
|
540
|
+
*/
|
|
541
|
+
page?: number;
|
|
542
|
+
/**
|
|
543
|
+
* Number of items per page
|
|
544
|
+
* @format int32
|
|
545
|
+
*/
|
|
546
|
+
limit?: number;
|
|
547
|
+
/** Reverse pagination */
|
|
548
|
+
reverse?: boolean;
|
|
549
|
+
}, params?: RequestParams) => Promise<string[]>;
|
|
537
550
|
/**
|
|
538
551
|
* @description List address tokens
|
|
539
552
|
*
|
|
@@ -590,6 +603,26 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
590
603
|
*/
|
|
591
604
|
toTs: number;
|
|
592
605
|
}, params?: RequestParams) => Promise<string>;
|
|
606
|
+
/**
|
|
607
|
+
* No description
|
|
608
|
+
*
|
|
609
|
+
* @tags Addresses
|
|
610
|
+
* @name GetAddressesAddressAmountHistory
|
|
611
|
+
* @request GET:/addresses/{address}/amount-history
|
|
612
|
+
*/
|
|
613
|
+
getAddressesAddressAmountHistory: (address: string, query: {
|
|
614
|
+
/**
|
|
615
|
+
* @format int64
|
|
616
|
+
* @min 0
|
|
617
|
+
*/
|
|
618
|
+
fromTs: number;
|
|
619
|
+
/**
|
|
620
|
+
* @format int64
|
|
621
|
+
* @min 0
|
|
622
|
+
*/
|
|
623
|
+
toTs: number;
|
|
624
|
+
'interval-type': IntervalType;
|
|
625
|
+
}, params?: RequestParams) => Promise<string>;
|
|
593
626
|
};
|
|
594
627
|
infos: {
|
|
595
628
|
/**
|
|
@@ -163,7 +163,7 @@ class Api extends HttpClient {
|
|
|
163
163
|
super(...arguments);
|
|
164
164
|
this.blocks = {
|
|
165
165
|
/**
|
|
166
|
-
* @description List blocks
|
|
166
|
+
* @description List latest blocks
|
|
167
167
|
*
|
|
168
168
|
* @tags Blocks
|
|
169
169
|
* @name GetBlocks
|
|
@@ -323,9 +323,10 @@ class Api extends HttpClient {
|
|
|
323
323
|
* @name GetAddressesAddressTokens
|
|
324
324
|
* @request GET:/addresses/{address}/tokens
|
|
325
325
|
*/
|
|
326
|
-
getAddressesAddressTokens: (address, params = {}) => this.request({
|
|
326
|
+
getAddressesAddressTokens: (address, query, params = {}) => this.request({
|
|
327
327
|
path: `/addresses/${address}/tokens`,
|
|
328
328
|
method: 'GET',
|
|
329
|
+
query: query,
|
|
329
330
|
format: 'json',
|
|
330
331
|
...params
|
|
331
332
|
}).then(utils_1.convertHttpResponse),
|
|
@@ -383,6 +384,20 @@ class Api extends HttpClient {
|
|
|
383
384
|
method: 'GET',
|
|
384
385
|
query: query,
|
|
385
386
|
...params
|
|
387
|
+
}).then(utils_1.convertHttpResponse),
|
|
388
|
+
/**
|
|
389
|
+
* No description
|
|
390
|
+
*
|
|
391
|
+
* @tags Addresses
|
|
392
|
+
* @name GetAddressesAddressAmountHistory
|
|
393
|
+
* @request GET:/addresses/{address}/amount-history
|
|
394
|
+
*/
|
|
395
|
+
getAddressesAddressAmountHistory: (address, query, params = {}) => this.request({
|
|
396
|
+
path: `/addresses/${address}/amount-history`,
|
|
397
|
+
method: 'GET',
|
|
398
|
+
query: query,
|
|
399
|
+
format: 'json',
|
|
400
|
+
...params
|
|
386
401
|
}).then(utils_1.convertHttpResponse)
|
|
387
402
|
};
|
|
388
403
|
this.infos = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alephium/web3",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"description": "A JS/TS library to interact with the Alephium platform",
|
|
5
5
|
"license": "GPL",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
"author": "Alephium dev <dev@alephium.org>",
|
|
29
29
|
"config": {
|
|
30
|
-
"alephium_version": "2.2.
|
|
31
|
-
"explorer_backend_version": "1.13.
|
|
30
|
+
"alephium_version": "2.2.2",
|
|
31
|
+
"explorer_backend_version": "1.13.5"
|
|
32
32
|
},
|
|
33
33
|
"type": "commonjs",
|
|
34
34
|
"dependencies": {
|
package/src/api/api-alephium.ts
CHANGED
|
@@ -1217,7 +1217,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
1217
1217
|
|
|
1218
1218
|
/**
|
|
1219
1219
|
* @title Alephium API
|
|
1220
|
-
* @version 2.2.
|
|
1220
|
+
* @version 2.2.2
|
|
1221
1221
|
* @baseUrl ../
|
|
1222
1222
|
*/
|
|
1223
1223
|
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
@@ -1787,6 +1787,22 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
1787
1787
|
query: query,
|
|
1788
1788
|
format: 'json',
|
|
1789
1789
|
...params
|
|
1790
|
+
}).then(convertHttpResponse),
|
|
1791
|
+
|
|
1792
|
+
/**
|
|
1793
|
+
* No description
|
|
1794
|
+
*
|
|
1795
|
+
* @tags Infos
|
|
1796
|
+
* @name GetInfosCurrentDifficulty
|
|
1797
|
+
* @summary Get the average difficulty of the latest blocks from all shards
|
|
1798
|
+
* @request GET:/infos/current-difficulty
|
|
1799
|
+
*/
|
|
1800
|
+
getInfosCurrentDifficulty: (params: RequestParams = {}) =>
|
|
1801
|
+
this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
1802
|
+
path: `/infos/current-difficulty`,
|
|
1803
|
+
method: 'GET',
|
|
1804
|
+
format: 'json',
|
|
1805
|
+
...params
|
|
1790
1806
|
}).then(convertHttpResponse)
|
|
1791
1807
|
}
|
|
1792
1808
|
blockflow = {
|
package/src/api/api-explorer.ts
CHANGED
|
@@ -564,7 +564,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
564
564
|
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
565
565
|
blocks = {
|
|
566
566
|
/**
|
|
567
|
-
* @description List blocks
|
|
567
|
+
* @description List latest blocks
|
|
568
568
|
*
|
|
569
569
|
* @tags Blocks
|
|
570
570
|
* @name GetBlocks
|
|
@@ -841,10 +841,28 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
841
841
|
* @name GetAddressesAddressTokens
|
|
842
842
|
* @request GET:/addresses/{address}/tokens
|
|
843
843
|
*/
|
|
844
|
-
getAddressesAddressTokens: (
|
|
844
|
+
getAddressesAddressTokens: (
|
|
845
|
+
address: string,
|
|
846
|
+
query?: {
|
|
847
|
+
/**
|
|
848
|
+
* Page number
|
|
849
|
+
* @format int32
|
|
850
|
+
*/
|
|
851
|
+
page?: number
|
|
852
|
+
/**
|
|
853
|
+
* Number of items per page
|
|
854
|
+
* @format int32
|
|
855
|
+
*/
|
|
856
|
+
limit?: number
|
|
857
|
+
/** Reverse pagination */
|
|
858
|
+
reverse?: boolean
|
|
859
|
+
},
|
|
860
|
+
params: RequestParams = {}
|
|
861
|
+
) =>
|
|
845
862
|
this.request<string[], BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
846
863
|
path: `/addresses/${address}/tokens`,
|
|
847
864
|
method: 'GET',
|
|
865
|
+
query: query,
|
|
848
866
|
format: 'json',
|
|
849
867
|
...params
|
|
850
868
|
}).then(convertHttpResponse),
|
|
@@ -943,6 +961,38 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
943
961
|
method: 'GET',
|
|
944
962
|
query: query,
|
|
945
963
|
...params
|
|
964
|
+
}).then(convertHttpResponse),
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* No description
|
|
968
|
+
*
|
|
969
|
+
* @tags Addresses
|
|
970
|
+
* @name GetAddressesAddressAmountHistory
|
|
971
|
+
* @request GET:/addresses/{address}/amount-history
|
|
972
|
+
*/
|
|
973
|
+
getAddressesAddressAmountHistory: (
|
|
974
|
+
address: string,
|
|
975
|
+
query: {
|
|
976
|
+
/**
|
|
977
|
+
* @format int64
|
|
978
|
+
* @min 0
|
|
979
|
+
*/
|
|
980
|
+
fromTs: number
|
|
981
|
+
/**
|
|
982
|
+
* @format int64
|
|
983
|
+
* @min 0
|
|
984
|
+
*/
|
|
985
|
+
toTs: number
|
|
986
|
+
'interval-type': IntervalType
|
|
987
|
+
},
|
|
988
|
+
params: RequestParams = {}
|
|
989
|
+
) =>
|
|
990
|
+
this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
|
|
991
|
+
path: `/addresses/${address}/amount-history`,
|
|
992
|
+
method: 'GET',
|
|
993
|
+
query: query,
|
|
994
|
+
format: 'json',
|
|
995
|
+
...params
|
|
946
996
|
}).then(convertHttpResponse)
|
|
947
997
|
}
|
|
948
998
|
infos = {
|