starknet 4.13.0 → 4.13.2

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/index.d.ts CHANGED
@@ -673,7 +673,7 @@ declare type KeyPair = ec$1.KeyPair;
673
673
  declare type Signature = string[];
674
674
  declare type RawCalldata = BigNumberish[];
675
675
  declare type AllowArray<T> = T | T[];
676
- declare type RawArgs$1 = {
676
+ declare type RawArgs = {
677
677
  [inputName: string]: string | string[] | {
678
678
  type: 'struct';
679
679
  [k: string]: BigNumberish;
@@ -688,7 +688,7 @@ declare type UniversalDeployerContractPayload = {
688
688
  classHash: BigNumberish;
689
689
  salt: string;
690
690
  unique: boolean;
691
- constructorCalldata?: RawArgs$1;
691
+ constructorCalldata?: RawArgs;
692
692
  additionalCalls?: AllowArray<Call>;
693
693
  };
694
694
  declare type DeployContractPayload = {
@@ -786,71 +786,323 @@ declare type ParsedStruct = {
786
786
  [key: string]: BigNumberish | ParsedStruct;
787
787
  };
788
788
 
789
- declare type BlockIdentifier = BlockNumber | BigNumberish;
789
+ declare type Calldata = string[];
790
+ declare type Overrides = {
791
+ maxFee?: BigNumberish;
792
+ nonce?: BigNumberish;
793
+ signature?: Signature;
794
+ };
790
795
 
791
- declare type GetTransactionStatusResponse = {
792
- tx_status: Status;
793
- block_hash?: string;
794
- tx_failure_reason?: {
795
- code: string;
796
- error_message: string;
797
- };
796
+ declare const IS_BROWSER: boolean;
797
+ declare function arrayBufferToString(array: ArrayBuffer): string;
798
+ declare function btoaUniversal(b: ArrayBuffer): string;
799
+ declare function buf2hex(buffer: Uint8Array): string;
800
+ /**
801
+ * Some function imported from https://github.com/pedrouid/enc-utils/blob/master/src/index.ts
802
+ * enc-utils is no dependency to avoid using `Buffer` which just works in node and no browsers
803
+ */
804
+ declare function removeHexPrefix(hex: string): string;
805
+ declare function addHexPrefix(hex: string): string;
806
+ declare function padLeft(str: string, length: number, padding?: string): string;
807
+ declare function calcByteLength(length: number, byteSize?: number): number;
808
+ declare function sanitizeBytes(str: string, byteSize?: number, padding?: string): string;
809
+ declare function sanitizeHex(hex: string): string;
810
+ declare function utf8ToArray(str: string): Uint8Array;
811
+
812
+ declare const encode_IS_BROWSER: typeof IS_BROWSER;
813
+ declare const encode_arrayBufferToString: typeof arrayBufferToString;
814
+ declare const encode_btoaUniversal: typeof btoaUniversal;
815
+ declare const encode_buf2hex: typeof buf2hex;
816
+ declare const encode_removeHexPrefix: typeof removeHexPrefix;
817
+ declare const encode_addHexPrefix: typeof addHexPrefix;
818
+ declare const encode_padLeft: typeof padLeft;
819
+ declare const encode_calcByteLength: typeof calcByteLength;
820
+ declare const encode_sanitizeBytes: typeof sanitizeBytes;
821
+ declare const encode_sanitizeHex: typeof sanitizeHex;
822
+ declare const encode_utf8ToArray: typeof utf8ToArray;
823
+ declare namespace encode {
824
+ export {
825
+ encode_IS_BROWSER as IS_BROWSER,
826
+ encode_arrayBufferToString as arrayBufferToString,
827
+ encode_btoaUniversal as btoaUniversal,
828
+ encode_buf2hex as buf2hex,
829
+ encode_removeHexPrefix as removeHexPrefix,
830
+ encode_addHexPrefix as addHexPrefix,
831
+ encode_padLeft as padLeft,
832
+ encode_calcByteLength as calcByteLength,
833
+ encode_sanitizeBytes as sanitizeBytes,
834
+ encode_sanitizeHex as sanitizeHex,
835
+ encode_utf8ToArray as utf8ToArray,
836
+ };
837
+ }
838
+
839
+ declare const ZERO: BN;
840
+ declare const ONE: BN;
841
+ declare const TWO: BN;
842
+ declare const MASK_250: BN;
843
+ declare const MASK_251: BN;
844
+ declare enum StarknetChainId {
845
+ MAINNET = "0x534e5f4d41494e",
846
+ TESTNET = "0x534e5f474f45524c49",
847
+ TESTNET2 = "0x534e5f474f45524c4932"
848
+ }
849
+ declare enum TransactionHashPrefix {
850
+ DECLARE = "0x6465636c617265",
851
+ DEPLOY = "0x6465706c6f79",
852
+ DEPLOY_ACCOUNT = "0x6465706c6f795f6163636f756e74",
853
+ INVOKE = "0x696e766f6b65",
854
+ L1_HANDLER = "0x6c315f68616e646c6572"
855
+ }
856
+ declare const UDC: {
857
+ ADDRESS: string;
858
+ ENTRYPOINT: string;
798
859
  };
799
- declare type GetContractAddressesResponse = {
800
- Starknet: string;
801
- GpsStatementVerifier: string;
860
+ /**
861
+ * The following is taken from https://github.com/starkware-libs/starkex-resources/blob/master/crypto/starkware/crypto/signature/pedersen_params.json but converted to hex, because JS is very bad handling big integers by default
862
+ * Please do not edit until the JSON changes.
863
+ */
864
+ declare const FIELD_PRIME = "800000000000011000000000000000000000000000000000000000000000001";
865
+ declare const FIELD_GEN = "3";
866
+ declare const FIELD_SIZE = 251;
867
+ declare const EC_ORDER = "800000000000010FFFFFFFFFFFFFFFFB781126DCAE7B2321E66A241ADC64D2F";
868
+ declare const ALPHA = "1";
869
+ declare const BETA = "6F21413EFBE40DE150E596D72F7A8C5609AD26C15C915C1F4CDFCB99CEE9E89";
870
+ declare const MAX_ECDSA_VAL = "800000000000000000000000000000000000000000000000000000000000000";
871
+ declare const CONSTANT_POINTS: string[][];
872
+
873
+ declare const constants_ZERO: typeof ZERO;
874
+ declare const constants_ONE: typeof ONE;
875
+ declare const constants_TWO: typeof TWO;
876
+ declare const constants_MASK_250: typeof MASK_250;
877
+ declare const constants_MASK_251: typeof MASK_251;
878
+ type constants_StarknetChainId = StarknetChainId;
879
+ declare const constants_StarknetChainId: typeof StarknetChainId;
880
+ type constants_TransactionHashPrefix = TransactionHashPrefix;
881
+ declare const constants_TransactionHashPrefix: typeof TransactionHashPrefix;
882
+ declare const constants_UDC: typeof UDC;
883
+ declare const constants_FIELD_PRIME: typeof FIELD_PRIME;
884
+ declare const constants_FIELD_GEN: typeof FIELD_GEN;
885
+ declare const constants_FIELD_SIZE: typeof FIELD_SIZE;
886
+ declare const constants_EC_ORDER: typeof EC_ORDER;
887
+ declare const constants_ALPHA: typeof ALPHA;
888
+ declare const constants_BETA: typeof BETA;
889
+ declare const constants_MAX_ECDSA_VAL: typeof MAX_ECDSA_VAL;
890
+ declare const constants_CONSTANT_POINTS: typeof CONSTANT_POINTS;
891
+ declare const constants_IS_BROWSER: typeof IS_BROWSER;
892
+ declare namespace constants {
893
+ export {
894
+ constants_ZERO as ZERO,
895
+ constants_ONE as ONE,
896
+ constants_TWO as TWO,
897
+ constants_MASK_250 as MASK_250,
898
+ constants_MASK_251 as MASK_251,
899
+ constants_StarknetChainId as StarknetChainId,
900
+ constants_TransactionHashPrefix as TransactionHashPrefix,
901
+ constants_UDC as UDC,
902
+ constants_FIELD_PRIME as FIELD_PRIME,
903
+ constants_FIELD_GEN as FIELD_GEN,
904
+ constants_FIELD_SIZE as FIELD_SIZE,
905
+ constants_EC_ORDER as EC_ORDER,
906
+ constants_ALPHA as ALPHA,
907
+ constants_BETA as BETA,
908
+ constants_MAX_ECDSA_VAL as MAX_ECDSA_VAL,
909
+ constants_CONSTANT_POINTS as CONSTANT_POINTS,
910
+ constants_IS_BROWSER as IS_BROWSER,
911
+ };
912
+ }
913
+
914
+ interface InvocationsSignerDetails extends Required<InvocationsDetails> {
915
+ walletAddress: string;
916
+ chainId: StarknetChainId;
917
+ }
918
+ interface DeclareSignerDetails {
919
+ classHash: BigNumberish;
920
+ senderAddress: BigNumberish;
921
+ chainId: StarknetChainId;
922
+ maxFee: BigNumberish;
923
+ version: BigNumberish;
924
+ nonce: BigNumberish;
925
+ }
926
+ declare type DeployAccountSignerDetails = Required<DeployAccountContractPayload> & Required<InvocationsDetails> & {
927
+ contractAddress: BigNumberish;
928
+ chainId: StarknetChainId;
802
929
  };
803
- declare type FunctionInvocation = {
804
- caller_address: string;
805
- contract_address: string;
930
+
931
+ declare type AsyncContractFunction<T = any> = (...args: Array<any>) => Promise<T>;
932
+ declare type ContractFunction = (...args: Array<any>) => any;
933
+ interface Result extends Array<any> {
934
+ [key: string]: any;
935
+ }
936
+
937
+ declare type BlockIdentifier = BlockNumber | BigNumberish;
938
+
939
+ /**
940
+ * Common interface response
941
+ * Intersection (sequencer response ∩ (∪ rpc responses))
942
+ */
943
+
944
+ interface GetBlockResponse {
945
+ timestamp: number;
946
+ block_hash: string;
947
+ block_number: number;
948
+ new_root: string;
949
+ parent_hash: string;
950
+ status: Status;
951
+ transactions: Array<string>;
952
+ gas_price?: string;
953
+ sequencer_address?: string;
954
+ starknet_version?: string;
955
+ transaction_receipts?: any;
956
+ }
957
+ interface GetCodeResponse {
958
+ bytecode: string[];
959
+ }
960
+ declare type GetTransactionResponse = InvokeTransactionResponse & DeclareTransactionResponse;
961
+ interface CommonTransactionResponse {
962
+ transaction_hash?: string;
963
+ version?: string;
964
+ signature?: Signature;
965
+ max_fee?: string;
966
+ nonce?: string;
967
+ }
968
+ interface InvokeTransactionResponse extends CommonTransactionResponse {
969
+ contract_address?: string;
970
+ entry_point_selector?: string;
806
971
  calldata: RawCalldata;
807
- call_type?: string;
808
- class_hash?: string;
809
- selector?: string;
810
- entry_point_type?: EntryPointType;
811
- result: Array<any>;
812
- execution_resources: ExecutionResources;
813
- internal_calls: Array<FunctionInvocation>;
814
- events: Array<any>;
815
- messages: Array<any>;
816
- };
817
- declare type ExecutionResources = {
818
- n_steps: number;
819
- builtin_instance_counter: {
820
- pedersen_builtin: number;
821
- range_check_builtin: number;
822
- bitwise_builtin: number;
823
- output_builtin: number;
824
- ecdsa_builtin: number;
825
- ec_op_builtin?: number;
826
- };
827
- n_memory_holes: number;
828
- };
829
- declare type GetTransactionTraceResponse = {
830
- validate_invocation?: FunctionInvocation;
831
- function_invocation?: FunctionInvocation;
832
- fee_transfer_invocation?: FunctionInvocation;
833
- signature: Signature;
834
- };
835
- declare type RawArgs = {
836
- [inputName: string]: string | string[] | {
837
- type: 'struct';
838
- [k: string]: BigNumberish;
839
- };
840
- };
841
- declare type CallL1Handler = {
842
- from_address: string;
972
+ }
973
+ interface ContractEntryPoint {
974
+ offset: string;
975
+ selector: string;
976
+ }
977
+ interface DeclareTransactionResponse extends CommonTransactionResponse {
978
+ contract_class?: any;
979
+ sender_address?: string;
980
+ }
981
+ declare type GetTransactionReceiptResponse = InvokeTransactionReceiptResponse | DeclareTransactionReceiptResponse;
982
+ interface CommonTransactionReceiptResponse {
983
+ transaction_hash: string;
984
+ status?: Status;
985
+ actual_fee?: string;
986
+ status_data?: string;
987
+ }
988
+ interface MessageToL1 {
843
989
  to_address: string;
844
- entry_point_selector: string;
845
990
  payload: Array<string>;
846
- };
847
- declare namespace Sequencer {
848
- type DeclareTransaction = {
849
- type: 'DECLARE';
850
- sender_address: string;
851
- contract_class: ContractClass;
852
- signature?: Signature;
853
- nonce: BigNumberish;
991
+ }
992
+ interface Event {
993
+ from_address: string;
994
+ keys: Array<string>;
995
+ data: Array<string>;
996
+ }
997
+ interface MessageToL2 {
998
+ from_address: string;
999
+ payload: Array<string>;
1000
+ }
1001
+ interface InvokeTransactionReceiptResponse extends CommonTransactionReceiptResponse {
1002
+ /** @deprecated Use l2_to_l1_messages */
1003
+ messages_sent?: Array<MessageToL1>;
1004
+ events?: Array<Event>;
1005
+ l1_origin_message?: MessageToL2;
1006
+ }
1007
+ declare type DeclareTransactionReceiptResponse = CommonTransactionReceiptResponse;
1008
+ interface EstimateFeeResponse {
1009
+ overall_fee: BN__default;
1010
+ gas_consumed?: BN__default;
1011
+ gas_price?: BN__default;
1012
+ }
1013
+ interface InvokeFunctionResponse {
1014
+ transaction_hash: string;
1015
+ }
1016
+ interface DeployContractResponse {
1017
+ contract_address: string;
1018
+ transaction_hash: string;
1019
+ }
1020
+ interface DeclareContractResponse {
1021
+ transaction_hash: string;
1022
+ class_hash: string;
1023
+ }
1024
+ declare type CallContractResponse = {
1025
+ result: Array<string>;
1026
+ };
1027
+ declare type EstimateFeeAction = {
1028
+ type: 'INVOKE';
1029
+ payload: AllowArray<Call>;
1030
+ } | {
1031
+ type: 'DECLARE';
1032
+ payload: DeclareContractPayload;
1033
+ } | {
1034
+ type: 'DEPLOY_ACCOUNT';
1035
+ payload: DeployAccountContractPayload;
1036
+ } | {
1037
+ type: 'DEPLOY';
1038
+ payload: UniversalDeployerContractPayload;
1039
+ };
1040
+
1041
+ interface EstimateFee extends EstimateFeeResponse {
1042
+ suggestedMaxFee: BN__default;
1043
+ }
1044
+ interface EstimateFeeDetails {
1045
+ nonce?: BigNumberish;
1046
+ blockIdentifier?: BlockIdentifier;
1047
+ }
1048
+
1049
+ declare type GetTransactionStatusResponse = {
1050
+ tx_status: Status;
1051
+ block_hash?: string;
1052
+ tx_failure_reason?: {
1053
+ code: string;
1054
+ error_message: string;
1055
+ };
1056
+ };
1057
+ declare type GetContractAddressesResponse = {
1058
+ Starknet: string;
1059
+ GpsStatementVerifier: string;
1060
+ };
1061
+ declare type FunctionInvocation = {
1062
+ caller_address: string;
1063
+ contract_address: string;
1064
+ calldata: RawCalldata;
1065
+ call_type?: string;
1066
+ class_hash?: string;
1067
+ selector?: string;
1068
+ entry_point_type?: EntryPointType;
1069
+ result: Array<any>;
1070
+ execution_resources: ExecutionResources;
1071
+ internal_calls: Array<FunctionInvocation>;
1072
+ events: Array<any>;
1073
+ messages: Array<any>;
1074
+ };
1075
+ declare type ExecutionResources = {
1076
+ n_steps: number;
1077
+ builtin_instance_counter: {
1078
+ pedersen_builtin: number;
1079
+ range_check_builtin: number;
1080
+ bitwise_builtin: number;
1081
+ output_builtin: number;
1082
+ ecdsa_builtin: number;
1083
+ ec_op_builtin?: number;
1084
+ };
1085
+ n_memory_holes: number;
1086
+ };
1087
+ declare type GetTransactionTraceResponse = {
1088
+ validate_invocation?: FunctionInvocation;
1089
+ function_invocation?: FunctionInvocation;
1090
+ fee_transfer_invocation?: FunctionInvocation;
1091
+ signature: Signature;
1092
+ };
1093
+ declare type CallL1Handler = {
1094
+ from_address: string;
1095
+ to_address: string;
1096
+ entry_point_selector: string;
1097
+ payload: Array<string>;
1098
+ };
1099
+ declare namespace Sequencer {
1100
+ type DeclareTransaction = {
1101
+ type: 'DECLARE';
1102
+ sender_address: string;
1103
+ contract_class: ContractClass;
1104
+ signature?: Signature;
1105
+ nonce: BigNumberish;
854
1106
  max_fee?: BigNumberish;
855
1107
  version?: BigNumberish;
856
1108
  };
@@ -1105,291 +1357,6 @@ declare namespace Sequencer {
1105
1357
  };
1106
1358
  }
1107
1359
 
1108
- declare type Calldata = string[];
1109
- declare type Overrides = {
1110
- maxFee?: BigNumberish;
1111
- nonce?: BigNumberish;
1112
- signature?: Signature;
1113
- };
1114
-
1115
- type index$1_Calldata = Calldata;
1116
- type index$1_Overrides = Overrides;
1117
- type index$1_GetTransactionStatusResponse = GetTransactionStatusResponse;
1118
- type index$1_GetContractAddressesResponse = GetContractAddressesResponse;
1119
- type index$1_FunctionInvocation = FunctionInvocation;
1120
- type index$1_ExecutionResources = ExecutionResources;
1121
- type index$1_GetTransactionTraceResponse = GetTransactionTraceResponse;
1122
- type index$1_RawArgs = RawArgs;
1123
- type index$1_CallL1Handler = CallL1Handler;
1124
- declare const index$1_Sequencer: typeof Sequencer;
1125
- declare const index$1_RPC: typeof RPC;
1126
- declare namespace index$1 {
1127
- export {
1128
- index$1_Calldata as Calldata,
1129
- index$1_Overrides as Overrides,
1130
- index$1_GetTransactionStatusResponse as GetTransactionStatusResponse,
1131
- index$1_GetContractAddressesResponse as GetContractAddressesResponse,
1132
- index$1_FunctionInvocation as FunctionInvocation,
1133
- index$1_ExecutionResources as ExecutionResources,
1134
- index$1_GetTransactionTraceResponse as GetTransactionTraceResponse,
1135
- index$1_RawArgs as RawArgs,
1136
- index$1_CallL1Handler as CallL1Handler,
1137
- index$1_Sequencer as Sequencer,
1138
- index$1_RPC as RPC,
1139
- };
1140
- }
1141
-
1142
- declare const IS_BROWSER: boolean;
1143
- declare function arrayBufferToString(array: ArrayBuffer): string;
1144
- declare function btoaUniversal(b: ArrayBuffer): string;
1145
- declare function buf2hex(buffer: Uint8Array): string;
1146
- /**
1147
- * Some function imported from https://github.com/pedrouid/enc-utils/blob/master/src/index.ts
1148
- * enc-utils is no dependency to avoid using `Buffer` which just works in node and no browsers
1149
- */
1150
- declare function removeHexPrefix(hex: string): string;
1151
- declare function addHexPrefix(hex: string): string;
1152
- declare function padLeft(str: string, length: number, padding?: string): string;
1153
- declare function calcByteLength(length: number, byteSize?: number): number;
1154
- declare function sanitizeBytes(str: string, byteSize?: number, padding?: string): string;
1155
- declare function sanitizeHex(hex: string): string;
1156
- declare function utf8ToArray(str: string): Uint8Array;
1157
-
1158
- declare const encode_IS_BROWSER: typeof IS_BROWSER;
1159
- declare const encode_arrayBufferToString: typeof arrayBufferToString;
1160
- declare const encode_btoaUniversal: typeof btoaUniversal;
1161
- declare const encode_buf2hex: typeof buf2hex;
1162
- declare const encode_removeHexPrefix: typeof removeHexPrefix;
1163
- declare const encode_addHexPrefix: typeof addHexPrefix;
1164
- declare const encode_padLeft: typeof padLeft;
1165
- declare const encode_calcByteLength: typeof calcByteLength;
1166
- declare const encode_sanitizeBytes: typeof sanitizeBytes;
1167
- declare const encode_sanitizeHex: typeof sanitizeHex;
1168
- declare const encode_utf8ToArray: typeof utf8ToArray;
1169
- declare namespace encode {
1170
- export {
1171
- encode_IS_BROWSER as IS_BROWSER,
1172
- encode_arrayBufferToString as arrayBufferToString,
1173
- encode_btoaUniversal as btoaUniversal,
1174
- encode_buf2hex as buf2hex,
1175
- encode_removeHexPrefix as removeHexPrefix,
1176
- encode_addHexPrefix as addHexPrefix,
1177
- encode_padLeft as padLeft,
1178
- encode_calcByteLength as calcByteLength,
1179
- encode_sanitizeBytes as sanitizeBytes,
1180
- encode_sanitizeHex as sanitizeHex,
1181
- encode_utf8ToArray as utf8ToArray,
1182
- };
1183
- }
1184
-
1185
- declare const ZERO: BN;
1186
- declare const ONE: BN;
1187
- declare const TWO: BN;
1188
- declare const MASK_250: BN;
1189
- declare const MASK_251: BN;
1190
- declare enum StarknetChainId {
1191
- MAINNET = "0x534e5f4d41494e",
1192
- TESTNET = "0x534e5f474f45524c49",
1193
- TESTNET2 = "0x534e5f474f45524c4932"
1194
- }
1195
- declare enum TransactionHashPrefix {
1196
- DECLARE = "0x6465636c617265",
1197
- DEPLOY = "0x6465706c6f79",
1198
- DEPLOY_ACCOUNT = "0x6465706c6f795f6163636f756e74",
1199
- INVOKE = "0x696e766f6b65",
1200
- L1_HANDLER = "0x6c315f68616e646c6572"
1201
- }
1202
- declare const UDC: {
1203
- ADDRESS: string;
1204
- ENTRYPOINT: string;
1205
- };
1206
- /**
1207
- * The following is taken from https://github.com/starkware-libs/starkex-resources/blob/master/crypto/starkware/crypto/signature/pedersen_params.json but converted to hex, because JS is very bad handling big integers by default
1208
- * Please do not edit until the JSON changes.
1209
- */
1210
- declare const FIELD_PRIME = "800000000000011000000000000000000000000000000000000000000000001";
1211
- declare const FIELD_GEN = "3";
1212
- declare const FIELD_SIZE = 251;
1213
- declare const EC_ORDER = "800000000000010FFFFFFFFFFFFFFFFB781126DCAE7B2321E66A241ADC64D2F";
1214
- declare const ALPHA = "1";
1215
- declare const BETA = "6F21413EFBE40DE150E596D72F7A8C5609AD26C15C915C1F4CDFCB99CEE9E89";
1216
- declare const MAX_ECDSA_VAL = "800000000000000000000000000000000000000000000000000000000000000";
1217
- declare const CONSTANT_POINTS: string[][];
1218
-
1219
- declare const constants_ZERO: typeof ZERO;
1220
- declare const constants_ONE: typeof ONE;
1221
- declare const constants_TWO: typeof TWO;
1222
- declare const constants_MASK_250: typeof MASK_250;
1223
- declare const constants_MASK_251: typeof MASK_251;
1224
- type constants_StarknetChainId = StarknetChainId;
1225
- declare const constants_StarknetChainId: typeof StarknetChainId;
1226
- type constants_TransactionHashPrefix = TransactionHashPrefix;
1227
- declare const constants_TransactionHashPrefix: typeof TransactionHashPrefix;
1228
- declare const constants_UDC: typeof UDC;
1229
- declare const constants_FIELD_PRIME: typeof FIELD_PRIME;
1230
- declare const constants_FIELD_GEN: typeof FIELD_GEN;
1231
- declare const constants_FIELD_SIZE: typeof FIELD_SIZE;
1232
- declare const constants_EC_ORDER: typeof EC_ORDER;
1233
- declare const constants_ALPHA: typeof ALPHA;
1234
- declare const constants_BETA: typeof BETA;
1235
- declare const constants_MAX_ECDSA_VAL: typeof MAX_ECDSA_VAL;
1236
- declare const constants_CONSTANT_POINTS: typeof CONSTANT_POINTS;
1237
- declare const constants_IS_BROWSER: typeof IS_BROWSER;
1238
- declare namespace constants {
1239
- export {
1240
- constants_ZERO as ZERO,
1241
- constants_ONE as ONE,
1242
- constants_TWO as TWO,
1243
- constants_MASK_250 as MASK_250,
1244
- constants_MASK_251 as MASK_251,
1245
- constants_StarknetChainId as StarknetChainId,
1246
- constants_TransactionHashPrefix as TransactionHashPrefix,
1247
- constants_UDC as UDC,
1248
- constants_FIELD_PRIME as FIELD_PRIME,
1249
- constants_FIELD_GEN as FIELD_GEN,
1250
- constants_FIELD_SIZE as FIELD_SIZE,
1251
- constants_EC_ORDER as EC_ORDER,
1252
- constants_ALPHA as ALPHA,
1253
- constants_BETA as BETA,
1254
- constants_MAX_ECDSA_VAL as MAX_ECDSA_VAL,
1255
- constants_CONSTANT_POINTS as CONSTANT_POINTS,
1256
- constants_IS_BROWSER as IS_BROWSER,
1257
- };
1258
- }
1259
-
1260
- interface InvocationsSignerDetails extends Required<InvocationsDetails> {
1261
- walletAddress: string;
1262
- chainId: StarknetChainId;
1263
- }
1264
- interface DeclareSignerDetails {
1265
- classHash: BigNumberish;
1266
- senderAddress: BigNumberish;
1267
- chainId: StarknetChainId;
1268
- maxFee: BigNumberish;
1269
- version: BigNumberish;
1270
- nonce: BigNumberish;
1271
- }
1272
- declare type DeployAccountSignerDetails = Required<DeployAccountContractPayload> & Required<InvocationsDetails> & {
1273
- contractAddress: BigNumberish;
1274
- chainId: StarknetChainId;
1275
- };
1276
-
1277
- declare type AsyncContractFunction<T = any> = (...args: Array<any>) => Promise<T>;
1278
- declare type ContractFunction = (...args: Array<any>) => any;
1279
- interface Result extends Array<any> {
1280
- [key: string]: any;
1281
- }
1282
-
1283
- /**
1284
- * Common interface response
1285
- * Intersection (sequencer response ∩ (∪ rpc responses))
1286
- */
1287
-
1288
- interface GetBlockResponse {
1289
- timestamp: number;
1290
- block_hash: string;
1291
- block_number: number;
1292
- new_root: string;
1293
- parent_hash: string;
1294
- status: Status;
1295
- transactions: Array<string>;
1296
- gas_price?: string;
1297
- sequencer_address?: string;
1298
- starknet_version?: string;
1299
- transaction_receipts?: any;
1300
- }
1301
- interface GetCodeResponse {
1302
- bytecode: string[];
1303
- }
1304
- declare type GetTransactionResponse = InvokeTransactionResponse & DeclareTransactionResponse;
1305
- interface CommonTransactionResponse {
1306
- transaction_hash?: string;
1307
- version?: string;
1308
- signature?: Signature;
1309
- max_fee?: string;
1310
- nonce?: string;
1311
- }
1312
- interface InvokeTransactionResponse extends CommonTransactionResponse {
1313
- contract_address?: string;
1314
- entry_point_selector?: string;
1315
- calldata: RawCalldata;
1316
- }
1317
- interface ContractEntryPoint {
1318
- offset: string;
1319
- selector: string;
1320
- }
1321
- interface DeclareTransactionResponse extends CommonTransactionResponse {
1322
- contract_class?: any;
1323
- sender_address?: string;
1324
- }
1325
- declare type GetTransactionReceiptResponse = InvokeTransactionReceiptResponse | DeclareTransactionReceiptResponse;
1326
- interface CommonTransactionReceiptResponse {
1327
- transaction_hash: string;
1328
- status?: Status;
1329
- actual_fee?: string;
1330
- status_data?: string;
1331
- }
1332
- interface MessageToL1 {
1333
- to_address: string;
1334
- payload: Array<string>;
1335
- }
1336
- interface Event {
1337
- from_address: string;
1338
- keys: Array<string>;
1339
- data: Array<string>;
1340
- }
1341
- interface MessageToL2 {
1342
- from_address: string;
1343
- payload: Array<string>;
1344
- }
1345
- interface InvokeTransactionReceiptResponse extends CommonTransactionReceiptResponse {
1346
- /** @deprecated Use l2_to_l1_messages */
1347
- messages_sent?: Array<MessageToL1>;
1348
- events?: Array<Event>;
1349
- l1_origin_message?: MessageToL2;
1350
- }
1351
- declare type DeclareTransactionReceiptResponse = CommonTransactionReceiptResponse;
1352
- interface EstimateFeeResponse {
1353
- overall_fee: BN__default;
1354
- gas_consumed?: BN__default;
1355
- gas_price?: BN__default;
1356
- }
1357
- interface InvokeFunctionResponse {
1358
- transaction_hash: string;
1359
- }
1360
- interface DeployContractResponse {
1361
- contract_address: string;
1362
- transaction_hash: string;
1363
- }
1364
- interface DeclareContractResponse {
1365
- transaction_hash: string;
1366
- class_hash: string;
1367
- }
1368
- declare type CallContractResponse = {
1369
- result: Array<string>;
1370
- };
1371
- declare type EstimateFeeAction = {
1372
- type: 'INVOKE';
1373
- payload: AllowArray<Call>;
1374
- } | {
1375
- type: 'DECLARE';
1376
- payload: DeclareContractPayload;
1377
- } | {
1378
- type: 'DEPLOY_ACCOUNT';
1379
- payload: DeployAccountContractPayload;
1380
- } | {
1381
- type: 'DEPLOY';
1382
- payload: UniversalDeployerContractPayload;
1383
- };
1384
-
1385
- interface EstimateFee extends EstimateFeeResponse {
1386
- suggestedMaxFee: BN__default;
1387
- }
1388
- interface EstimateFeeDetails {
1389
- nonce?: BigNumberish;
1390
- blockIdentifier?: BlockIdentifier;
1391
- }
1392
-
1393
1360
  declare abstract class ProviderInterface {
1394
1361
  abstract chainId: StarknetChainId;
1395
1362
  /**
@@ -2536,7 +2503,7 @@ declare function compressProgram(jsonProgram: Program | string): CompressedProgr
2536
2503
  declare function randomAddress(): string;
2537
2504
  declare function makeAddress(input: string): string;
2538
2505
  declare function formatSignature(sig?: Signature): string[];
2539
- declare function compileCalldata(args: RawArgs$1): Calldata;
2506
+ declare function compileCalldata(args: RawArgs): Calldata;
2540
2507
  declare function estimatedFeeToMaxFee(estimatedFee: BigNumberish, overhead?: number): BN__default;
2541
2508
 
2542
2509
  declare const stark_compressProgram: typeof compressProgram;
@@ -2681,4 +2648,4 @@ declare function validateChecksumAddress(address: string): boolean;
2681
2648
  declare function isUrl(s?: string): boolean;
2682
2649
  declare function buildUrl(baseUrl: string, defaultPath: string, urlOrPath?: string): string;
2683
2650
 
2684
- export { Abi, AbiEntry, Account, AccountInterface, AllowArray, Args, AsyncContractFunction, BlockNumber, BlockTag, Call, CallContractResponse, CallDetails, Calldata, CommonTransactionReceiptResponse, CommonTransactionResponse, CompiledContract, CompressedCompiledContract, CompressedProgram, Contract, ContractClass, ContractEntryPoint, ContractFactory, ContractFunction, ContractInterface, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractPayload, DeployContractResponse, EntryPointType, EntryPointsByType, EstimateFee, EstimateFeeAction, EstimateFeeDetails, EstimateFeeResponse, Event, FunctionAbi, GatewayError, GetBlockResponse, GetCodeResponse, GetTransactionReceiptResponse, GetTransactionResponse, HttpError, Invocation, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeTransactionReceiptResponse, InvokeTransactionResponse, KeyPair, MessageToL1, MessageToL2, Overrides, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, RawArgs$1 as RawArgs, RawCalldata, Result, RpcProvider, RpcProviderOptions, SequencerProvider, SequencerProviderOptions, Signature, Signer, SignerInterface, Status, Struct, StructAbi, TransactionStatus, TransactionType, UniversalDeployerContractPayload, addAddressPadding, index$1 as api, buildUrl, constants, defaultProvider, ellipticCurve as ec, encode, getChecksumAddress, hash, isUrl, json, merkle, number, shortString, stark, transaction, index as typedData, uint256, validateAndParseAddress, validateChecksumAddress };
2651
+ export { Abi, AbiEntry, Account, AccountInterface, AllowArray, Args, AsyncContractFunction, BlockNumber, BlockTag, Call, CallContractResponse, CallDetails, CallL1Handler, Calldata, CommonTransactionReceiptResponse, CommonTransactionResponse, CompiledContract, CompressedCompiledContract, CompressedProgram, Contract, ContractClass, ContractEntryPoint, ContractFactory, ContractFunction, ContractInterface, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractPayload, DeployContractResponse, EntryPointType, EntryPointsByType, EstimateFee, EstimateFeeAction, EstimateFeeDetails, EstimateFeeResponse, Event, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, GetTransactionTraceResponse, HttpError, Invocation, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeTransactionReceiptResponse, InvokeTransactionResponse, KeyPair, MessageToL1, MessageToL2, Overrides, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, RPC, RawArgs, RawCalldata, Result, RpcProvider, RpcProviderOptions, Sequencer, SequencerProvider, SequencerProviderOptions, Signature, Signer, SignerInterface, Status, Struct, StructAbi, TransactionStatus, TransactionType, UniversalDeployerContractPayload, addAddressPadding, buildUrl, constants, defaultProvider, ellipticCurve as ec, encode, getChecksumAddress, hash, isUrl, json, merkle, number, shortString, stark, transaction, index as typedData, uint256, validateAndParseAddress, validateChecksumAddress };