@alephium/web3 2.0.10 → 2.0.11
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 +8 -2
- package/dist/src/api/api-alephium.js +1 -1
- package/dist/src/contract/contract.d.ts +1 -0
- package/dist/src/contract/contract.js +3 -0
- package/package.json +3 -3
- package/src/api/api-alephium.ts +8 -2
- package/src/contract/contract.ts +4 -0
|
@@ -646,6 +646,8 @@ export interface ContractEvent {
|
|
|
646
646
|
blockHash: string;
|
|
647
647
|
/** @format 32-byte-hash */
|
|
648
648
|
txId: string;
|
|
649
|
+
/** @format int64 */
|
|
650
|
+
timestamp: number;
|
|
649
651
|
/** @format int32 */
|
|
650
652
|
eventIndex: number;
|
|
651
653
|
fields: Val[];
|
|
@@ -654,6 +656,8 @@ export interface ContractEvent {
|
|
|
654
656
|
export interface ContractEventByBlockHash {
|
|
655
657
|
/** @format 32-byte-hash */
|
|
656
658
|
txId: string;
|
|
659
|
+
/** @format int64 */
|
|
660
|
+
timestamp: number;
|
|
657
661
|
/** @format address */
|
|
658
662
|
contractAddress: string;
|
|
659
663
|
/** @format int32 */
|
|
@@ -664,6 +668,8 @@ export interface ContractEventByBlockHash {
|
|
|
664
668
|
export interface ContractEventByTxId {
|
|
665
669
|
/** @format block-hash */
|
|
666
670
|
blockHash: string;
|
|
671
|
+
/** @format int64 */
|
|
672
|
+
timestamp: number;
|
|
667
673
|
/** @format address */
|
|
668
674
|
contractAddress: string;
|
|
669
675
|
/** @format int32 */
|
|
@@ -1331,7 +1337,7 @@ export interface ValByteVec {
|
|
|
1331
1337
|
}
|
|
1332
1338
|
/** ValI256 */
|
|
1333
1339
|
export interface ValI256 {
|
|
1334
|
-
/** @format
|
|
1340
|
+
/** @format int256 */
|
|
1335
1341
|
value: string;
|
|
1336
1342
|
type: string;
|
|
1337
1343
|
}
|
|
@@ -1446,7 +1452,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
1446
1452
|
}
|
|
1447
1453
|
/**
|
|
1448
1454
|
* @title Alephium API
|
|
1449
|
-
* @version 4.
|
|
1455
|
+
* @version 4.4.1
|
|
1450
1456
|
* @baseUrl ../
|
|
1451
1457
|
*/
|
|
1452
1458
|
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
@@ -148,6 +148,7 @@ export interface TestContractParams<F extends Fields = Fields, A extends Argumen
|
|
|
148
148
|
export interface ContractEvent<T extends Fields = Fields> {
|
|
149
149
|
txId: string;
|
|
150
150
|
blockHash: string;
|
|
151
|
+
timestamp: number;
|
|
151
152
|
contractAddress: string;
|
|
152
153
|
eventIndex: number;
|
|
153
154
|
name: string;
|
|
@@ -359,6 +359,7 @@ class Contract extends Artifact {
|
|
|
359
359
|
return {
|
|
360
360
|
txId: txId,
|
|
361
361
|
blockHash: event.blockHash,
|
|
362
|
+
timestamp: event.timestamp,
|
|
362
363
|
contractAddress: event.contractAddress,
|
|
363
364
|
name: name,
|
|
364
365
|
eventIndex: event.eventIndex,
|
|
@@ -792,6 +793,7 @@ function decodeContractCreatedEvent(event) {
|
|
|
792
793
|
return {
|
|
793
794
|
blockHash: event.blockHash,
|
|
794
795
|
txId: event.txId,
|
|
796
|
+
timestamp: event.timestamp,
|
|
795
797
|
eventIndex: event.eventIndex,
|
|
796
798
|
name: Contract.ContractCreatedEvent.name,
|
|
797
799
|
fields: toContractCreatedEventFields(fields)
|
|
@@ -803,6 +805,7 @@ function decodeContractDestroyedEvent(event) {
|
|
|
803
805
|
return {
|
|
804
806
|
blockHash: event.blockHash,
|
|
805
807
|
txId: event.txId,
|
|
808
|
+
timestamp: event.timestamp,
|
|
806
809
|
eventIndex: event.eventIndex,
|
|
807
810
|
name: Contract.ContractDestroyedEvent.name,
|
|
808
811
|
fields: { address: fields['address'] }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alephium/web3",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11",
|
|
4
4
|
"description": "A JS/TS library to interact with the Alephium platform",
|
|
5
5
|
"license": "GPL",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
28
|
-
"url": "git
|
|
28
|
+
"url": "git+https://github.com/alephium/alephium-web3.git"
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/alephium/alephium-web3",
|
|
31
31
|
"bugs": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"author": "Alephium dev <dev@alephium.org>",
|
|
35
35
|
"config": {
|
|
36
|
-
"alephium_version": "4.
|
|
36
|
+
"alephium_version": "4.4.1",
|
|
37
37
|
"explorer_backend_version": "3.3.2"
|
|
38
38
|
},
|
|
39
39
|
"type": "commonjs",
|
package/src/api/api-alephium.ts
CHANGED
|
@@ -723,6 +723,8 @@ export interface ContractEvent {
|
|
|
723
723
|
blockHash: string
|
|
724
724
|
/** @format 32-byte-hash */
|
|
725
725
|
txId: string
|
|
726
|
+
/** @format int64 */
|
|
727
|
+
timestamp: number
|
|
726
728
|
/** @format int32 */
|
|
727
729
|
eventIndex: number
|
|
728
730
|
fields: Val[]
|
|
@@ -732,6 +734,8 @@ export interface ContractEvent {
|
|
|
732
734
|
export interface ContractEventByBlockHash {
|
|
733
735
|
/** @format 32-byte-hash */
|
|
734
736
|
txId: string
|
|
737
|
+
/** @format int64 */
|
|
738
|
+
timestamp: number
|
|
735
739
|
/** @format address */
|
|
736
740
|
contractAddress: string
|
|
737
741
|
/** @format int32 */
|
|
@@ -743,6 +747,8 @@ export interface ContractEventByBlockHash {
|
|
|
743
747
|
export interface ContractEventByTxId {
|
|
744
748
|
/** @format block-hash */
|
|
745
749
|
blockHash: string
|
|
750
|
+
/** @format int64 */
|
|
751
|
+
timestamp: number
|
|
746
752
|
/** @format address */
|
|
747
753
|
contractAddress: string
|
|
748
754
|
/** @format int32 */
|
|
@@ -1503,7 +1509,7 @@ export interface ValByteVec {
|
|
|
1503
1509
|
|
|
1504
1510
|
/** ValI256 */
|
|
1505
1511
|
export interface ValI256 {
|
|
1506
|
-
/** @format
|
|
1512
|
+
/** @format int256 */
|
|
1507
1513
|
value: string
|
|
1508
1514
|
type: string
|
|
1509
1515
|
}
|
|
@@ -1780,7 +1786,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
1780
1786
|
|
|
1781
1787
|
/**
|
|
1782
1788
|
* @title Alephium API
|
|
1783
|
-
* @version 4.
|
|
1789
|
+
* @version 4.4.1
|
|
1784
1790
|
* @baseUrl ../
|
|
1785
1791
|
*/
|
|
1786
1792
|
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
package/src/contract/contract.ts
CHANGED
|
@@ -567,6 +567,7 @@ export class Contract extends Artifact {
|
|
|
567
567
|
return {
|
|
568
568
|
txId: txId,
|
|
569
569
|
blockHash: event.blockHash,
|
|
570
|
+
timestamp: event.timestamp,
|
|
570
571
|
contractAddress: event.contractAddress,
|
|
571
572
|
name: name,
|
|
572
573
|
eventIndex: event.eventIndex,
|
|
@@ -1009,6 +1010,7 @@ export interface TestContractParams<
|
|
|
1009
1010
|
export interface ContractEvent<T extends Fields = Fields> {
|
|
1010
1011
|
txId: string
|
|
1011
1012
|
blockHash: string
|
|
1013
|
+
timestamp: number
|
|
1012
1014
|
contractAddress: string
|
|
1013
1015
|
eventIndex: number
|
|
1014
1016
|
name: string
|
|
@@ -1302,6 +1304,7 @@ export function decodeContractCreatedEvent(event: node.ContractEvent): Omit<Cont
|
|
|
1302
1304
|
return {
|
|
1303
1305
|
blockHash: event.blockHash,
|
|
1304
1306
|
txId: event.txId,
|
|
1307
|
+
timestamp: event.timestamp,
|
|
1305
1308
|
eventIndex: event.eventIndex,
|
|
1306
1309
|
name: Contract.ContractCreatedEvent.name,
|
|
1307
1310
|
fields: toContractCreatedEventFields(fields)
|
|
@@ -1315,6 +1318,7 @@ export function decodeContractDestroyedEvent(
|
|
|
1315
1318
|
return {
|
|
1316
1319
|
blockHash: event.blockHash,
|
|
1317
1320
|
txId: event.txId,
|
|
1321
|
+
timestamp: event.timestamp,
|
|
1318
1322
|
eventIndex: event.eventIndex,
|
|
1319
1323
|
name: Contract.ContractDestroyedEvent.name,
|
|
1320
1324
|
fields: { address: fields['address'] as Address }
|