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/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 Abi = {
21
- inputs: {
22
- name: string;
23
- type: 'felt' | 'felt*';
24
- }[];
20
+ export declare type AbiEntry = {
25
21
  name: string;
26
- outputs: {
27
- name: string;
28
- type: 'felt' | 'felt*';
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
- block_id: number;
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
- block_id: number;
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
- previous_block_id: number;
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
- block_id: number;
98
+ block_hash: string;
92
99
  };
93
100
  export declare type GetTransactionResponse = {
94
101
  status: Status;
95
102
  transaction: Transaction;
96
- block_id: number;
103
+ block_hash: string;
97
104
  block_number: number;
98
105
  transaction_index: number;
99
106
  transaction_hash: string;