starknet 11.1.0 → 11.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 CHANGED
@@ -1,3 +1,9 @@
1
+ # [11.2.0](https://github.com/starknet-io/starknet.js/compare/v11.1.0...v11.2.0) (2026-10-12)
2
+
3
+ ### Features
4
+
5
+ - **cairoDataTypes:** add CairoStorageAddress ([96ad4c6](https://github.com/starknet-io/starknet.js/commit/96ad4c6390c47dd8753f4d1ffdad63469007ab28)), closes [#1116](https://github.com/starknet-io/starknet.js/issues/1116)
6
+
1
7
  # [11.1.0](https://github.com/starknet-io/starknet.js/compare/v11.0.3...v11.1.0) (2026-10-06)
2
8
 
3
9
  ### Features
package/dist/index.d.ts CHANGED
@@ -1712,6 +1712,9 @@ type _Transport = any;
1712
1712
  * Signer for accounts using a Ledger Nano S+/X signature (Starknet Ledger APP version 1.1.1)
1713
1713
  *
1714
1714
  * The Ledger has to be connected, unlocked and the Starknet APP has to be selected prior of use of this class.
1715
+ * @deprecated Import it from `starknet/ledger` instead: it is the same class, with the transport typed as a
1716
+ * Ledger `Transport`. Importing it from `starknet` is kept only for backward compatibility, and will be
1717
+ * removed in v12.
1715
1718
  */
1716
1719
  declare class LedgerSigner111<Transport extends Record<any, any> = any> implements SignerInterface {
1717
1720
  readonly transporter: Transport;
@@ -1859,6 +1862,8 @@ declare class LedgerSigner111<Transport extends Record<any, any> = any> implemen
1859
1862
  * for a Ledger Starknet DAPP v1.1.1.
1860
1863
  *
1861
1864
  * EIP2645 path = 2645'/starknet/application/0/accountId/0
1865
+ * @deprecated Import it from `starknet/ledger` instead: it is the same function. Importing it from
1866
+ * `starknet` is kept only for backward compatibility, and will be removed in v12.
1862
1867
  * @param {number} accountId Id of account. < 2**31.
1863
1868
  * @param {string} [applicationName='LedgerW'] utf8 string of application name.
1864
1869
  * @returns an Uint8array of 24 bytes.
@@ -1878,6 +1883,9 @@ declare function getLedgerPathBuffer111(accountId: number, applicationName?: str
1878
1883
  * Signer for accounts using a Ledger Nano S+/X signature (Starknet Ledger APP version 2.2.1).
1879
1884
  *
1880
1885
  * The Ledger has to be connected, unlocked and the Starknet APP has to be selected prior of use of this class.
1886
+ * @deprecated Import it from `starknet/ledger` instead: it is the same class, with the transport typed as a
1887
+ * Ledger `Transport`. Importing it from `starknet` is kept only for backward compatibility, and will be
1888
+ * removed in v12.
1881
1889
  */
1882
1890
  declare class LedgerSigner221<Transport extends Record<any, any> = any> extends LedgerSigner111 implements SignerInterface {
1883
1891
  /**
@@ -1893,13 +1901,13 @@ declare class LedgerSigner221<Transport extends Record<any, any> = any> extends
1893
1901
  *
1894
1902
  * If you are using APP v2.2.1 with an account created with the v1.1.1, you need to use :
1895
1903
  * ```typescript
1896
- * const myLedgerSigner = new LedgerSigner211(myNodeTransport, 0, undefined, getLedgerPathBuffer111);
1904
+ * const myLedgerSigner = new LedgerSigner221(myNodeTransport, 0, undefined, getLedgerPathBuffer111);
1897
1905
  * ```
1898
1906
  * @example
1899
1907
  * ```typescript
1900
1908
  * import TransportNodeHid from "@ledgerhq/hw-transport-node-hid";
1901
1909
  * const myNodeTransport = await TransportNodeHid.create();
1902
- * const myLedgerSigner = new LedgerSigner211(myNodeTransport, 0);
1910
+ * const myLedgerSigner = new LedgerSigner221(myNodeTransport, 0);
1903
1911
  * ```
1904
1912
  */
1905
1913
  constructor(transport: Transport, accountID: number, eip2645application?: string, pathFunction?: LedgerPathCalculation);
@@ -2042,12 +2050,14 @@ declare class LedgerSigner221<Transport extends Record<any, any> = any> extends
2042
2050
  * Format the Ledger wallet path to an Uint8Array.
2043
2051
  * for a Ledger Starknet DAPP v2.2.0
2044
2052
  * EIP2645 path = 2645'/starknet'/application'/0'/accountId'/0
2053
+ * @deprecated Import it from `starknet/ledger` instead: it is the same function. Importing it from
2054
+ * `starknet` is kept only for backward compatibility, and will be removed in v12.
2045
2055
  * @param {number} accountId Id of account. < 2**31.
2046
2056
  * @param {string} [applicationName='LedgerW'] utf8 string of application name.
2047
2057
  * @returns an Uint8array of 24 bytes.
2048
2058
  * @example
2049
2059
  * ```typescript
2050
- * const result = getLedgerPathBuffer211(0);
2060
+ * const result = getLedgerPathBuffer221(0);
2051
2061
  * // result = Uint8Array(24) [
2052
2062
  * 128, 0, 10, 85, 199, 65, 233, 201,
2053
2063
  * 171, 206, 231, 219, 128, 0, 0, 0,
@@ -2058,9 +2068,13 @@ declare class LedgerSigner221<Transport extends Record<any, any> = any> extends
2058
2068
  declare function getLedgerPathBuffer221(accountId: number, applicationName?: string): Uint8Array;
2059
2069
 
2060
2070
  /**
2061
- * Signer for accounts using a Ledger Nano S+/X signature (Starknet Ledger APP version 2.3.1).
2071
+ * Signer for accounts using a Ledger Nano S+/X signature (Starknet Ledger APP from version 2.3.1
2072
+ * to 2.4.3).
2062
2073
  *
2063
2074
  * The Ledger has to be connected, unlocked and the Starknet APP has to be selected prior of use of this class.
2075
+ * @deprecated Import it from `starknet/ledger` instead: it is the same class, with the transport typed as a
2076
+ * Ledger `Transport`. Importing it from `starknet` is kept only for backward compatibility, and will be
2077
+ * removed in v12.
2064
2078
  */
2065
2079
  declare class LedgerSigner231<Transport extends Record<any, any> = any> extends LedgerSigner221 implements SignerInterface {
2066
2080
  /**
@@ -3962,6 +3976,7 @@ declare const Literal: {
3962
3976
  readonly ClassHash: "core::starknet::class_hash::ClassHash";
3963
3977
  readonly ContractAddress: "core::starknet::contract_address::ContractAddress";
3964
3978
  readonly Secp256k1Point: "core::starknet::secp256k1::Secp256k1Point";
3979
+ readonly StorageAddress: "core::starknet::storage_access::StorageAddress";
3965
3980
  readonly U96: "core::internal::bounded_int::BoundedInt::<0, 79228162514264337593543950335>";
3966
3981
  };
3967
3982
  type Literal = ValuesType<typeof Literal>;
@@ -8081,6 +8096,10 @@ declare const RANGE_CLASS_HASH: {
8081
8096
  readonly min: bigint;
8082
8097
  readonly max: bigint;
8083
8098
  };
8099
+ declare const RANGE_STORAGE_ADDRESS: {
8100
+ readonly min: bigint;
8101
+ readonly max: bigint;
8102
+ };
8084
8103
  declare const LegacyUDC: {
8085
8104
  readonly ADDRESS: "0x041a78e741e5af2fec34b695679bc6891742439f7afb8484ecd7766661ad02bf";
8086
8105
  readonly ENTRYPOINT: "deployContract";
@@ -8230,6 +8249,7 @@ declare const constants_RANGE_I16: typeof RANGE_I16;
8230
8249
  declare const constants_RANGE_I32: typeof RANGE_I32;
8231
8250
  declare const constants_RANGE_I64: typeof RANGE_I64;
8232
8251
  declare const constants_RANGE_I8: typeof RANGE_I8;
8252
+ declare const constants_RANGE_STORAGE_ADDRESS: typeof RANGE_STORAGE_ADDRESS;
8233
8253
  declare const constants_RANGE_U128: typeof RANGE_U128;
8234
8254
  declare const constants_RANGE_U16: typeof RANGE_U16;
8235
8255
  declare const constants_RANGE_U32: typeof RANGE_U32;
@@ -8248,7 +8268,7 @@ declare const constants_TEXT_TO_FELT_MAX_LEN: typeof TEXT_TO_FELT_MAX_LEN;
8248
8268
  declare const constants_UDC: typeof UDC;
8249
8269
  declare const constants_ZERO: typeof ZERO;
8250
8270
  declare namespace constants {
8251
- export { constants_ADDR_BOUND as ADDR_BOUND, constants_API_VERSION as API_VERSION, type constants_ChannelDefaultOptions as ChannelDefaultOptions, type constants_ChannelDefaults as ChannelDefaults, type constants_ChannelMethodOptions as ChannelMethodOptions, constants_DEFAULT_GLOBAL_CONFIG as DEFAULT_GLOBAL_CONFIG, constants_HARDENING_4BYTES as HARDENING_4BYTES, constants_HARDENING_BYTE as HARDENING_BYTE, constants_IS_BROWSER as IS_BROWSER, constants_LegacyUDC as LegacyUDC, constants_MASK_250 as MASK_250, constants_MASK_31 as MASK_31, constants_MAX_STORAGE_ITEM_SIZE as MAX_STORAGE_ITEM_SIZE, _NetworkName as NetworkName, constants_OutsideExecutionCallerAny as OutsideExecutionCallerAny, constants_PAYMASTER_RPC_NODES as PAYMASTER_RPC_NODES, constants_PRIME as PRIME, constants_RANGE_CLASS_HASH as RANGE_CLASS_HASH, constants_RANGE_CONTRACT_ADDRESS as RANGE_CONTRACT_ADDRESS, constants_RANGE_ETH_ADDRESS as RANGE_ETH_ADDRESS, constants_RANGE_FELT as RANGE_FELT, constants_RANGE_I128 as RANGE_I128, constants_RANGE_I16 as RANGE_I16, constants_RANGE_I32 as RANGE_I32, constants_RANGE_I64 as RANGE_I64, constants_RANGE_I8 as RANGE_I8, constants_RANGE_U128 as RANGE_U128, constants_RANGE_U16 as RANGE_U16, constants_RANGE_U32 as RANGE_U32, constants_RANGE_U64 as RANGE_U64, constants_RANGE_U8 as RANGE_U8, constants_RANGE_U96 as RANGE_U96, constants_RPC_DEFAULT_NODES as RPC_DEFAULT_NODES, constants_SNIP9_V1_INTERFACE_ID as SNIP9_V1_INTERFACE_ID, constants_SNIP9_V2_INTERFACE_ID as SNIP9_V2_INTERFACE_ID, constants_SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS as SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS, constants_SYSTEM_MESSAGES as SYSTEM_MESSAGES, _StarknetChainId as StarknetChainId, type constants_SupportedCairoVersion as SupportedCairoVersion, _SupportedRpcVersion as SupportedRpcVersion, type constants_SupportedRpcVersion0_10 as SupportedRpcVersion0_10, type constants_SupportedTransactionVersion as SupportedTransactionVersion, constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN, _TransactionHashPrefix as TransactionHashPrefix, constants_UDC as UDC, constants_ZERO as ZERO };
8271
+ export { constants_ADDR_BOUND as ADDR_BOUND, constants_API_VERSION as API_VERSION, type constants_ChannelDefaultOptions as ChannelDefaultOptions, type constants_ChannelDefaults as ChannelDefaults, type constants_ChannelMethodOptions as ChannelMethodOptions, constants_DEFAULT_GLOBAL_CONFIG as DEFAULT_GLOBAL_CONFIG, constants_HARDENING_4BYTES as HARDENING_4BYTES, constants_HARDENING_BYTE as HARDENING_BYTE, constants_IS_BROWSER as IS_BROWSER, constants_LegacyUDC as LegacyUDC, constants_MASK_250 as MASK_250, constants_MASK_31 as MASK_31, constants_MAX_STORAGE_ITEM_SIZE as MAX_STORAGE_ITEM_SIZE, _NetworkName as NetworkName, constants_OutsideExecutionCallerAny as OutsideExecutionCallerAny, constants_PAYMASTER_RPC_NODES as PAYMASTER_RPC_NODES, constants_PRIME as PRIME, constants_RANGE_CLASS_HASH as RANGE_CLASS_HASH, constants_RANGE_CONTRACT_ADDRESS as RANGE_CONTRACT_ADDRESS, constants_RANGE_ETH_ADDRESS as RANGE_ETH_ADDRESS, constants_RANGE_FELT as RANGE_FELT, constants_RANGE_I128 as RANGE_I128, constants_RANGE_I16 as RANGE_I16, constants_RANGE_I32 as RANGE_I32, constants_RANGE_I64 as RANGE_I64, constants_RANGE_I8 as RANGE_I8, constants_RANGE_STORAGE_ADDRESS as RANGE_STORAGE_ADDRESS, constants_RANGE_U128 as RANGE_U128, constants_RANGE_U16 as RANGE_U16, constants_RANGE_U32 as RANGE_U32, constants_RANGE_U64 as RANGE_U64, constants_RANGE_U8 as RANGE_U8, constants_RANGE_U96 as RANGE_U96, constants_RPC_DEFAULT_NODES as RPC_DEFAULT_NODES, constants_SNIP9_V1_INTERFACE_ID as SNIP9_V1_INTERFACE_ID, constants_SNIP9_V2_INTERFACE_ID as SNIP9_V2_INTERFACE_ID, constants_SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS as SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS, constants_SYSTEM_MESSAGES as SYSTEM_MESSAGES, _StarknetChainId as StarknetChainId, type constants_SupportedCairoVersion as SupportedCairoVersion, _SupportedRpcVersion as SupportedRpcVersion, type constants_SupportedRpcVersion0_10 as SupportedRpcVersion0_10, type constants_SupportedTransactionVersion as SupportedTransactionVersion, constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN, _TransactionHashPrefix as TransactionHashPrefix, constants_UDC as UDC, constants_ZERO as ZERO };
8252
8272
  }
8253
8273
 
8254
8274
  /** What a {@link SubscriptionChannel} needs: a socket to borrow, and how much to buffer. */
@@ -9512,6 +9532,19 @@ declare function verifyMessageInStarknet(provider: ProviderInterface, message: B
9512
9532
 
9513
9533
  declare function getGasPrices(channel: RpcChannel$3 | RpcChannel$2, blockIdentifier?: BlockIdentifier): Promise<GasPrices>;
9514
9534
 
9535
+ /**
9536
+ * @deprecated Use {@link RpcProvider} instead. `Provider` is an alias of it, kept only for
9537
+ * backward compatibility, and will be removed in a future major version. The two are the same
9538
+ * class, so the migration is a rename: no behavior changes.
9539
+ */
9540
+ declare const Provider: typeof RpcProvider;
9541
+ /**
9542
+ * @deprecated Use {@link RpcProvider} instead. `Provider` is an alias of it, kept only for
9543
+ * backward compatibility, and will be removed in a future major version. The two are the same
9544
+ * class, so the migration is a rename: no behavior changes.
9545
+ */
9546
+ type Provider = RpcProvider;
9547
+
9515
9548
  interface Account extends StarknetIdAccountMethods, BrotherIdProviderMethods, FastExecuteAccountMethods {
9516
9549
  }
9517
9550
  declare class Account implements AccountInterface {
@@ -16026,6 +16059,155 @@ declare class CairoContractAddress {
16026
16059
  static factoryFromApiResponse(responseIterator: Iterator<string>): CairoContractAddress;
16027
16060
  }
16028
16061
 
16062
+ /**
16063
+ * A Cairo `core::starknet::storage_access::StorageAddress` : the address of a value in the storage
16064
+ * of a contract.
16065
+ *
16066
+ * On the wire it is a field element like any other, so what this class adds over
16067
+ * {@link CairoFelt252} is the bound of the Cairo `StorageAddress` type : [0, 2^251), the same range
16068
+ * as the Cairo type of a class hash, and narrower than the field.
16069
+ *
16070
+ * A number, a bigint, a decimal string and a hexadecimal string are all read as the same number.
16071
+ * Text is **not** an accepted input : a storage address spelled as words is a mistake, not a value.
16072
+ * @example
16073
+ * ```typescript
16074
+ * // the same address, reached three ways
16075
+ * new CairoStorageAddress('0x1234').toBigInt(); // 4660n
16076
+ * new CairoStorageAddress(4660).toBigInt(); // 4660n
16077
+ * new CairoStorageAddress('4660').toBigInt(); // 4660n
16078
+ * ```
16079
+ */
16080
+ declare class CairoStorageAddress {
16081
+ /**
16082
+ * The address, always as a bigint.
16083
+ * @example
16084
+ * ```typescript
16085
+ * const result = new CairoStorageAddress('0x1234').data;
16086
+ * // result = 4660n
16087
+ * ```
16088
+ */
16089
+ data: bigint;
16090
+ /**
16091
+ * The abi type this class serializes.
16092
+ * @example
16093
+ * ```typescript
16094
+ * const result = CairoStorageAddress.abiSelector;
16095
+ * // result = "core::starknet::storage_access::StorageAddress"
16096
+ * ```
16097
+ */
16098
+ static abiSelector: "core::starknet::storage_access::StorageAddress";
16099
+ /**
16100
+ * Build from a number or a numeric string, refusing text and anything outside the
16101
+ * StorageAddress range.
16102
+ * @param {BigNumberish | boolean} data the address to carry, within [0, 2^251 - 1]
16103
+ * @throws {Error} when the value is text, a decimal number, not a felt252 input, or out of the StorageAddress range
16104
+ * @example
16105
+ * ```typescript
16106
+ * const result = new CairoStorageAddress('0x1234').toApiRequest();
16107
+ * // result = ["4660"]
16108
+ * ```
16109
+ */
16110
+ constructor(data: BigNumberish | boolean | unknown);
16111
+ /**
16112
+ * Serialize to the single felt a contract call carries.
16113
+ * @returns {string[]} one decimal-string felt, flagged as compiled
16114
+ * @example
16115
+ * ```typescript
16116
+ * const result = new CairoStorageAddress('0x1234').toApiRequest();
16117
+ * // result = ["4660"]
16118
+ * ```
16119
+ */
16120
+ toApiRequest(): string[];
16121
+ /**
16122
+ * The address as a number.
16123
+ * @returns {bigint} the number this address holds
16124
+ * @example
16125
+ * ```typescript
16126
+ * const result = new CairoStorageAddress('0x1234').toBigInt();
16127
+ * // result = 4660n
16128
+ * ```
16129
+ */
16130
+ toBigInt(): bigint;
16131
+ /**
16132
+ * The address in hexadecimal, without padding.
16133
+ *
16134
+ * Leading zeros are dropped, as they are everywhere else in the library.
16135
+ * @returns {string} the address as a 0x-prefixed hex string
16136
+ * @example
16137
+ * ```typescript
16138
+ * const result = new CairoStorageAddress(4660).toHexString();
16139
+ * // result = "0x1234"
16140
+ * const result2 = new CairoStorageAddress('0x0034').toHexString();
16141
+ * // result2 = "0x34" (four digits in, two out)
16142
+ * ```
16143
+ */
16144
+ toHexString(): string;
16145
+ /**
16146
+ * Throw unless the value can be carried by a StorageAddress.
16147
+ *
16148
+ * Text is refused first, then a number with a decimal part. A number or a bigint is read as it
16149
+ * is, so that a negative one reaches the range check. Anything else is read as a felt252 — which
16150
+ * is what refuses a null, an object or an unsupported type. The value is finally checked against
16151
+ * the range of the Cairo `StorageAddress` type, [0, 2^251), which is narrower than the field.
16152
+ * @param {BigNumberish | boolean} data the value to check
16153
+ * @throws {Error} when the value is text, a decimal number, not a felt252 input, or out of the StorageAddress range
16154
+ * @example
16155
+ * ```typescript
16156
+ * CairoStorageAddress.validate('0x1234'); // passes
16157
+ * CairoStorageAddress.validate('abc');
16158
+ * // throws Error("Invalid input: a StorageAddress cannot be built from text")
16159
+ * CairoStorageAddress.validate(2n ** 251n);
16160
+ * // throws Error("Value is out of StorageAddress range [0, 3618502788666131106986593281521497120414687020801267626233049500247285301247]")
16161
+ * CairoStorageAddress.validate(-1);
16162
+ * // throws Error("Value is out of StorageAddress range [0, 3618502788666131106986593281521497120414687020801267626233049500247285301247]")
16163
+ * ```
16164
+ */
16165
+ static validate(data: BigNumberish | boolean | unknown): void;
16166
+ /**
16167
+ * Can this value be carried by a StorageAddress?
16168
+ *
16169
+ * The non-throwing form of {@link CairoStorageAddress.validate}, so it answers false for every
16170
+ * input that one refuses, whatever the reason.
16171
+ * @param {BigNumberish | boolean} data the value to test
16172
+ * @returns {boolean} true when the value fits in a StorageAddress
16173
+ * @example
16174
+ * ```typescript
16175
+ * const result = CairoStorageAddress.is('0x1234');
16176
+ * // result = true
16177
+ * const result2 = CairoStorageAddress.is('abc');
16178
+ * // result2 = false (text, not a number)
16179
+ * ```
16180
+ */
16181
+ static is(data: BigNumberish | boolean | unknown): boolean;
16182
+ /**
16183
+ * Is this abi type the one this class serializes?
16184
+ * @param {string} abiType the abi type to test
16185
+ * @returns {boolean} true for `core::starknet::storage_access::StorageAddress`
16186
+ * @example
16187
+ * ```typescript
16188
+ * const result = CairoStorageAddress.isAbiType(
16189
+ * 'core::starknet::storage_access::StorageAddress'
16190
+ * );
16191
+ * // result = true
16192
+ * const result2 = CairoStorageAddress.isAbiType('core::felt252');
16193
+ * // result2 = false
16194
+ * ```
16195
+ */
16196
+ static isAbiType(abiType: string): boolean;
16197
+ /**
16198
+ * Read one StorageAddress off a contract response, advancing the iterator past it.
16199
+ * @param {Iterator<string>} responseIterator the response felts, positioned on this address
16200
+ * @returns {CairoStorageAddress} the address that was read
16201
+ * @example
16202
+ * ```typescript
16203
+ * const response = ['0x1234'];
16204
+ * const result = CairoStorageAddress.factoryFromApiResponse(response.values()).toBigInt();
16205
+ * // result = 4660n
16206
+ * ```
16207
+ */
16208
+ static factoryFromApiResponse(responseIterator: Iterator<string>): CairoStorageAddress;
16209
+ }
16210
+
16029
16211
  /**
16030
16212
  * A Cairo dynamic array : any number of values, all of the same type.
16031
16213
  *
@@ -18155,4 +18337,4 @@ declare class Logger {
18155
18337
  */
18156
18338
  declare const logger: Logger;
18157
18339
 
18158
- export { type Abi, type AbiEntry, type AbiEntryType, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, AbiParser0, AbiParser1, AbiParser2, AbiParserInterface, type AbiStruct, type AbiStructs, Account, type AccountHooks, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AccountOptions, type AllowArray, type ApiEstimateFeeResponse, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BLOCK_HASH, type BLOCK_NUMBER, BatchClient, type BatchClientOptions, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockTransactionTrace, type BlockTransactionsTracesWithInitialReads, type BlockWithTxHashes, BrotherIdImpl, type BrotherIdProviderMethods, type BrotherProfile, type Builtins, type ByteArray, type ByteCode, CairoArray, type CairoAssembly, CairoBool, CairoByteArray, CairoBytes31, CairoClassHash, type CairoContract, CairoContractAddress, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, CairoEthAddress, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFelt252, CairoFixedArray, CairoInt128, CairoInt16, CairoInt32, CairoInt64, CairoInt8, CairoNonZero, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoSecp256k1Point, CairoStruct, CairoTuple, type CairoType, CairoTypeCustomEnum, CairoTypeOption, CairoTypeResult, type CairoTypeStrategy, CairoUint128, CairoUint16, CairoUint256, CairoUint32, CairoUint512, CairoUint64, CairoUint8, CairoUint96, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallResult, type Calldata, type CommonContractOptions, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployAndInvokeTransaction, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransaction, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, Deployer, type DeployerCall, DeployerInterface, EDAMode, EDataAvailabilityMode, ESubscriptionTag, ETH_ADDRESS, ETraceFlag, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion3, ETxnResponseFlag, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type ErrorReceiptResponseHelper, type EstimateFeeBulk, type EstimateFeeResponseBulkOverhead, type EstimateFeeResponseOverhead, EthSigner, type Event$1 as Event, type EventEntry, type EventFilter, type ExecutableDeployAndInvokeTransaction, type ExecutableDeployTransaction, type ExecutableInvokeTransaction, type ExecutableUserInvoke, type ExecutableUserTransaction, type ExecuteOptions, type ExecutionParameters, type FEE_ESTIMATE, type FELT, type FactoryParams, type FastExecuteAccountMethods, type FastExecuteProviderMethods, type FastExecuteResponse, type FastWaitForTransactionOptions, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, HttpTransport, type HttpTransportOptions, type INITIAL_READS, Int, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeTransaction, type InvokeTransactionReceiptResponse, type InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1_HANDLER_TXN, type LedgerPathCalculation, LedgerSigner111 as LedgerSigner, LedgerSigner111, LedgerSigner221, LedgerSigner231, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type LoadedContract, type LogLevel, LogLevelIndex, type Methods, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type PRE_CONFIRMED_STATE_UPDATE, type PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type ParsingStrategy, type PaymasterDetails, type PaymasterFeeEstimate, PaymasterInterface, type PaymasterOptions, PaymasterRpc, type PaymasterRpcOptions, type PaymasterTimeBounds, type PluginConfig, PluginManager, type PreConfirmedBlock, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, type ProviderHooks, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$8 as RPC, index$6 as RPC0102, index$5 as RPC0103, index$4 as RPC0104, index$7 as RPC09, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, type ReconnectOptions, ReconnectingWsTransport, type ReconnectingWsTransportOptions, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsBN, type ResourceBoundsOverhead, ResponseParser, type RevertedTransactionReceiptResponse, type RevertedTransactionReceiptResponseHelper, RpcChannel, RpcError, type RpcNotification, RpcProvider, type RpcProviderOptions, type RpcTransport, SECP256K1_POINT_MAX, SECP256K1_POINT_MIN, type SIMULATION_FLAG, type STATE_UPDATE, type STRK20_ACTION, type STRK20_CALL_AND_PROOF, type STRK20_SHADOW_ACCOUNT_INVOKE_ACTION, type Secp256k1PointStruct, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type Simplify, type SimulateTransaction, type SimulateTransactionDetails, type SimulateTransactionOverhead, type SimulateTransactionOverheadResponse, type SimulateTransactionResponse, type SimulationFlags, type StarkProfile, type StarknetIdAccountMethods, StarknetIdImpl, type StarknetIdProviderMethods, type StarknetPlugin, type StateUpdate, type StateUpdateResponse, type StorageResponse, type SubscribeEventsParams, type SubscribeNewHeadsParams, type SubscribeNewTransactionReceiptsParams, type SubscribeNewTransactionsParams, type SubscribeTransactionStatusParams, Subscription, type SubscriptionBlockIdentifier, type SubscriptionNewHeadsEvent, type SubscriptionNewTransactionEvent, type SubscriptionNewTransactionReceiptsEvent, type SubscriptionOptions, type SubscriptionOwner, type SubscriptionStarknetEventsEvent, type SubscriptionTransactionStatusEvent, type SuccessfulTransactionReceiptResponse, type SuccessfulTransactionReceiptResponseHelper, type TXN_EXECUTION_STATUS, type TXN_HASH, type TXN_STATUS, TimeoutError, type TipAnalysisOptions, type TipEstimate, type TipType, type TokenData, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptValue, type TransactionStatus, type TransactionStatusReceiptSets, type TransactionTrace, TransactionType, type TransactionWithHash, type Tupled, type TypedContractV2, UINT_128_MAX, UINT_128_MIN, UINT_256_HIGH_MAX, UINT_256_HIGH_MIN, UINT_256_LOW_MAX, UINT_256_LOW_MIN, UINT_256_MAX, UINT_256_MIN, UINT_512_MAX, UINT_512_MIN, Uint, type Uint256, type Uint512, type UniversalDeployerContractPayload, type UniversalDetails, type UserInvoke, type UserTransaction, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, type VariantType, WalletAccount, WalletAccountV5, WalletAccountV6, WebSocketChannel, type WebSocketModule, WebSocketNotConnectedError, type WebSocketOptions, WebSocketProvider, type WebSocketProviderOptions, type WeierstrassSignatureType, type WithOptions, WsTransport, type WsTransportOptions, type WsTransportState, addAddressPadding, brotherId, byteArray, cairo, cairoTypeStrategy, compareVersions, config, constants, contractClassResponseToLegacyCompiledContract, contractLoader, createAbiParser, createTransactionReceipt, defaultDeployer, defaultPlugins, ec, encode, enumStrategy, eth, index as events, extractContractHashes, fastCairoTypeStrategy, fastExecute, fastParsingStrategy, getAbiVersion, type getBlockTransactionsTracesOptions, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getGasPrices, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, hdParsingStrategy, isAccount, isCairoType, isFileSystemAvailable, isNoConstructorValid, isPreConfirmedBlock, isPreConfirmedStateUpdate, isPreConfirmedTransaction, isRPC08Plus_ResourceBounds, isRPC08Plus_ResourceBoundsBN, isSierra, isSupportedSpecVersion, isV3Tx, isVersion, json, legacyDeployer, logger, merkle, num, outsideExecution, parseCalldataField, paymaster, provider, selector, shortString, src5, index$1 as stark, starknetId, starknetId$1 as starknetIdPlugin, structStrategy, toAnyPatchVersion, toApiVersion, toReleaseVersion, index$2 as transaction, typedData, uint256, units, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, verifyMessageInStarknet, type waitForTransactionOptions, connect as wallet, connectV5 as walletV5, connectV6 as walletV6 };
18340
+ export { type Abi, type AbiEntry, type AbiEntryType, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, AbiParser0, AbiParser1, AbiParser2, AbiParserInterface, type AbiStruct, type AbiStructs, Account, type AccountHooks, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AccountOptions, type AllowArray, type ApiEstimateFeeResponse, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BLOCK_HASH, type BLOCK_NUMBER, BatchClient, type BatchClientOptions, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockTransactionTrace, type BlockTransactionsTracesWithInitialReads, type BlockWithTxHashes, BrotherIdImpl, type BrotherIdProviderMethods, type BrotherProfile, type Builtins, type ByteArray, type ByteCode, CairoArray, type CairoAssembly, CairoBool, CairoByteArray, CairoBytes31, CairoClassHash, type CairoContract, CairoContractAddress, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, CairoEthAddress, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFelt252, CairoFixedArray, CairoInt128, CairoInt16, CairoInt32, CairoInt64, CairoInt8, CairoNonZero, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoSecp256k1Point, CairoStorageAddress, CairoStruct, CairoTuple, type CairoType, CairoTypeCustomEnum, CairoTypeOption, CairoTypeResult, type CairoTypeStrategy, CairoUint128, CairoUint16, CairoUint256, CairoUint32, CairoUint512, CairoUint64, CairoUint8, CairoUint96, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallResult, type Calldata, type CommonContractOptions, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployAndInvokeTransaction, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransaction, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, Deployer, type DeployerCall, DeployerInterface, EDAMode, EDataAvailabilityMode, ESubscriptionTag, ETH_ADDRESS, ETraceFlag, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion3, ETxnResponseFlag, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type ErrorReceiptResponseHelper, type EstimateFeeBulk, type EstimateFeeResponseBulkOverhead, type EstimateFeeResponseOverhead, EthSigner, type Event$1 as Event, type EventEntry, type EventFilter, type ExecutableDeployAndInvokeTransaction, type ExecutableDeployTransaction, type ExecutableInvokeTransaction, type ExecutableUserInvoke, type ExecutableUserTransaction, type ExecuteOptions, type ExecutionParameters, type FEE_ESTIMATE, type FELT, type FactoryParams, type FastExecuteAccountMethods, type FastExecuteProviderMethods, type FastExecuteResponse, type FastWaitForTransactionOptions, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, HttpTransport, type HttpTransportOptions, type INITIAL_READS, Int, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeTransaction, type InvokeTransactionReceiptResponse, type InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1_HANDLER_TXN, type LedgerPathCalculation, LedgerSigner111 as LedgerSigner, LedgerSigner111, LedgerSigner221, LedgerSigner231, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type LoadedContract, type LogLevel, LogLevelIndex, type Methods, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type PRE_CONFIRMED_STATE_UPDATE, type PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type ParsingStrategy, type PaymasterDetails, type PaymasterFeeEstimate, PaymasterInterface, type PaymasterOptions, PaymasterRpc, type PaymasterRpcOptions, type PaymasterTimeBounds, type PluginConfig, PluginManager, type PreConfirmedBlock, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, Provider, type ProviderHooks, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$8 as RPC, index$6 as RPC0102, index$5 as RPC0103, index$4 as RPC0104, index$7 as RPC09, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, type ReconnectOptions, ReconnectingWsTransport, type ReconnectingWsTransportOptions, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsBN, type ResourceBoundsOverhead, ResponseParser, type RevertedTransactionReceiptResponse, type RevertedTransactionReceiptResponseHelper, RpcChannel, RpcError, type RpcNotification, RpcProvider, type RpcProviderOptions, type RpcTransport, SECP256K1_POINT_MAX, SECP256K1_POINT_MIN, type SIMULATION_FLAG, type STATE_UPDATE, type STRK20_ACTION, type STRK20_CALL_AND_PROOF, type STRK20_SHADOW_ACCOUNT_INVOKE_ACTION, type Secp256k1PointStruct, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type Simplify, type SimulateTransaction, type SimulateTransactionDetails, type SimulateTransactionOverhead, type SimulateTransactionOverheadResponse, type SimulateTransactionResponse, type SimulationFlags, type StarkProfile, type StarknetIdAccountMethods, StarknetIdImpl, type StarknetIdProviderMethods, type StarknetPlugin, type StateUpdate, type StateUpdateResponse, type StorageResponse, type SubscribeEventsParams, type SubscribeNewHeadsParams, type SubscribeNewTransactionReceiptsParams, type SubscribeNewTransactionsParams, type SubscribeTransactionStatusParams, Subscription, type SubscriptionBlockIdentifier, type SubscriptionNewHeadsEvent, type SubscriptionNewTransactionEvent, type SubscriptionNewTransactionReceiptsEvent, type SubscriptionOptions, type SubscriptionOwner, type SubscriptionStarknetEventsEvent, type SubscriptionTransactionStatusEvent, type SuccessfulTransactionReceiptResponse, type SuccessfulTransactionReceiptResponseHelper, type TXN_EXECUTION_STATUS, type TXN_HASH, type TXN_STATUS, TimeoutError, type TipAnalysisOptions, type TipEstimate, type TipType, type TokenData, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptValue, type TransactionStatus, type TransactionStatusReceiptSets, type TransactionTrace, TransactionType, type TransactionWithHash, type Tupled, type TypedContractV2, UINT_128_MAX, UINT_128_MIN, UINT_256_HIGH_MAX, UINT_256_HIGH_MIN, UINT_256_LOW_MAX, UINT_256_LOW_MIN, UINT_256_MAX, UINT_256_MIN, UINT_512_MAX, UINT_512_MIN, Uint, type Uint256, type Uint512, type UniversalDeployerContractPayload, type UniversalDetails, type UserInvoke, type UserTransaction, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, type VariantType, WalletAccount, WalletAccountV5, WalletAccountV6, WebSocketChannel, type WebSocketModule, WebSocketNotConnectedError, type WebSocketOptions, WebSocketProvider, type WebSocketProviderOptions, type WeierstrassSignatureType, type WithOptions, WsTransport, type WsTransportOptions, type WsTransportState, addAddressPadding, brotherId, byteArray, cairo, cairoTypeStrategy, compareVersions, config, constants, contractClassResponseToLegacyCompiledContract, contractLoader, createAbiParser, createTransactionReceipt, defaultDeployer, defaultPlugins, ec, encode, enumStrategy, eth, index as events, extractContractHashes, fastCairoTypeStrategy, fastExecute, fastParsingStrategy, getAbiVersion, type getBlockTransactionsTracesOptions, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getGasPrices, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, hdParsingStrategy, isAccount, isCairoType, isFileSystemAvailable, isNoConstructorValid, isPreConfirmedBlock, isPreConfirmedStateUpdate, isPreConfirmedTransaction, isRPC08Plus_ResourceBounds, isRPC08Plus_ResourceBoundsBN, isSierra, isSupportedSpecVersion, isV3Tx, isVersion, json, legacyDeployer, logger, merkle, num, outsideExecution, parseCalldataField, paymaster, provider, selector, shortString, src5, index$1 as stark, starknetId, starknetId$1 as starknetIdPlugin, structStrategy, toAnyPatchVersion, toApiVersion, toReleaseVersion, index$2 as transaction, typedData, uint256, units, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, verifyMessageInStarknet, type waitForTransactionOptions, connect as wallet, connectV5 as walletV5, connectV6 as walletV6 };
@@ -77,6 +77,7 @@ var starknet = (() => {
77
77
  CairoResult: () => CairoResult,
78
78
  CairoResultVariant: () => CairoResultVariant,
79
79
  CairoSecp256k1Point: () => CairoSecp256k1Point,
80
+ CairoStorageAddress: () => CairoStorageAddress,
80
81
  CairoStruct: () => CairoStruct,
81
82
  CairoTuple: () => CairoTuple,
82
83
  CairoTypeCustomEnum: () => CairoTypeCustomEnum,
@@ -123,7 +124,7 @@ var starknet = (() => {
123
124
  PaymasterInterface: () => PaymasterInterface,
124
125
  PaymasterRpc: () => PaymasterRpc,
125
126
  PluginManager: () => PluginManager,
126
- Provider: () => RpcProvider,
127
+ Provider: () => Provider,
127
128
  ProviderInterface: () => ProviderInterface,
128
129
  RPC: () => api_exports3,
129
130
  RPC0102: () => v0_10_2_exports,
@@ -269,6 +270,7 @@ var starknet = (() => {
269
270
  RANGE_I32: () => RANGE_I32,
270
271
  RANGE_I64: () => RANGE_I64,
271
272
  RANGE_I8: () => RANGE_I8,
273
+ RANGE_STORAGE_ADDRESS: () => RANGE_STORAGE_ADDRESS,
272
274
  RANGE_U128: () => RANGE_U128,
273
275
  RANGE_U16: () => RANGE_U16,
274
276
  RANGE_U32: () => RANGE_U32,
@@ -1236,6 +1238,7 @@ var starknet = (() => {
1236
1238
  var RANGE_ETH_ADDRESS = range(ZERO, 2n ** 160n - 1n);
1237
1239
  var RANGE_CONTRACT_ADDRESS = range(ZERO, ADDR_BOUND - 1n);
1238
1240
  var RANGE_CLASS_HASH = range(ZERO, 2n ** 251n - 1n);
1241
+ var RANGE_STORAGE_ADDRESS = range(ZERO, 2n ** 251n - 1n);
1239
1242
  var LegacyUDC = {
1240
1243
  ADDRESS: "0x041a78e741e5af2fec34b695679bc6891742439f7afb8484ecd7766661ad02bf",
1241
1244
  ENTRYPOINT: "deployContract"
@@ -3203,6 +3206,7 @@ ${indent}}` : "}";
3203
3206
  ClassHash: "core::starknet::class_hash::ClassHash",
3204
3207
  ContractAddress: "core::starknet::contract_address::ContractAddress",
3205
3208
  Secp256k1Point: "core::starknet::secp256k1::Secp256k1Point",
3209
+ StorageAddress: "core::starknet::storage_access::StorageAddress",
3206
3210
  U96: "core::internal::bounded_int::BoundedInt::<0, 79228162514264337593543950335>"
3207
3211
  };
3208
3212
  var ETH_ADDRESS = "core::starknet::eth_address::EthAddress";
@@ -13705,6 +13709,169 @@ ${indent}}` : "}";
13705
13709
  }
13706
13710
  };
13707
13711
 
13712
+ // src/utils/cairoDataTypes/storageAddress.ts
13713
+ var CairoStorageAddress = class _CairoStorageAddress {
13714
+ /**
13715
+ * The address, always as a bigint.
13716
+ * @example
13717
+ * ```typescript
13718
+ * const result = new CairoStorageAddress('0x1234').data;
13719
+ * // result = 4660n
13720
+ * ```
13721
+ */
13722
+ data;
13723
+ /**
13724
+ * The abi type this class serializes.
13725
+ * @example
13726
+ * ```typescript
13727
+ * const result = CairoStorageAddress.abiSelector;
13728
+ * // result = "core::starknet::storage_access::StorageAddress"
13729
+ * ```
13730
+ */
13731
+ static abiSelector = Literal.StorageAddress;
13732
+ /**
13733
+ * Build from a number or a numeric string, refusing text and anything outside the
13734
+ * StorageAddress range.
13735
+ * @param {BigNumberish | boolean} data the address to carry, within [0, 2^251 - 1]
13736
+ * @throws {Error} when the value is text, a decimal number, not a felt252 input, or out of the StorageAddress range
13737
+ * @example
13738
+ * ```typescript
13739
+ * const result = new CairoStorageAddress('0x1234').toApiRequest();
13740
+ * // result = ["4660"]
13741
+ * ```
13742
+ */
13743
+ constructor(data) {
13744
+ _CairoStorageAddress.validate(data);
13745
+ this.data = new CairoFelt252(data).toBigInt();
13746
+ }
13747
+ /**
13748
+ * Serialize to the single felt a contract call carries.
13749
+ * @returns {string[]} one decimal-string felt, flagged as compiled
13750
+ * @example
13751
+ * ```typescript
13752
+ * const result = new CairoStorageAddress('0x1234').toApiRequest();
13753
+ * // result = ["4660"]
13754
+ * ```
13755
+ */
13756
+ toApiRequest() {
13757
+ return addCompiledFlag([this.toBigInt().toString()]);
13758
+ }
13759
+ /**
13760
+ * The address as a number.
13761
+ * @returns {bigint} the number this address holds
13762
+ * @example
13763
+ * ```typescript
13764
+ * const result = new CairoStorageAddress('0x1234').toBigInt();
13765
+ * // result = 4660n
13766
+ * ```
13767
+ */
13768
+ toBigInt() {
13769
+ return this.data;
13770
+ }
13771
+ /**
13772
+ * The address in hexadecimal, without padding.
13773
+ *
13774
+ * Leading zeros are dropped, as they are everywhere else in the library.
13775
+ * @returns {string} the address as a 0x-prefixed hex string
13776
+ * @example
13777
+ * ```typescript
13778
+ * const result = new CairoStorageAddress(4660).toHexString();
13779
+ * // result = "0x1234"
13780
+ * const result2 = new CairoStorageAddress('0x0034').toHexString();
13781
+ * // result2 = "0x34" (four digits in, two out)
13782
+ * ```
13783
+ */
13784
+ toHexString() {
13785
+ return addHexPrefix(this.toBigInt().toString(16));
13786
+ }
13787
+ /**
13788
+ * Throw unless the value can be carried by a StorageAddress.
13789
+ *
13790
+ * Text is refused first, then a number with a decimal part. A number or a bigint is read as it
13791
+ * is, so that a negative one reaches the range check. Anything else is read as a felt252 — which
13792
+ * is what refuses a null, an object or an unsupported type. The value is finally checked against
13793
+ * the range of the Cairo `StorageAddress` type, [0, 2^251), which is narrower than the field.
13794
+ * @param {BigNumberish | boolean} data the value to check
13795
+ * @throws {Error} when the value is text, a decimal number, not a felt252 input, or out of the StorageAddress range
13796
+ * @example
13797
+ * ```typescript
13798
+ * CairoStorageAddress.validate('0x1234'); // passes
13799
+ * CairoStorageAddress.validate('abc');
13800
+ * // throws Error("Invalid input: a StorageAddress cannot be built from text")
13801
+ * CairoStorageAddress.validate(2n ** 251n);
13802
+ * // throws Error("Value is out of StorageAddress range [0, 3618502788666131106986593281521497120414687020801267626233049500247285301247]")
13803
+ * CairoStorageAddress.validate(-1);
13804
+ * // throws Error("Value is out of StorageAddress range [0, 3618502788666131106986593281521497120414687020801267626233049500247285301247]")
13805
+ * ```
13806
+ */
13807
+ static validate(data) {
13808
+ assert(!isText(data), "Invalid input: a StorageAddress cannot be built from text");
13809
+ assert(
13810
+ !isNumber2(data) || Number.isInteger(data),
13811
+ "Invalid input: decimal numbers are not supported, only integers"
13812
+ );
13813
+ const value = isNumber2(data) || isBigInt(data) ? BigInt(data) : new CairoFelt252(data).toBigInt();
13814
+ assert(
13815
+ value >= RANGE_STORAGE_ADDRESS.min && value <= RANGE_STORAGE_ADDRESS.max,
13816
+ `Value is out of StorageAddress range [${RANGE_STORAGE_ADDRESS.min}, ${RANGE_STORAGE_ADDRESS.max}]`
13817
+ );
13818
+ }
13819
+ /**
13820
+ * Can this value be carried by a StorageAddress?
13821
+ *
13822
+ * The non-throwing form of {@link CairoStorageAddress.validate}, so it answers false for every
13823
+ * input that one refuses, whatever the reason.
13824
+ * @param {BigNumberish | boolean} data the value to test
13825
+ * @returns {boolean} true when the value fits in a StorageAddress
13826
+ * @example
13827
+ * ```typescript
13828
+ * const result = CairoStorageAddress.is('0x1234');
13829
+ * // result = true
13830
+ * const result2 = CairoStorageAddress.is('abc');
13831
+ * // result2 = false (text, not a number)
13832
+ * ```
13833
+ */
13834
+ static is(data) {
13835
+ try {
13836
+ _CairoStorageAddress.validate(data);
13837
+ return true;
13838
+ } catch {
13839
+ return false;
13840
+ }
13841
+ }
13842
+ /**
13843
+ * Is this abi type the one this class serializes?
13844
+ * @param {string} abiType the abi type to test
13845
+ * @returns {boolean} true for `core::starknet::storage_access::StorageAddress`
13846
+ * @example
13847
+ * ```typescript
13848
+ * const result = CairoStorageAddress.isAbiType(
13849
+ * 'core::starknet::storage_access::StorageAddress'
13850
+ * );
13851
+ * // result = true
13852
+ * const result2 = CairoStorageAddress.isAbiType('core::felt252');
13853
+ * // result2 = false
13854
+ * ```
13855
+ */
13856
+ static isAbiType(abiType) {
13857
+ return abiType === _CairoStorageAddress.abiSelector;
13858
+ }
13859
+ /**
13860
+ * Read one StorageAddress off a contract response, advancing the iterator past it.
13861
+ * @param {Iterator<string>} responseIterator the response felts, positioned on this address
13862
+ * @returns {CairoStorageAddress} the address that was read
13863
+ * @example
13864
+ * ```typescript
13865
+ * const response = ['0x1234'];
13866
+ * const result = CairoStorageAddress.factoryFromApiResponse(response.values()).toBigInt();
13867
+ * // result = 4660n
13868
+ * ```
13869
+ */
13870
+ static factoryFromApiResponse(responseIterator) {
13871
+ return new _CairoStorageAddress(getNext(responseIterator));
13872
+ }
13873
+ };
13874
+
13708
13875
  // src/utils/cairoDataTypes/ethAddress.ts
13709
13876
  var CairoEthAddress = class _CairoEthAddress {
13710
13877
  /**
@@ -16111,6 +16278,7 @@ ${indent}}` : "}";
16111
16278
  CairoEthAddress,
16112
16279
  CairoClassHash,
16113
16280
  CairoContractAddress,
16281
+ CairoStorageAddress,
16114
16282
  CairoBytes31,
16115
16283
  CairoByteArray,
16116
16284
  CairoSecp256k1Point,
@@ -16184,6 +16352,7 @@ ${indent}}` : "}";
16184
16352
  [CairoEthAddress.abiSelector]: (instance) => instance.toBigInt(),
16185
16353
  [CairoClassHash.abiSelector]: (instance) => instance.toBigInt(),
16186
16354
  [CairoContractAddress.abiSelector]: (instance) => instance.toBigInt(),
16355
+ [CairoStorageAddress.abiSelector]: (instance) => instance.toBigInt(),
16187
16356
  [CairoBytes31.abiSelector]: (instance) => instance.decodeUtf8(),
16188
16357
  [CairoByteArray.abiSelector]: (instance) => instance.decodeUtf8(),
16189
16358
  [CairoSecp256k1Point.abiSelector]: (instance) => instance.toBigInt(),
@@ -23091,6 +23260,9 @@ ${indent}}` : "}";
23091
23260
  WebSocketProvider.prototype[Symbol.dispose] = WebSocketProvider.prototype.dispose;
23092
23261
  }
23093
23262
 
23263
+ // src/provider/index.ts
23264
+ var Provider = RpcProvider;
23265
+
23094
23266
  // src/signer/interface.ts
23095
23267
  var SignerInterface = class {
23096
23268
  };
@@ -23554,13 +23726,13 @@ ${indent}}` : "}";
23554
23726
  *
23555
23727
  * If you are using APP v2.2.1 with an account created with the v1.1.1, you need to use :
23556
23728
  * ```typescript
23557
- * const myLedgerSigner = new LedgerSigner211(myNodeTransport, 0, undefined, getLedgerPathBuffer111);
23729
+ * const myLedgerSigner = new LedgerSigner221(myNodeTransport, 0, undefined, getLedgerPathBuffer111);
23558
23730
  * ```
23559
23731
  * @example
23560
23732
  * ```typescript
23561
23733
  * import TransportNodeHid from "@ledgerhq/hw-transport-node-hid";
23562
23734
  * const myNodeTransport = await TransportNodeHid.create();
23563
- * const myLedgerSigner = new LedgerSigner211(myNodeTransport, 0);
23735
+ * const myLedgerSigner = new LedgerSigner221(myNodeTransport, 0);
23564
23736
  * ```
23565
23737
  */
23566
23738
  constructor(transport, accountID, eip2645application = "LedgerW", pathFunction = getLedgerPathBuffer221) {