starknet 11.0.3 → 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 +12 -0
- package/dist/index.d.ts +654 -138
- package/dist/index.global.js +11138 -10715
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +2562 -2138
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2561 -2138
- package/dist/index.mjs.map +1 -1
- package/dist/ledger/index.d.ts +116 -0
- package/dist/ledger/index.js +75 -0
- package/dist/ledger/index.js.map +1 -0
- package/dist/ledger/index.mjs +32 -0
- package/dist/ledger/index.mjs.map +1 -0
- package/package.json +23 -2
package/dist/index.d.ts
CHANGED
|
@@ -243,25 +243,43 @@ type LegacyEvent = {
|
|
|
243
243
|
keys: CONTRACT.EVENT_FIELD[];
|
|
244
244
|
};
|
|
245
245
|
|
|
246
|
-
/**
|
|
246
|
+
/** Cairo Assembly .casm */
|
|
247
|
+
type CairoAssembly = {
|
|
248
|
+
prime: string;
|
|
249
|
+
compiler_version: string;
|
|
250
|
+
bytecode: ByteCode;
|
|
251
|
+
hints: any[];
|
|
252
|
+
pythonic_hints?: PythonicHints;
|
|
253
|
+
bytecode_segment_lengths?: number[];
|
|
254
|
+
entry_points_by_type: EntryPointsByType;
|
|
255
|
+
};
|
|
256
|
+
/** COMPILED CONTRACT */
|
|
247
257
|
/**
|
|
248
|
-
* format produced after
|
|
258
|
+
* format produced after starknet-compile .cairo to .json
|
|
259
|
+
*
|
|
260
|
+
* sierra_program is hex array
|
|
249
261
|
*/
|
|
250
|
-
type
|
|
251
|
-
|
|
252
|
-
|
|
262
|
+
type CompiledSierra = {
|
|
263
|
+
sierra_program: ByteCode;
|
|
264
|
+
sierra_program_debug_info?: SierraProgramDebugInfo;
|
|
265
|
+
contract_class_version: string;
|
|
266
|
+
entry_points_by_type: SierraEntryPointsByType;
|
|
253
267
|
abi: Abi;
|
|
254
268
|
};
|
|
255
269
|
/**
|
|
256
|
-
* format produced after
|
|
270
|
+
* format produced after compressing 'sierra_program', stringifies 'abi' property and omit sierra_program_debug_info
|
|
271
|
+
*
|
|
272
|
+
* CompressedCompiledSierra
|
|
257
273
|
*/
|
|
258
|
-
type
|
|
259
|
-
|
|
274
|
+
type SierraContractClass = Omit<CompiledSierra, 'abi' | 'sierra_program' | 'sierra_program_debug_info'> & {
|
|
275
|
+
sierra_program: string;
|
|
276
|
+
abi: string;
|
|
260
277
|
};
|
|
278
|
+
type CompiledSierraCasm = CairoAssembly;
|
|
261
279
|
/** SUBTYPES */
|
|
280
|
+
type ByteCode = string[];
|
|
281
|
+
type PythonicHints = [number, string[]][];
|
|
262
282
|
type Builtins = string[];
|
|
263
|
-
type CompressedProgram = string;
|
|
264
|
-
type Hint = Record<string, unknown>;
|
|
265
283
|
type EntryPointsByType = {
|
|
266
284
|
CONSTRUCTOR: ContractEntryPointFields[];
|
|
267
285
|
EXTERNAL: ContractEntryPointFields[];
|
|
@@ -272,6 +290,39 @@ type ContractEntryPointFields = {
|
|
|
272
290
|
offset: string | number;
|
|
273
291
|
builtins?: Builtins;
|
|
274
292
|
};
|
|
293
|
+
type SierraProgramDebugInfo = {
|
|
294
|
+
type_names: [number, string][];
|
|
295
|
+
libfunc_names: [number, string][];
|
|
296
|
+
user_func_names: [number, string][];
|
|
297
|
+
};
|
|
298
|
+
type SierraEntryPointsByType = {
|
|
299
|
+
CONSTRUCTOR: SierraContractEntryPointFields[];
|
|
300
|
+
EXTERNAL: SierraContractEntryPointFields[];
|
|
301
|
+
L1_HANDLER: SierraContractEntryPointFields[];
|
|
302
|
+
};
|
|
303
|
+
type SierraContractEntryPointFields = {
|
|
304
|
+
selector: string;
|
|
305
|
+
function_idx: number;
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
/** LEGACY CONTRACT */
|
|
309
|
+
/**
|
|
310
|
+
* format produced after compressing 'program' property
|
|
311
|
+
*/
|
|
312
|
+
type LegacyContractClass = {
|
|
313
|
+
program: CompressedProgram;
|
|
314
|
+
entry_points_by_type: EntryPointsByType;
|
|
315
|
+
abi: Abi;
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* format produced after compiling .cairo to .json
|
|
319
|
+
*/
|
|
320
|
+
type LegacyCompiledContract = Omit<LegacyContractClass, 'program'> & {
|
|
321
|
+
program: Program;
|
|
322
|
+
};
|
|
323
|
+
/** SUBTYPES */
|
|
324
|
+
type CompressedProgram = string;
|
|
325
|
+
type Hint = Record<string, unknown>;
|
|
275
326
|
interface Program {
|
|
276
327
|
builtins: string[];
|
|
277
328
|
data: string[];
|
|
@@ -363,57 +414,6 @@ interface Program {
|
|
|
363
414
|
}>;
|
|
364
415
|
}
|
|
365
416
|
|
|
366
|
-
/** Cairo Assembly .casm */
|
|
367
|
-
type CairoAssembly = {
|
|
368
|
-
prime: string;
|
|
369
|
-
compiler_version: string;
|
|
370
|
-
bytecode: ByteCode;
|
|
371
|
-
hints: any[];
|
|
372
|
-
pythonic_hints?: PythonicHints;
|
|
373
|
-
bytecode_segment_lengths?: number[];
|
|
374
|
-
entry_points_by_type: EntryPointsByType;
|
|
375
|
-
};
|
|
376
|
-
/** COMPILED CONTRACT */
|
|
377
|
-
/**
|
|
378
|
-
* format produced after starknet-compile .cairo to .json
|
|
379
|
-
*
|
|
380
|
-
* sierra_program is hex array
|
|
381
|
-
*/
|
|
382
|
-
type CompiledSierra = {
|
|
383
|
-
sierra_program: ByteCode;
|
|
384
|
-
sierra_program_debug_info?: SierraProgramDebugInfo;
|
|
385
|
-
contract_class_version: string;
|
|
386
|
-
entry_points_by_type: SierraEntryPointsByType;
|
|
387
|
-
abi: Abi;
|
|
388
|
-
};
|
|
389
|
-
/**
|
|
390
|
-
* format produced after compressing 'sierra_program', stringifies 'abi' property and omit sierra_program_debug_info
|
|
391
|
-
*
|
|
392
|
-
* CompressedCompiledSierra
|
|
393
|
-
*/
|
|
394
|
-
type SierraContractClass = Omit<CompiledSierra, 'abi' | 'sierra_program' | 'sierra_program_debug_info'> & {
|
|
395
|
-
sierra_program: string;
|
|
396
|
-
abi: string;
|
|
397
|
-
};
|
|
398
|
-
type CompiledSierraCasm = CairoAssembly;
|
|
399
|
-
/** SUBTYPES */
|
|
400
|
-
type ByteCode = string[];
|
|
401
|
-
type PythonicHints = [number, string[]][];
|
|
402
|
-
type SierraProgramDebugInfo = {
|
|
403
|
-
type_names: [number, string][];
|
|
404
|
-
libfunc_names: [number, string][];
|
|
405
|
-
user_func_names: [number, string][];
|
|
406
|
-
};
|
|
407
|
-
type SierraEntryPointsByType = {
|
|
408
|
-
CONSTRUCTOR: SierraContractEntryPointFields[];
|
|
409
|
-
EXTERNAL: SierraContractEntryPointFields[];
|
|
410
|
-
L1_HANDLER: SierraContractEntryPointFields[];
|
|
411
|
-
};
|
|
412
|
-
type SierraContractEntryPointFields = {
|
|
413
|
-
selector: string;
|
|
414
|
-
function_idx: number;
|
|
415
|
-
};
|
|
416
|
-
|
|
417
417
|
/**
|
|
418
418
|
* format produced after compressing compiled contract
|
|
419
419
|
*
|
|
@@ -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
|
|
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
|
|
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 =
|
|
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
|
/**
|
|
@@ -2697,7 +2711,6 @@ declare abstract class AccountInterface {
|
|
|
2697
2711
|
/**
|
|
2698
2712
|
* Declare a contract class on Starknet
|
|
2699
2713
|
*
|
|
2700
|
-
// eslint-disable-next-line prettier/prettier
|
|
2701
2714
|
* @param contractPayload - Contract declaration payload
|
|
2702
2715
|
* - .contract - Compiled Sierra contract
|
|
2703
2716
|
* - .classHash - Pre-computed class hash (optional)
|
|
@@ -3963,6 +3976,7 @@ declare const Literal: {
|
|
|
3963
3976
|
readonly ClassHash: "core::starknet::class_hash::ClassHash";
|
|
3964
3977
|
readonly ContractAddress: "core::starknet::contract_address::ContractAddress";
|
|
3965
3978
|
readonly Secp256k1Point: "core::starknet::secp256k1::Secp256k1Point";
|
|
3979
|
+
readonly StorageAddress: "core::starknet::storage_access::StorageAddress";
|
|
3966
3980
|
readonly U96: "core::internal::bounded_int::BoundedInt::<0, 79228162514264337593543950335>";
|
|
3967
3981
|
};
|
|
3968
3982
|
type Literal = ValuesType<typeof Literal>;
|
|
@@ -4148,10 +4162,6 @@ declare abstract class AbiParserInterface {
|
|
|
4148
4162
|
* too — `1`, `0n`, `'1'`, `'0x0'` — because that is how a bool comes back from a node, as a felt
|
|
4149
4163
|
* rather than as a JS value. Any other number is refused : a bool is not a felt narrowed to a
|
|
4150
4164
|
* range, it is exactly two values.
|
|
4151
|
-
*
|
|
4152
|
-
* On the request side the library is stricter still : `CallData.compile` runs `validateFields`
|
|
4153
|
-
* first, which requires a real boolean. So a `1` reaching a `core::bool` argument is refused there
|
|
4154
|
-
* before this class ever sees it.
|
|
4155
4165
|
* @example
|
|
4156
4166
|
* ```typescript
|
|
4157
4167
|
* // the same value, reached three ways
|
|
@@ -7174,10 +7184,10 @@ declare class AbiParser2 extends AbiParser1 {
|
|
|
7174
7184
|
/**
|
|
7175
7185
|
* The strategy the composite classes drive.
|
|
7176
7186
|
*
|
|
7177
|
-
* It carries the leaf types
|
|
7178
|
-
*
|
|
7179
|
-
*
|
|
7180
|
-
*
|
|
7187
|
+
* It carries the leaf types, and the composites whose abi type is a family rather than one
|
|
7188
|
+
* string — tuple, array, Option, Result, NonZero, fixed array — each found through
|
|
7189
|
+
* `dynamicSelectors`. A contract's own structs and enums are added by the parser. This is the
|
|
7190
|
+
* default strategy of the Cairo 1 parsers, `AbiParser1` and `AbiParser2`.
|
|
7181
7191
|
* @example
|
|
7182
7192
|
* ```typescript
|
|
7183
7193
|
* const felts = cairoTypeStrategy.constructors['core::integer::u8'](44, cairoTypeStrategy)
|
|
@@ -8086,6 +8096,10 @@ declare const RANGE_CLASS_HASH: {
|
|
|
8086
8096
|
readonly min: bigint;
|
|
8087
8097
|
readonly max: bigint;
|
|
8088
8098
|
};
|
|
8099
|
+
declare const RANGE_STORAGE_ADDRESS: {
|
|
8100
|
+
readonly min: bigint;
|
|
8101
|
+
readonly max: bigint;
|
|
8102
|
+
};
|
|
8089
8103
|
declare const LegacyUDC: {
|
|
8090
8104
|
readonly ADDRESS: "0x041a78e741e5af2fec34b695679bc6891742439f7afb8484ecd7766661ad02bf";
|
|
8091
8105
|
readonly ENTRYPOINT: "deployContract";
|
|
@@ -8235,6 +8249,7 @@ declare const constants_RANGE_I16: typeof RANGE_I16;
|
|
|
8235
8249
|
declare const constants_RANGE_I32: typeof RANGE_I32;
|
|
8236
8250
|
declare const constants_RANGE_I64: typeof RANGE_I64;
|
|
8237
8251
|
declare const constants_RANGE_I8: typeof RANGE_I8;
|
|
8252
|
+
declare const constants_RANGE_STORAGE_ADDRESS: typeof RANGE_STORAGE_ADDRESS;
|
|
8238
8253
|
declare const constants_RANGE_U128: typeof RANGE_U128;
|
|
8239
8254
|
declare const constants_RANGE_U16: typeof RANGE_U16;
|
|
8240
8255
|
declare const constants_RANGE_U32: typeof RANGE_U32;
|
|
@@ -8253,7 +8268,7 @@ declare const constants_TEXT_TO_FELT_MAX_LEN: typeof TEXT_TO_FELT_MAX_LEN;
|
|
|
8253
8268
|
declare const constants_UDC: typeof UDC;
|
|
8254
8269
|
declare const constants_ZERO: typeof ZERO;
|
|
8255
8270
|
declare namespace constants {
|
|
8256
|
-
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 };
|
|
8257
8272
|
}
|
|
8258
8273
|
|
|
8259
8274
|
/** What a {@link SubscriptionChannel} needs: a socket to borrow, and how much to buffer. */
|
|
@@ -9517,6 +9532,19 @@ declare function verifyMessageInStarknet(provider: ProviderInterface, message: B
|
|
|
9517
9532
|
|
|
9518
9533
|
declare function getGasPrices(channel: RpcChannel$3 | RpcChannel$2, blockIdentifier?: BlockIdentifier): Promise<GasPrices>;
|
|
9519
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
|
+
|
|
9520
9548
|
interface Account extends StarknetIdAccountMethods, BrotherIdProviderMethods, FastExecuteAccountMethods {
|
|
9521
9549
|
}
|
|
9522
9550
|
declare class Account implements AccountInterface {
|
|
@@ -9744,25 +9772,75 @@ type WalletAccountV6Options = {
|
|
|
9744
9772
|
paymaster?: PaymasterOptions | PaymasterInterface;
|
|
9745
9773
|
};
|
|
9746
9774
|
|
|
9775
|
+
/**
|
|
9776
|
+
* @deprecated Use {@link WalletAccountV6} (get-starknet v6) instead. This class is kept only for
|
|
9777
|
+
* DAPPs that are still on get-starknet v4.
|
|
9778
|
+
*
|
|
9779
|
+
* @remarks
|
|
9780
|
+
* Account that lets a wallet sign and send the transactions, using get-starknet v4.
|
|
9781
|
+
* It represents the 'Selected Active' Account inside the Connected Wallet.
|
|
9782
|
+
*
|
|
9783
|
+
* The private key stays in the wallet. Reads go to the RPC node given at the instantiation,
|
|
9784
|
+
* writes go to the wallet. It works only in a DAPP, not in a Node.js script.
|
|
9785
|
+
*
|
|
9786
|
+
* The wallet is selected with the `get-starknet` v4 library. Its `connect()` function opens a
|
|
9787
|
+
* window with the list of wallets. It returns the `StarknetWindowObject` (SWO) of the wallet that
|
|
9788
|
+
* the user selected. With `get-starknet-core` v4 you can also build your own UI and logic. See
|
|
9789
|
+
* [this DAPP](https://github.com/PhilippeR26/Starknet-WalletAccount/blob/53514a5529c4aebe9e7c6331186e83b7a7310ce0/src/app/components/client/WalletHandle/SelectWallet.tsx)
|
|
9790
|
+
* for an example where only the wallets compatible with the Starknet Wallet API can be selected.
|
|
9791
|
+
*
|
|
9792
|
+
* The address and the chain ID follow the wallet automatically. This can lead to reads and
|
|
9793
|
+
* writes on different networks, so create a new instance each time the account or the network
|
|
9794
|
+
* changes.
|
|
9795
|
+
*
|
|
9796
|
+
* The wallet emits 2 events: `accountsChanged` and `networkChanged`.
|
|
9797
|
+
* A change of network emits both. A change of account emits only `accountsChanged`.
|
|
9798
|
+
* You can subscribe with the SWO (`on`) or with the `onAccountChange` and `onNetworkChanged`
|
|
9799
|
+
* methods of this class. To unsubscribe, call `off` on the SWO with the same function.
|
|
9800
|
+
*
|
|
9801
|
+
* Needs `@starknet-io/get-starknet` v4.0.3 min.
|
|
9802
|
+
*
|
|
9803
|
+
* @example
|
|
9804
|
+
* ```typescript
|
|
9805
|
+
* import { connect } from '@starknet-io/get-starknet';
|
|
9806
|
+
* import { WalletAccount, wallet } from 'starknet';
|
|
9807
|
+
* const selectedWalletSWO = await connect({ modalMode: 'alwaysAsk', modalTheme: 'light' });
|
|
9808
|
+
* const myWalletAccount = await WalletAccount.connect(
|
|
9809
|
+
* { nodeUrl: 'https://api.zan.top/public/starknet-sepolia/rpc/v0_10' },
|
|
9810
|
+
* selectedWalletSWO
|
|
9811
|
+
* );
|
|
9812
|
+
* // The wallet writes on this network:
|
|
9813
|
+
* const writeChainId = await wallet.requestChainId(myWalletAccount.walletProvider);
|
|
9814
|
+
* // writeChainId = '0x534e5f5345504f4c4941' (SN_SEPOLIA, if the wallet is on Sepolia)
|
|
9815
|
+
* // The provider reads on this network:
|
|
9816
|
+
* const readChainId = await myWalletAccount.provider.getChainId();
|
|
9817
|
+
* // readChainId = '0x534e5f5345504f4c4941'
|
|
9818
|
+
* ```
|
|
9819
|
+
* @example
|
|
9820
|
+
* ```typescript
|
|
9821
|
+
* // Subscribe with the wallet object (SWO). Unsubscribe with `.off` and the same function.
|
|
9822
|
+
* const handleAccount: AccountChangeEventHandler = (accounts: string[] | undefined) => {
|
|
9823
|
+
* if (accounts?.length) console.log('new address =', accounts[0]);
|
|
9824
|
+
* };
|
|
9825
|
+
* const handleNetwork: NetworkChangeEventHandler = (chainId?: string) => {
|
|
9826
|
+
* if (chainId) console.log('new chain =', chainId);
|
|
9827
|
+
* };
|
|
9828
|
+
* selectedWalletSWO.on('accountsChanged', handleAccount);
|
|
9829
|
+
* selectedWalletSWO.on('networkChanged', handleNetwork);
|
|
9830
|
+
* selectedWalletSWO.off('accountsChanged', handleAccount);
|
|
9831
|
+
* selectedWalletSWO.off('networkChanged', handleNetwork);
|
|
9832
|
+
* ```
|
|
9833
|
+
*/
|
|
9747
9834
|
declare class WalletAccount extends Account {
|
|
9748
9835
|
walletProvider: StarknetWalletProvider;
|
|
9749
9836
|
constructor(options: WalletAccountV4Options);
|
|
9750
|
-
/**
|
|
9751
|
-
* WALLET EVENTS
|
|
9752
|
-
*/
|
|
9753
9837
|
onAccountChange(callback: AccountChangeEventHandler): void;
|
|
9754
9838
|
onNetworkChanged(callback: NetworkChangeEventHandler): void;
|
|
9755
|
-
/**
|
|
9756
|
-
* WALLET SPECIFIC METHODS
|
|
9757
|
-
*/
|
|
9758
9839
|
requestAccounts(silentMode?: boolean): Promise<string[]>;
|
|
9759
9840
|
getPermissions(): Promise<"accounts"[]>;
|
|
9760
9841
|
switchStarknetChain(chainId: _StarknetChainId): Promise<boolean>;
|
|
9761
9842
|
watchAsset(asset: WatchAssetParameters): Promise<boolean>;
|
|
9762
9843
|
addStarknetChain(chain: AddStarknetChainParameters): Promise<boolean>;
|
|
9763
|
-
/**
|
|
9764
|
-
* ACCOUNT METHODS
|
|
9765
|
-
*/
|
|
9766
9844
|
execute(calls: AllowArray<Call>): Promise<RPCSPEC0104.AddInvokeTransactionResult>;
|
|
9767
9845
|
declare(payload: DeclareContractPayload): Promise<RPCSPEC0104.AddDeclareTransactionResult>;
|
|
9768
9846
|
deploy(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[]): Promise<MultiDeployContractResponse>;
|
|
@@ -9772,8 +9850,25 @@ declare class WalletAccount extends Account {
|
|
|
9772
9850
|
}
|
|
9773
9851
|
|
|
9774
9852
|
/**
|
|
9775
|
-
*
|
|
9776
|
-
*
|
|
9853
|
+
* Account that lets a browser wallet sign and send the transactions, using get-starknet v5.
|
|
9854
|
+
*
|
|
9855
|
+
* The private key stays in the wallet. Reads go to the RPC node of the provider, writes go to
|
|
9856
|
+
* the wallet. It works only in a DAPP, not in a Node.js script.
|
|
9857
|
+
* For a new DAPP, use {@link WalletAccountV6} (get-starknet v6) instead.
|
|
9858
|
+
*
|
|
9859
|
+
* Create it with {@link WalletAccountV5.connect}. The address and the chain ID follow the
|
|
9860
|
+
* wallet automatically when the user changes them.
|
|
9861
|
+
* @example
|
|
9862
|
+
* ```typescript
|
|
9863
|
+
* import { createStore } from '@starknet-io/get-starknet-discovery'; // v5.0.0 min
|
|
9864
|
+
* const [selectedWallet] = createStore().getWallets(); // let the user choose in your own UI
|
|
9865
|
+
* const myWalletAccount = await WalletAccountV5.connect(
|
|
9866
|
+
* { nodeUrl: 'https://api.zan.top/public/starknet-sepolia/rpc/v0_10' },
|
|
9867
|
+
* selectedWallet
|
|
9868
|
+
* );
|
|
9869
|
+
* const result = await myWalletAccount.execute(myCall);
|
|
9870
|
+
* // result = { transaction_hash: '0x...' }
|
|
9871
|
+
* ```
|
|
9777
9872
|
*/
|
|
9778
9873
|
declare class WalletAccountV5 extends Account {
|
|
9779
9874
|
walletProvider: WalletWithStarknetFeatures;
|
|
@@ -9787,37 +9882,203 @@ declare class WalletAccountV5 extends Account {
|
|
|
9787
9882
|
* Released by {@link unsubscribeChange}.
|
|
9788
9883
|
*/
|
|
9789
9884
|
private changeSubscriptions;
|
|
9790
|
-
constructor(options: WalletAccountV5Options);
|
|
9791
9885
|
/**
|
|
9792
|
-
*
|
|
9886
|
+
* Prefer {@link WalletAccountV5.connect}: it also asks the wallet for the address.
|
|
9887
|
+
* @param {WalletAccountV5Options} options - The provider, the wallet, the account address, and
|
|
9888
|
+
* optionally the Cairo version and the paymaster.
|
|
9889
|
+
* @example
|
|
9890
|
+
* ```typescript
|
|
9891
|
+
* const myWalletAccount = new WalletAccountV5({
|
|
9892
|
+
* provider: { nodeUrl: 'https://api.zan.top/public/starknet-sepolia/rpc/v0_10' },
|
|
9893
|
+
* walletProvider: selectedWallet,
|
|
9894
|
+
* address: '0x...', // an address that the user already allowed in the wallet
|
|
9895
|
+
* });
|
|
9896
|
+
* ```
|
|
9793
9897
|
*/
|
|
9898
|
+
constructor(options: WalletAccountV5Options);
|
|
9794
9899
|
/**
|
|
9795
9900
|
* Subscribe a callback to wallet account/network changes.
|
|
9796
9901
|
* @param {(change: StandardEventsChangeProperties) => void} callback called on each change.
|
|
9797
9902
|
* @returns {() => void} a function to unsubscribe this specific callback.
|
|
9903
|
+
* @example
|
|
9904
|
+
* ```typescript
|
|
9905
|
+
* const unsubscribe = myWalletAccount.onChange((change) => {
|
|
9906
|
+
* console.log('new address =', change.accounts?.[0]?.address);
|
|
9907
|
+
* });
|
|
9908
|
+
* // Later, to stop this callback only:
|
|
9909
|
+
* unsubscribe();
|
|
9910
|
+
* ```
|
|
9798
9911
|
*/
|
|
9799
9912
|
onChange(callback: (change: StandardEventsChangeProperties) => void): () => void;
|
|
9800
9913
|
/**
|
|
9801
9914
|
* Unsubscribe from all wallet events, including the callbacks registered through {@link onChange}.
|
|
9802
9915
|
* To call before the instance is deleted.
|
|
9916
|
+
* @example
|
|
9917
|
+
* ```typescript
|
|
9918
|
+
* // In the cleanup of a React effect, or before you stop using the instance:
|
|
9919
|
+
* myWalletAccount.unsubscribeChange();
|
|
9920
|
+
* ```
|
|
9803
9921
|
*/
|
|
9804
9922
|
unsubscribeChange(): void;
|
|
9805
9923
|
/**
|
|
9806
|
-
*
|
|
9924
|
+
* Ask the wallet for the addresses that the user allowed for this DAPP.
|
|
9925
|
+
* @param {boolean} [silentMode=false] - false: the wallet can ask the user. true: no window;
|
|
9926
|
+
* only the addresses already allowed are returned.
|
|
9927
|
+
* @returns {Promise<Address[]>} The allowed addresses.
|
|
9928
|
+
* @example
|
|
9929
|
+
* ```typescript
|
|
9930
|
+
* const addresses = await myWalletAccount.requestAccounts();
|
|
9931
|
+
* // addresses = ['0x...']
|
|
9932
|
+
* ```
|
|
9807
9933
|
*/
|
|
9808
9934
|
requestAccounts(silentMode?: boolean): Promise<string[]>;
|
|
9935
|
+
/**
|
|
9936
|
+
* Ask the wallet if this DAPP is allowed.
|
|
9937
|
+
* @returns {Promise<Permission[]>} `['accounts']` when the DAPP is allowed.
|
|
9938
|
+
* @example
|
|
9939
|
+
* ```typescript
|
|
9940
|
+
* const permissions = await myWalletAccount.getPermissions();
|
|
9941
|
+
* // permissions = ['accounts']
|
|
9942
|
+
* ```
|
|
9943
|
+
*/
|
|
9809
9944
|
getPermissions(): Promise<"accounts"[]>;
|
|
9945
|
+
/**
|
|
9946
|
+
* Ask the wallet to change its current network.
|
|
9947
|
+
* @param {StarknetChainId} chainId - The network to use.
|
|
9948
|
+
* @returns {Promise<boolean>} true if the wallet changed the network.
|
|
9949
|
+
* @example
|
|
9950
|
+
* ```typescript
|
|
9951
|
+
* const changed = await myWalletAccount.switchStarknetChain(constants.StarknetChainId.SN_SEPOLIA);
|
|
9952
|
+
* // changed = true
|
|
9953
|
+
* ```
|
|
9954
|
+
*/
|
|
9810
9955
|
switchStarknetChain(chainId: _StarknetChainId): Promise<boolean>;
|
|
9956
|
+
/**
|
|
9957
|
+
* Ask the wallet to display a token in its list.
|
|
9958
|
+
* @param {WatchAssetParameters} asset - The token to display.
|
|
9959
|
+
* @returns {Promise<boolean>} true if the token was added.
|
|
9960
|
+
* @example
|
|
9961
|
+
* ```typescript
|
|
9962
|
+
* const added = await myWalletAccount.watchAsset({ type: 'ERC20', options: { address: tokenAddress } });
|
|
9963
|
+
* // added = true
|
|
9964
|
+
* ```
|
|
9965
|
+
*/
|
|
9811
9966
|
watchAsset(asset: WatchAssetParameters$1): Promise<boolean>;
|
|
9967
|
+
/**
|
|
9968
|
+
* Ask the wallet to add a custom Starknet network.
|
|
9969
|
+
* @param {AddStarknetChainParameters} chain - The network to add.
|
|
9970
|
+
* @returns {Promise<boolean>} true if the network was added.
|
|
9971
|
+
* @example
|
|
9972
|
+
* ```typescript
|
|
9973
|
+
* const added = await myWalletAccount.addStarknetChain({
|
|
9974
|
+
* id: 'my-devnet',
|
|
9975
|
+
* chain_id: '0x534e5f5345504f4c4941',
|
|
9976
|
+
* chain_name: 'My devnet',
|
|
9977
|
+
* rpc_urls: ['http://127.0.0.1:5050/rpc'],
|
|
9978
|
+
* });
|
|
9979
|
+
* // added = true
|
|
9980
|
+
* ```
|
|
9981
|
+
*/
|
|
9812
9982
|
addStarknetChain(chain: AddStarknetChainParameters$1): Promise<boolean>;
|
|
9813
9983
|
/**
|
|
9814
|
-
*
|
|
9984
|
+
* Ask the wallet to sign and send an invoke transaction. The wallet shows the calls to the
|
|
9985
|
+
* user and chooses the fee itself.
|
|
9986
|
+
* @param {AllowArray<Call>} calls - The call(s) to execute.
|
|
9987
|
+
* @returns {Promise<AddInvokeTransactionResult>} The hash of the transaction.
|
|
9988
|
+
* @example
|
|
9989
|
+
* ```typescript
|
|
9990
|
+
* const result = await myWalletAccount.execute(myContract.populate('increase', [10]));
|
|
9991
|
+
* // result = { transaction_hash: '0x...' }
|
|
9992
|
+
* ```
|
|
9815
9993
|
*/
|
|
9816
9994
|
execute(calls: AllowArray<Call>): Promise<RPC$1.AddInvokeTransactionResult>;
|
|
9995
|
+
/**
|
|
9996
|
+
* Ask the wallet to sign and send a declare transaction (Cairo 1 contract).
|
|
9997
|
+
* The compiled class hash is required: give `casm`, or `compiledClassHash`.
|
|
9998
|
+
* @param {DeclareContractPayload} payload - The contract to declare.
|
|
9999
|
+
* @returns {Promise<AddDeclareTransactionResult>} The hash of the transaction and the class hash.
|
|
10000
|
+
* @example
|
|
10001
|
+
* ```typescript
|
|
10002
|
+
* const result = await myWalletAccount.declare({ contract: compiledSierra, casm: compiledCasm });
|
|
10003
|
+
* // result = { transaction_hash: '0x...', class_hash: '0x...' }
|
|
10004
|
+
* ```
|
|
10005
|
+
*/
|
|
9817
10006
|
declare(payload: DeclareContractPayload): Promise<RPC$1.AddDeclareTransactionResult>;
|
|
10007
|
+
/**
|
|
10008
|
+
* Deploy contract(s) with the Universal Deployer Contract (UDC). The wallet signs and sends
|
|
10009
|
+
* one invoke transaction.
|
|
10010
|
+
* @param {UniversalDeployerContractPayload | UniversalDeployerContractPayload[]} payload - The
|
|
10011
|
+
* contract(s) to deploy.
|
|
10012
|
+
* @returns {Promise<MultiDeployContractResponse>} The hash of the transaction, and the addresses
|
|
10013
|
+
* of the new contracts.
|
|
10014
|
+
* @example
|
|
10015
|
+
* ```typescript
|
|
10016
|
+
* const result = await myWalletAccount.deploy({ classHash, constructorCalldata: [] });
|
|
10017
|
+
* // result = { transaction_hash: '0x...', contract_address: ['0x...'] }
|
|
10018
|
+
* ```
|
|
10019
|
+
*/
|
|
9818
10020
|
deploy(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[]): Promise<MultiDeployContractResponse>;
|
|
10021
|
+
/**
|
|
10022
|
+
* Ask the wallet to sign a SNIP-12 typed message.
|
|
10023
|
+
* @param {TypedData} typedData - The message to sign.
|
|
10024
|
+
* @returns {Promise<Signature>} The signature, as an array of strings.
|
|
10025
|
+
* @example
|
|
10026
|
+
* ```typescript
|
|
10027
|
+
* const signature = await myWalletAccount.signMessage(myTypedData);
|
|
10028
|
+
* // signature = ['0x...', '0x...']
|
|
10029
|
+
* ```
|
|
10030
|
+
*/
|
|
9819
10031
|
signMessage(typedData: TypedData): Promise<Signature$2>;
|
|
10032
|
+
/**
|
|
10033
|
+
* Connect to a wallet, and create the account of the address that the user selected in it.
|
|
10034
|
+
*
|
|
10035
|
+
* The wallet asks the user to allow this DAPP. If the user refuses, there is no error: the
|
|
10036
|
+
* account is created with an `undefined` address.
|
|
10037
|
+
* @param {ProviderOptions | ProviderInterface} provider - The provider used to read Starknet,
|
|
10038
|
+
* or its options (e.g. `{ nodeUrl }`).
|
|
10039
|
+
* @param {WalletWithStarknetFeatures} walletProvider - The wallet selected by the user
|
|
10040
|
+
* (get-starknet v5).
|
|
10041
|
+
* @param {CairoVersion} [cairoVersion] - Cairo version of the account. Optional: detected if
|
|
10042
|
+
* not provided.
|
|
10043
|
+
* @param {PaymasterOptions | PaymasterInterface} [paymaster] - The paymaster to use with this
|
|
10044
|
+
* account.
|
|
10045
|
+
* @param {boolean} [silentMode=false] - true: no window; it works only if the user already
|
|
10046
|
+
* allowed this DAPP.
|
|
10047
|
+
* @returns {Promise<WalletAccountV5>} The account.
|
|
10048
|
+
* @example
|
|
10049
|
+
* ```typescript
|
|
10050
|
+
* const myWalletAccount = await WalletAccountV5.connect(
|
|
10051
|
+
* { nodeUrl: 'https://api.zan.top/public/starknet-sepolia/rpc/v0_10' },
|
|
10052
|
+
* selectedWallet
|
|
10053
|
+
* );
|
|
10054
|
+
* // With a paymaster. The parameters are positional, so cairoVersion must be given:
|
|
10055
|
+
* const myPaymasterAccount = await WalletAccountV5.connect(
|
|
10056
|
+
* myProvider,
|
|
10057
|
+
* selectedWallet,
|
|
10058
|
+
* undefined, // cairoVersion: detected
|
|
10059
|
+
* myPaymasterRpc
|
|
10060
|
+
* );
|
|
10061
|
+
* ```
|
|
10062
|
+
*/
|
|
9820
10063
|
static connect(provider: ProviderOptions | ProviderInterface, walletProvider: WalletWithStarknetFeatures, cairoVersion?: CairoVersion, paymaster?: PaymasterOptions | PaymasterInterface, silentMode?: boolean): Promise<WalletAccountV5>;
|
|
10064
|
+
/**
|
|
10065
|
+
* Same as {@link WalletAccountV5.connect} with `silentMode` true: no window is shown, so it
|
|
10066
|
+
* works only if the user already allowed this DAPP (for example, to connect again after a
|
|
10067
|
+
* page reload). Otherwise, the account is created with an `undefined` address.
|
|
10068
|
+
* @param {ProviderOptions | ProviderInterface} provider - The provider used to read Starknet,
|
|
10069
|
+
* or its options.
|
|
10070
|
+
* @param {WalletWithStarknetFeatures} walletProvider - The wallet selected by the user.
|
|
10071
|
+
* @param {CairoVersion} [cairoVersion] - Cairo version of the account. Optional: detected if
|
|
10072
|
+
* not provided.
|
|
10073
|
+
* @param {PaymasterOptions | PaymasterInterface} [paymaster] - The paymaster to use with this
|
|
10074
|
+
* account.
|
|
10075
|
+
* @returns {Promise<WalletAccountV5>} The account.
|
|
10076
|
+
* @example
|
|
10077
|
+
* ```typescript
|
|
10078
|
+
* const myWalletAccount = await WalletAccountV5.connectSilent(myProvider, selectedWallet);
|
|
10079
|
+
* // myWalletAccount.address is undefined if this DAPP is not allowed yet
|
|
10080
|
+
* ```
|
|
10081
|
+
*/
|
|
9821
10082
|
static connectSilent(provider: ProviderOptions | ProviderInterface, walletProvider: WalletWithStarknetFeatures, cairoVersion?: CairoVersion, paymaster?: PaymasterOptions | PaymasterInterface): Promise<WalletAccountV5>;
|
|
9822
10083
|
}
|
|
9823
10084
|
|
|
@@ -9892,12 +10153,57 @@ type STRK20_CALL_AND_PROOF = Omit<STRK20_CALL_AND_PROOF$1, 'call'> & {
|
|
|
9892
10153
|
};
|
|
9893
10154
|
|
|
9894
10155
|
/**
|
|
9895
|
-
*
|
|
9896
|
-
*
|
|
10156
|
+
* Account that lets a browser wallet sign and send the transactions, using get-starknet v6.
|
|
10157
|
+
* This is the recommended class for a new DAPP.
|
|
10158
|
+
*
|
|
10159
|
+
* It extends {@link WalletAccountV5}: same methods, plus the STRK20 privacy protocol
|
|
10160
|
+
* (`strk20Balances`, `strk20PrepareInvoke`, `strk20InvokeTransaction`,
|
|
10161
|
+
* `strk20ShadowAccountCommitment` and `executeWithProof`).
|
|
10162
|
+
* It needs `@starknet-io/get-starknet-discovery` and `@starknet-io/get-starknet-wallet-standard`
|
|
10163
|
+
* v6.0.6 min.
|
|
10164
|
+
*
|
|
10165
|
+
* The `walletProvider` property keeps the type of get-starknet v5. To call a `walletV6`
|
|
10166
|
+
* function, give it the wallet that you selected, not `walletProvider`.
|
|
10167
|
+
* @example
|
|
10168
|
+
* ```typescript
|
|
10169
|
+
* import { createStore } from '@starknet-io/get-starknet-discovery'; // v6.0.6 min
|
|
10170
|
+
* const [selectedWallet] = createStore().getWallets(); // let the user choose in your own UI
|
|
10171
|
+
* const myWalletAccount = await WalletAccountV6.connect(
|
|
10172
|
+
* { nodeUrl: 'https://api.zan.top/public/starknet-sepolia/rpc/v0_10' },
|
|
10173
|
+
* selectedWallet
|
|
10174
|
+
* );
|
|
10175
|
+
* const chainId = await walletV6.requestChainId(selectedWallet);
|
|
10176
|
+
* // chainId = '0x534e5f5345504f4c4941' (the wallet is on Sepolia)
|
|
10177
|
+
* ```
|
|
9897
10178
|
*/
|
|
9898
10179
|
declare class WalletAccountV6 extends WalletAccountV5 {
|
|
10180
|
+
/**
|
|
10181
|
+
* Prefer {@link WalletAccountV6.connect}: it also asks the wallet for the address.
|
|
10182
|
+
* @param {WalletAccountV6Options} options - The provider, the wallet, the account address, and
|
|
10183
|
+
* optionally the Cairo version and the paymaster.
|
|
10184
|
+
* @example
|
|
10185
|
+
* ```typescript
|
|
10186
|
+
* const myWalletAccount = new WalletAccountV6({
|
|
10187
|
+
* provider: { nodeUrl: 'https://api.zan.top/public/starknet-sepolia/rpc/v0_10' },
|
|
10188
|
+
* walletProvider: selectedWallet,
|
|
10189
|
+
* address: '0x...', // an address that the user already allowed in the wallet
|
|
10190
|
+
* });
|
|
10191
|
+
* ```
|
|
10192
|
+
*/
|
|
9899
10193
|
constructor(options: WalletAccountV6Options);
|
|
9900
10194
|
private get v6Provider();
|
|
10195
|
+
/**
|
|
10196
|
+
* Ask the wallet to change its current network.
|
|
10197
|
+
* @param {StarknetChainId} chainId - The network to use.
|
|
10198
|
+
* @param {boolean} [silent_mode=false] - Sent to the wallet as `silent_mode`: true asks the
|
|
10199
|
+
* wallet not to show its window.
|
|
10200
|
+
* @returns {Promise<boolean>} true if the wallet changed the network.
|
|
10201
|
+
* @example
|
|
10202
|
+
* ```typescript
|
|
10203
|
+
* const changed = await myWalletAccount.switchStarknetChain(constants.StarknetChainId.SN_SEPOLIA);
|
|
10204
|
+
* // changed = true
|
|
10205
|
+
* ```
|
|
10206
|
+
*/
|
|
9901
10207
|
switchStarknetChain(chainId: _StarknetChainId, silent_mode?: boolean): Promise<boolean>;
|
|
9902
10208
|
/**
|
|
9903
10209
|
* Execute call(s) with an optional STRK20 privacy proof attached. Same signature as
|
|
@@ -9917,7 +10223,7 @@ declare class WalletAccountV6 extends WalletAccountV5 {
|
|
|
9917
10223
|
* Get the private balances held by the user inside the STRK20 privacy pool.
|
|
9918
10224
|
*
|
|
9919
10225
|
* Reading a shielded balance requires the user approval, and this approval is time
|
|
9920
|
-
* limited
|
|
10226
|
+
* limited: `validUntil` requests when it expires. When it is omitted, the wallet applies
|
|
9921
10227
|
* its own default window.
|
|
9922
10228
|
* @param {Address[]} tokens - The tokens to get the private balance of. An empty array returns every shielded token.
|
|
9923
10229
|
* @param {number} [validUntil] - Requested expiry of the balance read authorization, as a Unix timestamp in seconds. Omit it to let the wallet apply its default window.
|
|
@@ -9927,7 +10233,7 @@ declare class WalletAccountV6 extends WalletAccountV5 {
|
|
|
9927
10233
|
* const balances = await myWalletAccount.strk20Balances([strkAddress]);
|
|
9928
10234
|
* // balances = [{ token: '0x4718...', balance: '0x2386f26fc10000' }]
|
|
9929
10235
|
*
|
|
9930
|
-
* // Asking for a 5
|
|
10236
|
+
* // Asking for a 5-minute authorization window:
|
|
9931
10237
|
* const expiry = Math.floor(Date.now() / 1000) + 300;
|
|
9932
10238
|
* const fresh = await myWalletAccount.strk20Balances([strkAddress], expiry);
|
|
9933
10239
|
* // fresh = [{ token: '0x4718...', balance: '0x2386f26fc10000' }]
|
|
@@ -9936,11 +10242,11 @@ declare class WalletAccountV6 extends WalletAccountV5 {
|
|
|
9936
10242
|
strk20Balances(tokens: Address[], validUntil?: number): Promise<STRK20_BALANCE_ENTRY[]>;
|
|
9937
10243
|
/**
|
|
9938
10244
|
* Build the Starknet call and the SNIP-36 zero-knowledge proof of a STRK20 transaction,
|
|
9939
|
-
* without submitting it
|
|
10245
|
+
* without submitting it: the DAPP submits the returned call itself, and therefore pays
|
|
9940
10246
|
* the fee (the wallet adds no fee action in this mode).
|
|
9941
10247
|
*
|
|
9942
10248
|
* With `simulate` set to true, the wallet skips the expensive proof generation and
|
|
9943
|
-
* returns an empty proof
|
|
10249
|
+
* returns an empty proof: the call is then NOT submittable on-chain, and is only useful
|
|
9944
10250
|
* for fee estimation or UI previews.
|
|
9945
10251
|
* @param {STRK20_ACTION[]} actions - The STRK20 actions to perform atomically (min 1).
|
|
9946
10252
|
* @param {boolean} [simulate] - True to skip the proof generation.
|
|
@@ -9973,15 +10279,15 @@ declare class WalletAccountV6 extends WalletAccountV5 {
|
|
|
9973
10279
|
}>;
|
|
9974
10280
|
/**
|
|
9975
10281
|
* Compute the commitment of a DAPP STRK20 shadow account. The commitment is computed
|
|
9976
|
-
* locally by the wallet from the user private state
|
|
10282
|
+
* locally by the wallet from the user private state; no transaction is sent.
|
|
9977
10283
|
*
|
|
9978
10284
|
* When `nonce` is given, the full commitment of this single shadow account is returned.
|
|
9979
10285
|
* When `nonce` is omitted, the partial (nonce independent) commitment is returned
|
|
9980
|
-
* instead
|
|
10286
|
+
* instead: it is shared by every shadow account the user derives for this DAPP, so it
|
|
9981
10287
|
* can be published once to let a DAPP recognize all the shadow accounts of a user
|
|
9982
10288
|
* without learning any individual nonce.
|
|
9983
10289
|
* @param {STRK20_DAPP_NAME} dappName - The DAPP that scopes the shadow account(s).
|
|
9984
|
-
* @param {FELT} [nonce] - The shadow account nonce
|
|
10290
|
+
* @param {FELT} [nonce] - The shadow account nonce; each nonce selects a distinct shadow account for this user + DAPP. Omit it to get the partial commitment.
|
|
9985
10291
|
* @returns {Promise<FELT>} The shadow account commitment.
|
|
9986
10292
|
* @example
|
|
9987
10293
|
* ```typescript
|
|
@@ -9990,7 +10296,56 @@ declare class WalletAccountV6 extends WalletAccountV5 {
|
|
|
9990
10296
|
* ```
|
|
9991
10297
|
*/
|
|
9992
10298
|
strk20ShadowAccountCommitment(dappName: STRK20_DAPP_NAME, nonce?: FELT$1): Promise<FELT$1>;
|
|
10299
|
+
/**
|
|
10300
|
+
* Connect to a wallet, and create the account of the address that the user selected in it.
|
|
10301
|
+
*
|
|
10302
|
+
* The wallet asks the user to allow this DAPP. If the user refuses, there is no error: the
|
|
10303
|
+
* account is created with an `undefined` address.
|
|
10304
|
+
* @param {ProviderOptions | ProviderInterface} provider - The provider used to read Starknet,
|
|
10305
|
+
* or its options (e.g. `{ nodeUrl }`).
|
|
10306
|
+
* @param {WalletWithStarknetFeaturesV6} walletProvider - The wallet selected by the user
|
|
10307
|
+
* (get-starknet v6).
|
|
10308
|
+
* @param {CairoVersion} [cairoVersion] - Cairo version of the account. Optional: detected if
|
|
10309
|
+
* not provided.
|
|
10310
|
+
* @param {PaymasterOptions | PaymasterInterface} [paymaster] - The paymaster to use with this
|
|
10311
|
+
* account.
|
|
10312
|
+
* @param {boolean} [silentMode=false] - true: no window; it works only if the user already
|
|
10313
|
+
* allowed this DAPP.
|
|
10314
|
+
* @returns {Promise<WalletAccountV6>} The account.
|
|
10315
|
+
* @example
|
|
10316
|
+
* ```typescript
|
|
10317
|
+
* const myWalletAccount = await WalletAccountV6.connect(
|
|
10318
|
+
* { nodeUrl: 'https://api.zan.top/public/starknet-sepolia/rpc/v0_10' },
|
|
10319
|
+
* selectedWallet
|
|
10320
|
+
* );
|
|
10321
|
+
* // With a paymaster. The parameters are positional, so cairoVersion must be given:
|
|
10322
|
+
* const myPaymasterAccount = await WalletAccountV6.connect(
|
|
10323
|
+
* myProvider,
|
|
10324
|
+
* selectedWallet,
|
|
10325
|
+
* undefined, // cairoVersion: detected
|
|
10326
|
+
* myPaymasterRpc
|
|
10327
|
+
* );
|
|
10328
|
+
* ```
|
|
10329
|
+
*/
|
|
9993
10330
|
static connect(provider: ProviderOptions | ProviderInterface, walletProvider: WalletWithStarknetFeatures$1, cairoVersion?: CairoVersion, paymaster?: PaymasterOptions | PaymasterInterface, silentMode?: boolean): Promise<WalletAccountV6>;
|
|
10331
|
+
/**
|
|
10332
|
+
* Same as {@link WalletAccountV6.connect} with `silentMode` true: no window is shown, so it
|
|
10333
|
+
* works only if the user already allowed this DAPP (for example, to connect again after a
|
|
10334
|
+
* page reload). Otherwise, the account is created with an `undefined` address.
|
|
10335
|
+
* @param {ProviderOptions | ProviderInterface} provider - The provider used to read Starknet,
|
|
10336
|
+
* or its options.
|
|
10337
|
+
* @param {WalletWithStarknetFeaturesV6} walletProvider - The wallet selected by the user.
|
|
10338
|
+
* @param {CairoVersion} [cairoVersion] - Cairo version of the account. Optional: detected if
|
|
10339
|
+
* not provided.
|
|
10340
|
+
* @param {PaymasterOptions | PaymasterInterface} [paymaster] - The paymaster to use with this
|
|
10341
|
+
* account.
|
|
10342
|
+
* @returns {Promise<WalletAccountV6>} The account.
|
|
10343
|
+
* @example
|
|
10344
|
+
* ```typescript
|
|
10345
|
+
* const myWalletAccount = await WalletAccountV6.connectSilent(myProvider, selectedWallet);
|
|
10346
|
+
* // myWalletAccount.address is undefined if this DAPP is not allowed yet
|
|
10347
|
+
* ```
|
|
10348
|
+
*/
|
|
9994
10349
|
static connectSilent(provider: ProviderOptions | ProviderInterface, walletProvider: WalletWithStarknetFeatures$1, cairoVersion?: CairoVersion, paymaster?: PaymasterOptions | PaymasterInterface): Promise<WalletAccountV6>;
|
|
9995
10350
|
}
|
|
9996
10351
|
|
|
@@ -11050,6 +11405,45 @@ type CalcV3DeployAccountTxHashArgs = {
|
|
|
11050
11405
|
type CalcDeployAccountTxHashArgs = CalcV3DeployAccountTxHashArgs;
|
|
11051
11406
|
declare function calculateDeployAccountTransactionHash$1(args: CalcDeployAccountTxHashArgs): string;
|
|
11052
11407
|
|
|
11408
|
+
/**
|
|
11409
|
+
* Cairo 0 class hash computation, using the Pedersen hash
|
|
11410
|
+
*/
|
|
11411
|
+
|
|
11412
|
+
/**
|
|
11413
|
+
* JSON replacer function that skips null values and empty arrays for specific keys
|
|
11414
|
+
* Used in legacy contract class serialization
|
|
11415
|
+
* @example
|
|
11416
|
+
* ```typescript
|
|
11417
|
+
* const input = { a: null, attributes: [], debug_info: { x: 1 }, b: 2 };
|
|
11418
|
+
* const result = JSON.stringify(input, hash.nullSkipReplacer);
|
|
11419
|
+
* // result = '{"debug_info":null,"b":2}'
|
|
11420
|
+
* ```
|
|
11421
|
+
*/
|
|
11422
|
+
declare function nullSkipReplacer(key: string, value: any): any;
|
|
11423
|
+
/**
|
|
11424
|
+
* Compute hinted class hash for legacy compiled contract (Cairo 0)
|
|
11425
|
+
* @param {LegacyCompiledContract} compiledContract
|
|
11426
|
+
* @returns {string} hex-string
|
|
11427
|
+
* @example
|
|
11428
|
+
* ```typescript
|
|
11429
|
+
* const compiledCairo0 = json.parse(fs.readFileSync("./cairo0contract.json").toString("ascii"));
|
|
11430
|
+
* const result=hash.computeHintedClassHash(compiledCairo0);
|
|
11431
|
+
* // result = "0x293eabb06955c0a1e55557014675aa4e7a1fd69896147382b29b2b6b166a2ac"
|
|
11432
|
+
* ``` */
|
|
11433
|
+
declare function computeHintedClassHash(compiledContract: LegacyCompiledContract): string;
|
|
11434
|
+
/**
|
|
11435
|
+
* Computes the class hash for legacy compiled contract (Cairo 0)
|
|
11436
|
+
* @param {LegacyCompiledContract | string} contract legacy compiled contract content
|
|
11437
|
+
* @returns {string} hex-string of class hash
|
|
11438
|
+
* @example
|
|
11439
|
+
* ```typescript
|
|
11440
|
+
* const compiledCairo0 = json.parse(fs.readFileSync("./cairo0contract.json").toString("ascii"));
|
|
11441
|
+
* const result=hash.computeLegacyContractClassHash(compiledCairo0);
|
|
11442
|
+
* // result = "0x4a5cae61fa8312b0a3d0c44658b403d3e4197be80027fd5020ffcdf0c803331"
|
|
11443
|
+
* ```
|
|
11444
|
+
*/
|
|
11445
|
+
declare function computeLegacyContractClassHash(contract: LegacyCompiledContract | string): string;
|
|
11446
|
+
|
|
11053
11447
|
/**
|
|
11054
11448
|
* Pure Pedersen hash utilities — no calldata dependency
|
|
11055
11449
|
*/
|
|
@@ -11071,7 +11465,7 @@ declare function computeHashOnElements(data: BigNumberish[]): string;
|
|
|
11071
11465
|
declare const computePedersenHashOnElements: typeof computeHashOnElements;
|
|
11072
11466
|
|
|
11073
11467
|
/**
|
|
11074
|
-
*
|
|
11468
|
+
* Contract address computation, and the Pedersen hash helpers
|
|
11075
11469
|
*/
|
|
11076
11470
|
|
|
11077
11471
|
/**
|
|
@@ -11089,29 +11483,6 @@ declare const computePedersenHashOnElements: typeof computeHashOnElements;
|
|
|
11089
11483
|
* ```
|
|
11090
11484
|
*/
|
|
11091
11485
|
declare function calculateContractAddressFromHash(salt: BigNumberish, classHash: BigNumberish, constructorCalldata: RawArgs, deployerAddress: BigNumberish): string;
|
|
11092
|
-
/**
|
|
11093
|
-
* Compute hinted class hash for legacy compiled contract (Cairo 0)
|
|
11094
|
-
* @param {LegacyCompiledContract} compiledContract
|
|
11095
|
-
* @returns {string} hex-string
|
|
11096
|
-
* @example
|
|
11097
|
-
* ```typescript
|
|
11098
|
-
* const compiledCairo0 = json.parse(fs.readFileSync("./cairo0contract.json").toString("ascii"));
|
|
11099
|
-
* const result=hash.computeHintedClassHash(compiledCairo0);
|
|
11100
|
-
* // result = "0x293eabb06955c0a1e55557014675aa4e7a1fd69896147382b29b2b6b166a2ac"
|
|
11101
|
-
* ``` */
|
|
11102
|
-
declare function computeHintedClassHash(compiledContract: LegacyCompiledContract): string;
|
|
11103
|
-
/**
|
|
11104
|
-
* Computes the class hash for legacy compiled contract (Cairo 0)
|
|
11105
|
-
* @param {LegacyCompiledContract | string} contract legacy compiled contract content
|
|
11106
|
-
* @returns {string} hex-string of class hash
|
|
11107
|
-
* @example
|
|
11108
|
-
* ```typescript
|
|
11109
|
-
* const compiledCairo0 = json.parse(fs.readFileSync("./cairo0contract.json").toString("ascii"));
|
|
11110
|
-
* const result=hash.computeLegacyContractClassHash(compiledCairo0);
|
|
11111
|
-
* // result = "0x4a5cae61fa8312b0a3d0c44658b403d3e4197be80027fd5020ffcdf0c803331"
|
|
11112
|
-
* ```
|
|
11113
|
-
*/
|
|
11114
|
-
declare function computeLegacyContractClassHash(contract: LegacyCompiledContract | string): string;
|
|
11115
11486
|
|
|
11116
11487
|
/**
|
|
11117
11488
|
* Cairo 1 Class Hash computation using Poseidon hash
|
|
@@ -11214,11 +11585,6 @@ declare const COMPILED_CLASS_VERSION = "COMPILED_CLASS_V1";
|
|
|
11214
11585
|
* ```
|
|
11215
11586
|
*/
|
|
11216
11587
|
declare function formatSpaces(json: string): string;
|
|
11217
|
-
/**
|
|
11218
|
-
* JSON replacer function that skips null values and empty arrays for specific keys
|
|
11219
|
-
* Used in legacy contract class serialization
|
|
11220
|
-
*/
|
|
11221
|
-
declare function nullSkipReplacer(key: string, value: any): any;
|
|
11222
11588
|
/**
|
|
11223
11589
|
* Convert builtins array to encoded BigInt array
|
|
11224
11590
|
* Common pattern used in both Poseidon and Blake2s hashing
|
|
@@ -11756,11 +12122,6 @@ declare namespace num {
|
|
|
11756
12122
|
export { num_addPercent as addPercent, num_assertInRange as assertInRange, num_bigNumberishArrayToDecimalStringArray as bigNumberishArrayToDecimalStringArray, num_bigNumberishArrayToHexadecimalStringArray as bigNumberishArrayToHexadecimalStringArray, num_cleanHex as cleanHex, num_getDecimalString as getDecimalString, num_getHexString as getHexString, num_getHexStringArray as getHexStringArray, num_getNext as getNext, num_hexToBytes as hexToBytes, num_hexToDecimalString as hexToDecimalString, num_isBigNumberish as isBigNumberish, num_isEmptyHex as isEmptyHex, num_isHex as isHex, num_isHexString as isHexString, num_isStringWholeNumber as isStringWholeNumber, num_stringToSha256ToArrayBuff4 as stringToSha256ToArrayBuff4, num_toBigInt as toBigInt, num_toCairoBool as toCairoBool, num_toHex as toHex, num_toHex64 as toHex64, num_toHexString as toHexString, num_toStorageKey as toStorageKey, num_tryToBigInt as tryToBigInt };
|
|
11757
12123
|
}
|
|
11758
12124
|
|
|
11759
|
-
/**
|
|
11760
|
-
* Extract compiled calldata from args or execute callback
|
|
11761
|
-
*/
|
|
11762
|
-
declare function getCompiledCalldata(constructorArguments: RawArgs, callback: Function): Calldata;
|
|
11763
|
-
|
|
11764
12125
|
/**
|
|
11765
12126
|
* Transforms a list of Calls, each with their own calldata, into
|
|
11766
12127
|
* two arrays: one with the entry points, and one with the concatenated calldata
|
|
@@ -11822,6 +12183,12 @@ declare const transformCallsToMulticallArrays: (calls: Call[]) => {
|
|
|
11822
12183
|
* ```
|
|
11823
12184
|
*/
|
|
11824
12185
|
declare const fromCallsToExecuteCalldata: (calls: Call[]) => Calldata;
|
|
12186
|
+
|
|
12187
|
+
/**
|
|
12188
|
+
* Extract compiled calldata from args or execute callback
|
|
12189
|
+
*/
|
|
12190
|
+
declare function getCompiledCalldata(constructorArguments: RawArgs, callback: Function): Calldata;
|
|
12191
|
+
|
|
11825
12192
|
/**
|
|
11826
12193
|
* Transforms a list of calls into the Cairo 1 `__execute__` calldata.
|
|
11827
12194
|
* @param {Call[]} calls the list of calls to transform.
|
|
@@ -15692,6 +16059,155 @@ declare class CairoContractAddress {
|
|
|
15692
16059
|
static factoryFromApiResponse(responseIterator: Iterator<string>): CairoContractAddress;
|
|
15693
16060
|
}
|
|
15694
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
|
+
|
|
15695
16211
|
/**
|
|
15696
16212
|
* A Cairo dynamic array : any number of values, all of the same type.
|
|
15697
16213
|
*
|
|
@@ -17659,7 +18175,7 @@ declare function subscribeWalletEvent(walletWSF: WalletWithStarknetFeatures$1, c
|
|
|
17659
18175
|
/**
|
|
17660
18176
|
* Get the private balances held by the user inside the STRK20 privacy pool.
|
|
17661
18177
|
*
|
|
17662
|
-
* Reading a shielded balance requires the user approval, and this approval is time limited
|
|
18178
|
+
* Reading a shielded balance requires the user approval, and this approval is time limited:
|
|
17663
18179
|
* `valid_until` requests when it expires. When it is omitted, the wallet applies its own
|
|
17664
18180
|
* default window.
|
|
17665
18181
|
* @param {WalletWithStarknetFeaturesV6} walletWSF - The get-starknet V6 wallet object to use.
|
|
@@ -17679,16 +18195,16 @@ declare function strk20InvokeTransaction(walletWSF: WalletWithStarknetFeatures$1
|
|
|
17679
18195
|
}>;
|
|
17680
18196
|
/**
|
|
17681
18197
|
* Compute the commitment of a DAPP STRK20 shadow account. The commitment is computed
|
|
17682
|
-
* locally by the wallet from the user private state
|
|
18198
|
+
* locally by the wallet from the user private state; no transaction is sent.
|
|
17683
18199
|
*
|
|
17684
18200
|
* When `nonce` is given, the full commitment of this single shadow account is returned.
|
|
17685
|
-
* When `nonce` is omitted, the partial (nonce independent) commitment is returned instead
|
|
18201
|
+
* When `nonce` is omitted, the partial (nonce independent) commitment is returned instead:
|
|
17686
18202
|
* it is shared by every shadow account the user derives for this DAPP, so it can be
|
|
17687
18203
|
* published once to let a DAPP recognize all the shadow accounts of a user without learning
|
|
17688
18204
|
* any individual nonce.
|
|
17689
18205
|
* @param {WalletWithStarknetFeaturesV6} walletWSF - The get-starknet V6 wallet object to use.
|
|
17690
18206
|
* @param {STRK20_DAPP_NAME} dapp_name - The DAPP that scopes the shadow account(s).
|
|
17691
|
-
* @param {FELT} [nonce] - The shadow account nonce
|
|
18207
|
+
* @param {FELT} [nonce] - The shadow account nonce; each nonce selects a distinct shadow account for this user + DAPP. Omit it to get the partial commitment.
|
|
17692
18208
|
* @returns {Promise<FELT>} The shadow account commitment.
|
|
17693
18209
|
* @example
|
|
17694
18210
|
* ```typescript
|
|
@@ -17821,4 +18337,4 @@ declare class Logger {
|
|
|
17821
18337
|
*/
|
|
17822
18338
|
declare const logger: Logger;
|
|
17823
18339
|
|
|
17824
|
-
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 };
|