starknet 2.0.1 → 2.2.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/CHANGELOG.md +48 -0
- package/README.md +44 -4
- package/__tests__/provider.test.ts +3 -3
- package/__tests__/utils/ellipticalCurve.test.ts +1 -1
- package/constants.d.ts +5 -5
- package/contract.d.ts +5 -1
- package/contract.js +32 -7
- package/dist/constants.d.ts +5 -5
- package/dist/contract.d.ts +5 -1
- package/dist/contract.js +29 -7
- package/dist/provider/default.d.ts +7 -5
- package/dist/provider/default.js +24 -19
- package/dist/types.d.ts +21 -14
- package/package.json +4 -2
- package/provider/default.d.ts +11 -5
- package/provider/default.js +62 -38
- package/src/constants.ts +6 -4
- package/src/contract.ts +42 -11
- package/src/provider/default.ts +45 -27
- package/src/types.ts +20 -8
- package/tsconfig.json +3 -2
- package/types.d.ts +21 -14
package/types.d.ts
CHANGED
|
@@ -17,19 +17,26 @@ export declare type TxStatus = 'TRANSACTION_RECEIVED';
|
|
|
17
17
|
export declare type Type = 'DEPLOY' | 'INVOKE_FUNCTION';
|
|
18
18
|
export declare type EntryPointType = 'EXTERNAL';
|
|
19
19
|
export declare type CompressedProgram = string;
|
|
20
|
-
export declare type
|
|
21
|
-
inputs: {
|
|
22
|
-
name: string;
|
|
23
|
-
type: 'felt' | 'felt*';
|
|
24
|
-
}[];
|
|
20
|
+
export declare type AbiEntry = {
|
|
25
21
|
name: string;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
type: 'felt' | 'felt*' | string;
|
|
23
|
+
};
|
|
24
|
+
export declare type FunctionAbi = {
|
|
25
|
+
inputs: AbiEntry[];
|
|
26
|
+
name: string;
|
|
27
|
+
outputs: AbiEntry[];
|
|
30
28
|
stateMutability?: 'view';
|
|
31
29
|
type: 'function';
|
|
32
30
|
};
|
|
31
|
+
export declare type StructAbi = {
|
|
32
|
+
members: (AbiEntry & {
|
|
33
|
+
offset: number;
|
|
34
|
+
})[];
|
|
35
|
+
name: string;
|
|
36
|
+
size: number;
|
|
37
|
+
type: 'struct';
|
|
38
|
+
};
|
|
39
|
+
export declare type Abi = FunctionAbi | StructAbi;
|
|
33
40
|
export declare type EntryPointsByType = object;
|
|
34
41
|
export declare type Program = object;
|
|
35
42
|
export declare type CompiledContract = {
|
|
@@ -60,14 +67,14 @@ export declare type CallContractResponse = {
|
|
|
60
67
|
export declare type GetBlockResponse = {
|
|
61
68
|
sequence_number: number;
|
|
62
69
|
state_root: string;
|
|
63
|
-
|
|
70
|
+
block_hash: string;
|
|
64
71
|
transactions: {
|
|
65
72
|
[txHash: string]: Transaction;
|
|
66
73
|
};
|
|
67
74
|
timestamp: number;
|
|
68
75
|
transaction_receipts: {
|
|
69
76
|
[txHash: string]: {
|
|
70
|
-
|
|
77
|
+
block_hash: string;
|
|
71
78
|
transaction_hash: string;
|
|
72
79
|
l2_to_l1_messages: {
|
|
73
80
|
to_address: string;
|
|
@@ -79,7 +86,7 @@ export declare type GetBlockResponse = {
|
|
|
79
86
|
transaction_index: number;
|
|
80
87
|
};
|
|
81
88
|
};
|
|
82
|
-
|
|
89
|
+
previous_block_hash: string;
|
|
83
90
|
status: Status;
|
|
84
91
|
};
|
|
85
92
|
export declare type GetCodeResponse = {
|
|
@@ -88,12 +95,12 @@ export declare type GetCodeResponse = {
|
|
|
88
95
|
};
|
|
89
96
|
export declare type GetTransactionStatusResponse = {
|
|
90
97
|
tx_status: Status;
|
|
91
|
-
|
|
98
|
+
block_hash: string;
|
|
92
99
|
};
|
|
93
100
|
export declare type GetTransactionResponse = {
|
|
94
101
|
status: Status;
|
|
95
102
|
transaction: Transaction;
|
|
96
|
-
|
|
103
|
+
block_hash: string;
|
|
97
104
|
block_number: number;
|
|
98
105
|
transaction_index: number;
|
|
99
106
|
transaction_hash: string;
|