@alephium/web3 1.8.3 → 1.8.4

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.
@@ -506,6 +506,7 @@ export interface CompilerOptions {
506
506
  ignoreUpdateFieldsCheckWarnings?: boolean;
507
507
  ignoreCheckExternalCallerWarnings?: boolean;
508
508
  ignoreUnusedFunctionReturnWarnings?: boolean;
509
+ skipAbstractContractCheck?: boolean;
509
510
  }
510
511
  /** Confirmed */
511
512
  export interface Confirmed {
@@ -1325,7 +1326,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
1325
1326
  }
1326
1327
  /**
1327
1328
  * @title Alephium API
1328
- * @version 3.8.1
1329
+ * @version 3.8.6
1329
1330
  * @baseUrl ../
1330
1331
  */
1331
1332
  export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
@@ -151,7 +151,7 @@ class HttpClient {
151
151
  exports.HttpClient = HttpClient;
152
152
  /**
153
153
  * @title Alephium API
154
- * @version 3.8.1
154
+ * @version 3.8.6
155
155
  * @baseUrl ../
156
156
  */
157
157
  class Api extends HttpClient {
@@ -430,6 +430,16 @@ export interface PerChainDuration {
430
430
  export type StdInterfaceId = FungibleToken | NFT | NFTCollection | NFTCollectionWithRoyalty | NonStandard | Unknown;
431
431
  /** Output */
432
432
  export type Output = AssetOutput | ContractOutput;
433
+ /** TransactionInfo */
434
+ export interface TransactionInfo {
435
+ /** @format block-hash */
436
+ blockHash: string;
437
+ coinbase: boolean;
438
+ /** @format 32-byte-hash */
439
+ hash: string;
440
+ /** @format int64 */
441
+ timestamp: number;
442
+ }
433
443
  /** Unauthorized */
434
444
  export interface Unauthorized {
435
445
  detail: string;
@@ -446,11 +456,18 @@ export interface ValAddress {
446
456
  /** @format address */
447
457
  value: string;
448
458
  }
459
+ export declare enum PaginationPageDefault {
460
+ Value1 = 1
461
+ }
449
462
  /** ValBool */
450
463
  export interface ValBool {
451
464
  type: string;
452
465
  value: boolean;
453
466
  }
467
+ export declare enum PaginationLimitMax {
468
+ Value100 = 100,
469
+ Value20 = 20
470
+ }
454
471
  /** FungibleTokenMetadata */
455
472
  export interface FungibleTokenMetadata {
456
473
  symbol: string;
@@ -477,6 +494,10 @@ export declare enum Currencies {
477
494
  Cad = "cad",
478
495
  Aud = "aud"
479
496
  }
497
+ export declare enum PaginationLimitDefault {
498
+ Value20 = 20,
499
+ Value10 = 10
500
+ }
480
501
  /** AddressInfo */
481
502
  export interface AddressInfo {
482
503
  /** @format uint256 */
@@ -703,6 +724,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
703
724
  */
704
725
  limit?: number;
705
726
  }, params?: RequestParams) => Promise<Transaction[]>;
727
+ /**
728
+ * @description Get latest transaction information of a given address
729
+ *
730
+ * @tags Addresses
731
+ * @name GetAddressesAddressLatestTransaction
732
+ * @request GET:/addresses/{address}/latest-transaction
733
+ */
734
+ getAddressesAddressLatestTransaction: (address: string, params?: RequestParams) => Promise<TransactionInfo>;
706
735
  /**
707
736
  * @description Get total transactions of a given address
708
737
  *
@@ -739,7 +768,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
739
768
  * Number of items per page
740
769
  * @format int32
741
770
  * @min 0
742
- * @max 1000
771
+ * @max 100
743
772
  */
744
773
  limit?: number;
745
774
  }, params?: RequestParams) => Promise<Transaction[]>;
@@ -793,6 +822,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
793
822
  * @request POST:/addresses/transactions
794
823
  */
795
824
  postAddressesTransactions: (query?: {
825
+ /**
826
+ * inclusive
827
+ * @format int64
828
+ * @min 0
829
+ */
830
+ fromTs?: number;
831
+ /**
832
+ * exclusive
833
+ * @format int64
834
+ * @min 0
835
+ */
836
+ toTs?: number;
796
837
  /**
797
838
  * Page number
798
839
  * @format int32
@@ -10,7 +10,7 @@
10
10
  * ---------------------------------------------------------------
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.Api = exports.HttpClient = exports.ContentType = exports.Currencies = exports.MaxSizeAddresses = exports.MaxSizeAddressesForTokens = exports.MaxSizeTokens = exports.TokensWithPrice = exports.TokenStdInterfaceId = exports.IntervalType = void 0;
13
+ exports.Api = exports.HttpClient = exports.ContentType = exports.PaginationLimitDefault = exports.Currencies = exports.MaxSizeAddresses = exports.PaginationLimitMax = exports.PaginationPageDefault = exports.MaxSizeAddressesForTokens = exports.MaxSizeTokens = exports.TokensWithPrice = exports.TokenStdInterfaceId = exports.IntervalType = void 0;
14
14
  /** IntervalType */
15
15
  var IntervalType;
16
16
  (function (IntervalType) {
@@ -43,6 +43,15 @@ var MaxSizeAddressesForTokens;
43
43
  (function (MaxSizeAddressesForTokens) {
44
44
  MaxSizeAddressesForTokens[MaxSizeAddressesForTokens["Value80"] = 80] = "Value80";
45
45
  })(MaxSizeAddressesForTokens = exports.MaxSizeAddressesForTokens || (exports.MaxSizeAddressesForTokens = {}));
46
+ var PaginationPageDefault;
47
+ (function (PaginationPageDefault) {
48
+ PaginationPageDefault[PaginationPageDefault["Value1"] = 1] = "Value1";
49
+ })(PaginationPageDefault = exports.PaginationPageDefault || (exports.PaginationPageDefault = {}));
50
+ var PaginationLimitMax;
51
+ (function (PaginationLimitMax) {
52
+ PaginationLimitMax[PaginationLimitMax["Value100"] = 100] = "Value100";
53
+ PaginationLimitMax[PaginationLimitMax["Value20"] = 20] = "Value20";
54
+ })(PaginationLimitMax = exports.PaginationLimitMax || (exports.PaginationLimitMax = {}));
46
55
  var MaxSizeAddresses;
47
56
  (function (MaxSizeAddresses) {
48
57
  MaxSizeAddresses[MaxSizeAddresses["Value80"] = 80] = "Value80";
@@ -62,6 +71,11 @@ var Currencies;
62
71
  Currencies["Cad"] = "cad";
63
72
  Currencies["Aud"] = "aud";
64
73
  })(Currencies = exports.Currencies || (exports.Currencies = {}));
74
+ var PaginationLimitDefault;
75
+ (function (PaginationLimitDefault) {
76
+ PaginationLimitDefault[PaginationLimitDefault["Value20"] = 20] = "Value20";
77
+ PaginationLimitDefault[PaginationLimitDefault["Value10"] = 10] = "Value10";
78
+ })(PaginationLimitDefault = exports.PaginationLimitDefault || (exports.PaginationLimitDefault = {}));
65
79
  require("cross-fetch/polyfill");
66
80
  const utils_1 = require("./utils");
67
81
  var ContentType;
@@ -319,6 +333,19 @@ class Api extends HttpClient {
319
333
  format: 'json',
320
334
  ...params
321
335
  }).then(utils_1.convertHttpResponse),
336
+ /**
337
+ * @description Get latest transaction information of a given address
338
+ *
339
+ * @tags Addresses
340
+ * @name GetAddressesAddressLatestTransaction
341
+ * @request GET:/addresses/{address}/latest-transaction
342
+ */
343
+ getAddressesAddressLatestTransaction: (address, params = {}) => this.request({
344
+ path: `/addresses/${address}/latest-transaction`,
345
+ method: 'GET',
346
+ format: 'json',
347
+ ...params
348
+ }).then(utils_1.convertHttpResponse),
322
349
  /**
323
350
  * @description Get total transactions of a given address
324
351
  *
@@ -62,7 +62,8 @@ exports.DEFAULT_NODE_COMPILER_OPTIONS = {
62
62
  ignoreUnusedPrivateFunctionsWarnings: false,
63
63
  ignoreUpdateFieldsCheckWarnings: false,
64
64
  ignoreCheckExternalCallerWarnings: false,
65
- ignoreUnusedFunctionReturnWarnings: false
65
+ ignoreUnusedFunctionReturnWarnings: false,
66
+ skipAbstractContractCheck: false
66
67
  };
67
68
  exports.DEFAULT_COMPILER_OPTIONS = { errorOnWarnings: true, ...exports.DEFAULT_NODE_COMPILER_OPTIONS };
68
69
  class Struct {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alephium/web3",
3
- "version": "1.8.3",
3
+ "version": "1.8.4",
4
4
  "description": "A JS/TS library to interact with the Alephium platform",
5
5
  "license": "GPL",
6
6
  "main": "dist/src/index.js",
@@ -33,8 +33,8 @@
33
33
  },
34
34
  "author": "Alephium dev <dev@alephium.org>",
35
35
  "config": {
36
- "alephium_version": "3.8.1",
37
- "explorer_backend_version": "2.2.3"
36
+ "alephium_version": "3.8.6",
37
+ "explorer_backend_version": "2.2.6"
38
38
  },
39
39
  "type": "commonjs",
40
40
  "dependencies": {
@@ -571,6 +571,7 @@ export interface CompilerOptions {
571
571
  ignoreUpdateFieldsCheckWarnings?: boolean
572
572
  ignoreCheckExternalCallerWarnings?: boolean
573
573
  ignoreUnusedFunctionReturnWarnings?: boolean
574
+ skipAbstractContractCheck?: boolean
574
575
  }
575
576
 
576
577
  /** Confirmed */
@@ -1650,7 +1651,7 @@ export class HttpClient<SecurityDataType = unknown> {
1650
1651
 
1651
1652
  /**
1652
1653
  * @title Alephium API
1653
- * @version 3.8.1
1654
+ * @version 3.8.6
1654
1655
  * @baseUrl ../
1655
1656
  */
1656
1657
  export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
@@ -491,6 +491,17 @@ export type StdInterfaceId = FungibleToken | NFT | NFTCollection | NFTCollection
491
491
  /** Output */
492
492
  export type Output = AssetOutput | ContractOutput
493
493
 
494
+ /** TransactionInfo */
495
+ export interface TransactionInfo {
496
+ /** @format block-hash */
497
+ blockHash: string
498
+ coinbase: boolean
499
+ /** @format 32-byte-hash */
500
+ hash: string
501
+ /** @format int64 */
502
+ timestamp: number
503
+ }
504
+
494
505
  /** Unauthorized */
495
506
  export interface Unauthorized {
496
507
  detail: string
@@ -510,12 +521,21 @@ export interface ValAddress {
510
521
  value: string
511
522
  }
512
523
 
524
+ export enum PaginationPageDefault {
525
+ Value1 = 1
526
+ }
527
+
513
528
  /** ValBool */
514
529
  export interface ValBool {
515
530
  type: string
516
531
  value: boolean
517
532
  }
518
533
 
534
+ export enum PaginationLimitMax {
535
+ Value100 = 100,
536
+ Value20 = 20
537
+ }
538
+
519
539
  /** FungibleTokenMetadata */
520
540
  export interface FungibleTokenMetadata {
521
541
  symbol: string
@@ -545,6 +565,11 @@ export enum Currencies {
545
565
  Aud = 'aud'
546
566
  }
547
567
 
568
+ export enum PaginationLimitDefault {
569
+ Value20 = 20,
570
+ Value10 = 10
571
+ }
572
+
548
573
  /** AddressInfo */
549
574
  export interface AddressInfo {
550
575
  /** @format uint256 */
@@ -1008,6 +1033,21 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
1008
1033
  ...params
1009
1034
  }).then(convertHttpResponse),
1010
1035
 
1036
+ /**
1037
+ * @description Get latest transaction information of a given address
1038
+ *
1039
+ * @tags Addresses
1040
+ * @name GetAddressesAddressLatestTransaction
1041
+ * @request GET:/addresses/{address}/latest-transaction
1042
+ */
1043
+ getAddressesAddressLatestTransaction: (address: string, params: RequestParams = {}) =>
1044
+ this.request<TransactionInfo, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
1045
+ path: `/addresses/${address}/latest-transaction`,
1046
+ method: 'GET',
1047
+ format: 'json',
1048
+ ...params
1049
+ }).then(convertHttpResponse),
1050
+
1011
1051
  /**
1012
1052
  * @description Get total transactions of a given address
1013
1053
  *
@@ -1053,7 +1093,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
1053
1093
  * Number of items per page
1054
1094
  * @format int32
1055
1095
  * @min 0
1056
- * @max 1000
1096
+ * @max 100
1057
1097
  */
1058
1098
  limit?: number
1059
1099
  },
@@ -1142,6 +1182,18 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
1142
1182
  */
1143
1183
  postAddressesTransactions: (
1144
1184
  query?: {
1185
+ /**
1186
+ * inclusive
1187
+ * @format int64
1188
+ * @min 0
1189
+ */
1190
+ fromTs?: number
1191
+ /**
1192
+ * exclusive
1193
+ * @format int64
1194
+ * @min 0
1195
+ */
1196
+ toTs?: number
1145
1197
  /**
1146
1198
  * Page number
1147
1199
  * @format int32
@@ -115,7 +115,8 @@ export const DEFAULT_NODE_COMPILER_OPTIONS: node.CompilerOptions = {
115
115
  ignoreUnusedPrivateFunctionsWarnings: false,
116
116
  ignoreUpdateFieldsCheckWarnings: false,
117
117
  ignoreCheckExternalCallerWarnings: false,
118
- ignoreUnusedFunctionReturnWarnings: false
118
+ ignoreUnusedFunctionReturnWarnings: false,
119
+ skipAbstractContractCheck: false
119
120
  }
120
121
 
121
122
  export const DEFAULT_COMPILER_OPTIONS: CompilerOptions = { errorOnWarnings: true, ...DEFAULT_NODE_COMPILER_OPTIONS }