starknet 11.2.0 → 11.4.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/dist/index.d.ts CHANGED
@@ -695,6 +695,13 @@ type UniversalDeployerContractPayload = {
695
695
  salt?: string;
696
696
  unique?: boolean;
697
697
  constructorCalldata?: RawArgs;
698
+ /**
699
+ * Abi of the contract to deploy. When given, the constructor calldata is checked against it:
700
+ * parameters are compiled with it, felts already compiled are read back and written again
701
+ * with it. Without it, the calldata is not checked: it is flattened as given, an object in the
702
+ * order of its keys, and plain JS values of compound types (a text for a `ByteArray`, a number
703
+ * for a `u256`) are not written the way the constructor reads them.
704
+ */
698
705
  abi?: Abi;
699
706
  };
700
707
  type DeployAccountContractPayload = {
@@ -714,7 +721,11 @@ type BaseDeclareContractPayload = {
714
721
  contract: CompiledContract | string;
715
722
  /**
716
723
  * Class hash of the contract. Optional optimization - if not provided,
717
- * it will be computed from the contract
724
+ * it will be computed from the contract.
725
+ *
726
+ * `declare` and `declareIfNot` use a given value as is, without checking it against
727
+ * `contract`, to save time: a wrong value makes the declaration fail, or makes `declareIfNot`
728
+ * take another class for this one. `declareAndDeploy` checks it, and refuses a wrong value.
718
729
  */
719
730
  classHash?: string;
720
731
  };
@@ -753,7 +764,10 @@ type CompleteDeclareContractPayload = {
753
764
  casm?: CompiledSierraCasm;
754
765
  compiledClassHash: string;
755
766
  };
756
- type DeclareAndDeployContractPayload = Omit<UniversalDeployerContractPayload, 'classHash'> & DeclareContractPayload;
767
+ type DeclareAndDeployContractPayload = Omit<UniversalDeployerContractPayload, 'classHash' | 'abi'> & DeclareContractPayload & {
768
+ /** @deprecated Ignored: the ABI is taken from `contract`. Will be removed in v12. */
769
+ abi?: Abi;
770
+ };
757
771
  type DeclareContractTransaction = {
758
772
  contract: ContractClass;
759
773
  senderAddress: string;
@@ -2562,9 +2576,9 @@ declare abstract class AccountInterface {
2562
2576
  * - .constructorCalldata - Constructor parameters
2563
2577
  * - .contractAddress - Pre-computed account address
2564
2578
  * - .addressSalt - Salt for address generation
2579
+ * - .abi - Abi of the account contract (optional): the constructor calldata is checked against it
2565
2580
  *
2566
2581
  * @param estimateFeeDetails - Optional details for fee estimation
2567
- * @inheritdoc estimateInvokeFee
2568
2582
  *
2569
2583
  * @returns Fee estimation including overall_fee and resourceBounds
2570
2584
  * @example
@@ -2576,7 +2590,9 @@ declare abstract class AccountInterface {
2576
2590
  * });
2577
2591
  * ```
2578
2592
  */
2579
- abstract estimateAccountDeployFee(contractPayload: DeployAccountContractPayload, estimateFeeDetails?: UniversalDetails): Promise<EstimateFeeResponseOverhead>;
2593
+ abstract estimateAccountDeployFee(contractPayload: DeployAccountContractPayload & {
2594
+ abi?: Abi;
2595
+ }, estimateFeeDetails?: UniversalDetails): Promise<EstimateFeeResponseOverhead>;
2580
2596
  /**
2581
2597
  * Estimate fee for deploying contract(s) through the Universal Deployer Contract (UDC)
2582
2598
  *
@@ -2587,7 +2603,6 @@ declare abstract class AccountInterface {
2587
2603
  * - .constructorCalldata - Constructor parameters
2588
2604
  *
2589
2605
  * @param estimateFeeDetails - Optional details for fee estimation
2590
- * @inheritdoc estimateInvokeFee
2591
2606
  *
2592
2607
  * @returns Fee estimation for the deployment transaction
2593
2608
  * @example
@@ -2608,7 +2623,6 @@ declare abstract class AccountInterface {
2608
2623
  * - .payload - Transaction-specific payload
2609
2624
  *
2610
2625
  * @param details - Optional details for fee estimation
2611
- * @inheritdoc estimateInvokeFee
2612
2626
  *
2613
2627
  * @returns Array of fee estimations for each transaction
2614
2628
  * @example
@@ -2672,7 +2686,6 @@ declare abstract class AccountInterface {
2672
2686
  *
2673
2687
  * @param calls - Array of calls to be sponsored
2674
2688
  * @param paymasterDetails - Paymaster configuration
2675
- * @inheritdoc estimatePaymasterTransactionFee
2676
2689
  *
2677
2690
  * @returns Prepared transaction with typed data for signing
2678
2691
  * @example
@@ -2713,12 +2726,11 @@ declare abstract class AccountInterface {
2713
2726
  *
2714
2727
  * @param contractPayload - Contract declaration payload
2715
2728
  * - .contract - Compiled Sierra contract
2716
- * - .classHash - Pre-computed class hash (optional)
2729
+ * - .classHash - Pre-computed class hash (optional), used as is: it is not checked against .contract
2717
2730
  * - .casm - Compiled CASM (required for Cairo 1)
2718
2731
  * - .compiledClassHash - Pre-computed CASM hash
2719
2732
  *
2720
2733
  * @param transactionsDetail - Transaction execution options
2721
- * @inheritdoc execute
2722
2734
  *
2723
2735
  * @returns Declaration transaction hash and class hash
2724
2736
  * @example
@@ -2738,9 +2750,10 @@ declare abstract class AccountInterface {
2738
2750
  * - .constructorCalldata - Constructor parameters.
2739
2751
  * - .salt - Deployment salt (random if not specified).
2740
2752
  * - .unique - Modify salt for unique address (default: true).
2753
+ * - .abi - Abi of the contract (optional): the constructor calldata is checked against it.
2754
+ * Without it, the calldata is flattened as given, with no check.
2741
2755
  *
2742
2756
  * @param details - Transaction execution options
2743
- * @inheritdoc execute
2744
2757
  *
2745
2758
  * @returns Deployed contract addresses and transaction hash
2746
2759
  * @example
@@ -2756,10 +2769,8 @@ declare abstract class AccountInterface {
2756
2769
  * Deploy and wait for a contract deployment to complete
2757
2770
  *
2758
2771
  * @param payload - Deployment configuration(s)
2759
- * @inheritdoc deploy
2760
2772
  *
2761
2773
  * @param details - Transaction execution options
2762
- * @inheritdoc execute
2763
2774
  *
2764
2775
  * @returns Deployment result with contract address and UDC event details
2765
2776
  * @remarks
@@ -2781,17 +2792,20 @@ declare abstract class AccountInterface {
2781
2792
  * - .contract - Compiled Sierra contract
2782
2793
  * - .casm - Compiled CASM (required for Cairo 1)
2783
2794
  * - .compiledClassHash - Pre-computed CASM hash
2784
- * - .classHash - Pre-computed class hash
2785
- * - .constructorCalldata - Constructor parameters
2795
+ * - .classHash - Pre-computed class hash, checked against .contract: a wrong one is refused
2796
+ * - .constructorCalldata - Constructor parameters, or felts already compiled
2786
2797
  * - .salt - Deployment salt
2787
2798
  * - .unique - Ensure unique deployment address
2788
2799
  *
2789
2800
  * @param details - Transaction execution options
2790
- * @inheritdoc execute
2791
2801
  *
2792
2802
  * @returns Declaration and deployment results
2793
2803
  * @remarks
2804
+ * - Before declaring, checks the constructor calldata against the abi of `contract` (felts
2805
+ * already compiled are read back with it), and a given `classHash` against `contract`:
2806
+ * a mismatch fails before any transaction is sent
2794
2807
  * - Automatically skips declaration if contract is already declared
2808
+ * - With a given `nonce`, the deployment uses the next one when a declaration is sent
2795
2809
  * - Waits for both transactions to complete
2796
2810
  * - Does not support batch operations
2797
2811
  * @example
@@ -2812,9 +2826,9 @@ declare abstract class AccountInterface {
2812
2826
  * - .constructorCalldata - Constructor parameters
2813
2827
  * - .addressSalt - Salt for address generation
2814
2828
  * - .contractAddress - Pre-computed address
2829
+ * - .abi - Abi of the account contract (optional): the constructor calldata is checked against it
2815
2830
  *
2816
2831
  * @param transactionsDetail - Transaction execution options
2817
- * @inheritdoc execute
2818
2832
  *
2819
2833
  * @returns Deployment transaction hash and contract address
2820
2834
  * @remarks
@@ -2828,7 +2842,9 @@ declare abstract class AccountInterface {
2828
2842
  * });
2829
2843
  * ```
2830
2844
  */
2831
- abstract deployAccount(contractPayload: DeployAccountContractPayload, transactionsDetail?: InvocationsDetails): Promise<DeployContractResponse>;
2845
+ abstract deployAccount(contractPayload: DeployAccountContractPayload & {
2846
+ abi?: Abi;
2847
+ }, transactionsDetail?: InvocationsDetails): Promise<DeployContractResponse>;
2832
2848
  /**
2833
2849
  * Sign a typed data message for off-chain verification
2834
2850
  *
@@ -2879,6 +2895,9 @@ declare abstract class AccountInterface {
2879
2895
  /**
2880
2896
  * Declare a contract class if not already declared
2881
2897
  *
2898
+ * A given `classHash` is used as is to look for the class on the node, without being checked
2899
+ * against `contract`, to save time.
2900
+ *
2882
2901
  * @param contractPayload - Contract declaration payload
2883
2902
  * @param transactionsDetail - Transaction execution options
2884
2903
  * @returns Declaration result (with empty transaction_hash if already declared)
@@ -3041,7 +3060,7 @@ interface RpcTransport {
3041
3060
  type HttpTransportOptions = {
3042
3061
  /**
3043
3062
  * The HTTP endpoint of the Starknet node.
3044
- * @example 'https://starknet-sepolia.public.blastapi.io/rpc/v0_10'
3063
+ * @example 'https://api.zan.top/public/starknet-sepolia/rpc/v0_10'
3045
3064
  */
3046
3065
  nodeUrl: string;
3047
3066
  /** Extra headers sent with every request, an API key for instance. */
@@ -3060,7 +3079,7 @@ type HttpTransportOptions = {
3060
3079
  * @example
3061
3080
  * ```typescript
3062
3081
  * const transport = new HttpTransport({
3063
- * nodeUrl: 'https://starknet-sepolia.public.blastapi.io/rpc/v0_10',
3082
+ * nodeUrl: 'https://api.zan.top/public/starknet-sepolia/rpc/v0_10',
3064
3083
  * baseFetch: fetch,
3065
3084
  * });
3066
3085
  * const myProvider = new RpcProvider({ transport });
@@ -3364,7 +3383,7 @@ type WebSocketChannelEvents = {
3364
3383
  declare class WebSocketChannel {
3365
3384
  /**
3366
3385
  * The URL of the WebSocket RPC Node.
3367
- * @example 'wss://starknet-sepolia.public.blastapi.io/rpc/v0_8'
3386
+ * @example 'wss://your-starknet-node/rpc/v0_10'
3368
3387
  */
3369
3388
  nodeUrl: string;
3370
3389
  /** Carries the frames and owns the socket lifecycle. */
@@ -3561,7 +3580,7 @@ type WsTransportEvents = {
3561
3580
  };
3562
3581
  /** What {@link WsTransport} needs to open its socket. */
3563
3582
  type WsTransportOptions = {
3564
- /** @example 'wss://starknet-sepolia.public.blastapi.io/rpc/v0_10' */
3583
+ /** @example 'wss://your-starknet-node/rpc/v0_10' */
3565
3584
  nodeUrl: string;
3566
3585
  /** Custom WebSocket implementation. Falls back to `config.get('websocket')`, then the global. */
3567
3586
  websocket?: WebSocketModule;
@@ -6756,7 +6775,7 @@ declare const fastParsingStrategy: ParsingStrategy;
6756
6775
  * `validate.ts` — and the day support for it is dropped, that is what gets deleted.
6757
6776
  *
6758
6777
  * A Cairo 0 abi is recognized by `getAbiVersion` returning 0, which happens when the first
6759
- * function that has any input or output declares it with a type carrying no `::`.
6778
+ * function or constructor that has any input or output declares it with a type carrying no `::`.
6760
6779
  * @example
6761
6780
  * ```typescript
6762
6781
  * const abi = [
@@ -6971,15 +6990,20 @@ declare class AbiParser0 implements AbiParserInterface {
6971
6990
  * The abi parser for a flat abi written in Cairo 1 vocabulary.
6972
6991
  *
6973
6992
  * It is chosen when `getAbiVersion` answers 1 : the abi has no `interface` entry, and the first
6974
- * function carrying any input or output declares it with a type containing `::`. Two very
6975
- * different things land here.
6993
+ * function or constructor carrying any input or output declares it with a type containing `::`.
6994
+ * Three different things land here.
6976
6995
  *
6977
- * The first is a genuine **Cairo 1.0 / 1.1 contract**, compiled before the abi format grew its
6978
- * `interface` entry — roughly 2023. Those contracts are still on chain and still callable.
6996
+ * The first is a genuine **Cairo V1 contract** (compiler 1.0 / 1.1), compiled before the abi
6997
+ * format grew its `interface` entry — roughly 2023. Those contracts are still on chain and still
6998
+ * callable.
6979
6999
  *
6980
- * The second, and by far the most frequent, is an abi someone **wrote or trimmed by hand** : a
7000
+ * The second is a **Cairo V2 contract with no `interface` entry** : one with no external function
7001
+ * (see `__mocks__/cairo/onlyConstructor`), or one that declares its functions one by one with
7002
+ * `#[external(v0)]`. Compiled by Cairo V2, its abi is flat all the same.
7003
+ *
7004
+ * The third, and by far the most frequent, is an abi someone **wrote or trimmed by hand** : a
6981
7005
  * couple of functions kept for a `decodeParameters` call, a fixture in a test suite. Such an abi
6982
- * is flat whatever the Cairo version of the contract it came from — so a Cairo 2 contract whose
7006
+ * is flat whatever the Cairo version of the contract it came from — so a Cairo V2 contract whose
6983
7007
  * abi has been stripped of its `interface` entry is parsed here, not by {@link AbiParser2}. The
6984
7008
  * class is picked on the **shape of the abi**, never on the contract behind it, which is why this
6985
7009
  * one stays busy rather than being a legacy path.
@@ -7117,8 +7141,10 @@ declare class AbiParser1 implements AbiParserInterface {
7117
7141
  * The abi parser for an abi that groups its functions under an `interface` entry.
7118
7142
  *
7119
7143
  * It is chosen when `getAbiVersion` answers 2, which is decided by the mere presence of that
7120
- * entry — the format Cairo has emitted since compiler 2, mid-2023, and so what every contract
7121
- * declared on Starknet today looks like.
7144
+ * entry — the abi of a Cairo V2 contract that declares its functions through a
7145
+ * `#[starknet::interface]`, the usual way since compiler 2, mid-2023. A Cairo V2 contract with no
7146
+ * external function, or that declares its functions one by one with `#[external(v0)]`, has no
7147
+ * such entry, and goes to {@link AbiParser1}.
7122
7148
  *
7123
7149
  * Everything it does differently from {@link AbiParser1} follows from that one nesting : a method
7124
7150
  * is looked up among the interface's `items` rather than at the top level, and `getLegacyFormat`
@@ -7275,7 +7301,8 @@ declare function enumStrategy(enums: AbiEnum[]): CairoTypeStrategy;
7275
7301
  declare function structStrategy(structs: AbiStruct[]): CairoTypeStrategy;
7276
7302
 
7277
7303
  /**
7278
- * Creates ABI parser
7304
+ * Create the parser of an abi. It is chosen from the format of the abi ({@link getAbiVersion}),
7305
+ * not from the version of Cairo.
7279
7306
  *
7280
7307
  * A Cairo 0 abi gets its own parser, kept apart from the Cairo 1 ones so that those can move to
7281
7308
  * the Cairo type classes without dragging along types — `felt`, `felt*` — that no class registers.
@@ -7295,10 +7322,16 @@ declare function structStrategy(structs: AbiStruct[]): CairoTypeStrategy;
7295
7322
  */
7296
7323
  declare function createAbiParser(abi: Abi, parsingStrategy?: ParsingStrategy | CairoTypeStrategy): AbiParserInterface;
7297
7324
  /**
7298
- * Retrieves ABI version
7325
+ * Get the format of an abi, which tells which parser reads it: {@link AbiParser0},
7326
+ * {@link AbiParser1} or {@link AbiParser2}. It is the shape of the abi, not the version of Cairo.
7327
+ * - 0: a Cairo 0 abi.
7328
+ * - 1: a Cairo 1 abi with its functions at the top level. It comes from a Cairo V1 contract, or
7329
+ * from a Cairo V2 contract with no `interface` entry: one with no external function, or one
7330
+ * that declares its functions one by one with `#[external(v0)]`.
7331
+ * - 2: a Cairo 1 abi with `interface` entries, from a Cairo V2 contract written with interfaces.
7299
7332
  *
7300
7333
  * @param {Abi} abi
7301
- * @returns {1 | 2 | 0} abi 1, 2 or 0 version
7334
+ * @returns {1 | 2 | 0} the format of the abi
7302
7335
  *
7303
7336
  * @example
7304
7337
  * // Example 1: Return ABI version 2
@@ -7315,7 +7348,8 @@ declare function createAbiParser(abi: Abi, parsingStrategy?: ParsingStrategy | C
7315
7348
  */
7316
7349
  declare function getAbiVersion(abi: Abi): 1 | 2 | 0;
7317
7350
  /**
7318
- * Checks if no constructor valid
7351
+ * Checks a constructor call to a contract that has no constructor in its abi:
7352
+ * it is valid only with an empty calldata, an empty array or an empty object.
7319
7353
  *
7320
7354
  * @param {string} method
7321
7355
  * @param {RawArgs} argsCalldata
@@ -7327,6 +7361,8 @@ declare function getAbiVersion(abi: Abi): 1 | 2 | 0;
7327
7361
  * // result1 === true
7328
7362
  * const result2 = isNoConstructorValid('test', ['test'])
7329
7363
  * // result2 === false
7364
+ * const result3 = isNoConstructorValid('constructor', { a: 1 })
7365
+ * // result3 === false
7330
7366
  */
7331
7367
  declare function isNoConstructorValid(method: string, argsCalldata: RawArgs, abiMethod?: FunctionAbi): boolean;
7332
7368
 
@@ -7407,7 +7443,6 @@ type ParsedEvents = Array<ParsedEvent> & {
7407
7443
  };
7408
7444
  /**
7409
7445
  * Advance formatting used to get js types data as result
7410
- * @see https://starknet-io.github.io/starknet.js/docs/guides/define_call_message/#formatresponse
7411
7446
  * @example
7412
7447
  * ```typescript
7413
7448
  * // assign custom or existing method to resulting data
@@ -9568,7 +9603,9 @@ declare class Account implements AccountInterface {
9568
9603
  getCairoVersion(classHash?: string): Promise<CairoVersion>;
9569
9604
  estimateInvokeFee(calls: AllowArray<Call>, details?: UniversalDetails): Promise<EstimateFeeResponseOverhead>;
9570
9605
  estimateDeclareFee(payload: DeclareContractPayload, details?: UniversalDetails): Promise<EstimateFeeResponseOverhead>;
9571
- estimateAccountDeployFee({ classHash, addressSalt, constructorCalldata, contractAddress, }: DeployAccountContractPayload, details?: UniversalDetails): Promise<EstimateFeeResponseOverhead>;
9606
+ estimateAccountDeployFee({ classHash, addressSalt, constructorCalldata, contractAddress, abi, }: DeployAccountContractPayload & {
9607
+ abi?: Abi;
9608
+ }, details?: UniversalDetails): Promise<EstimateFeeResponseOverhead>;
9572
9609
  estimateDeployFee(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: UniversalDetails): Promise<EstimateFeeResponseOverhead>;
9573
9610
  estimateFeeBulk(invocations: Invocations, details?: UniversalDetails): Promise<EstimateFeeBulk>;
9574
9611
  simulateTransaction(invocations: Invocations, details?: SimulateTransactionDetails): Promise<SimulateTransactionOverheadResponse>;
@@ -9608,6 +9645,9 @@ declare class Account implements AccountInterface {
9608
9645
  * First check if contract is already declared, if not declare it
9609
9646
  * If contract already declared returned transaction_hash is ''.
9610
9647
  * Method will pass even if contract is already declared
9648
+ *
9649
+ * A given `classHash` is used as is to look for the class on the node, without being checked
9650
+ * against `contract`, to save time.
9611
9651
  * @param transactionsDetail (optional)
9612
9652
  */
9613
9653
  declareIfNot(payload: DeclareContractPayload, transactionsDetail?: UniversalDetails): Promise<DeclareContractResponse>;
@@ -9615,8 +9655,12 @@ declare class Account implements AccountInterface {
9615
9655
  deploy(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: UniversalDetails): Promise<MultiDeployContractResponse>;
9616
9656
  deployContract(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: UniversalDetails & waitForTransactionOptions): Promise<DeployContractUDCResponse>;
9617
9657
  declareAndDeploy(payload: DeclareAndDeployContractPayload, details?: UniversalDetails & waitForTransactionOptions): Promise<DeclareDeployUDCResponse>;
9618
- deploySelf: ({ classHash, constructorCalldata, addressSalt, contractAddress: providedContractAddress, }: DeployAccountContractPayload, details?: UniversalDetails) => Promise<DeployContractResponse>;
9619
- deployAccount({ classHash, constructorCalldata, addressSalt, contractAddress: providedContractAddress, }: DeployAccountContractPayload, details?: UniversalDetails): Promise<DeployContractResponse>;
9658
+ deploySelf: ({ classHash, constructorCalldata, addressSalt, contractAddress: providedContractAddress, abi, }: DeployAccountContractPayload & {
9659
+ abi?: Abi;
9660
+ }, details?: UniversalDetails) => Promise<DeployContractResponse>;
9661
+ deployAccount({ classHash, constructorCalldata, addressSalt, contractAddress: providedContractAddress, abi, }: DeployAccountContractPayload & {
9662
+ abi?: Abi;
9663
+ }, details?: UniversalDetails): Promise<DeployContractResponse>;
9620
9664
  signMessage(typedData: TypedData): Promise<Signature>;
9621
9665
  hashMessage(typedData: TypedData): Promise<string>;
9622
9666
  /**
@@ -9710,7 +9754,9 @@ declare class Account implements AccountInterface {
9710
9754
  private resolveTransactionVersion;
9711
9755
  buildInvocation(call: Array<Call>, details: InvocationsSignerDetails): Promise<Invocation>;
9712
9756
  buildDeclarePayload(payload: DeclareContractPayload, details: InvocationsSignerDetails): Promise<DeclareContractTransaction>;
9713
- buildAccountDeployPayload({ classHash, addressSalt, constructorCalldata, contractAddress: providedContractAddress, }: DeployAccountContractPayload, details: InvocationsSignerDetails): Promise<DeployAccountContractTransaction>;
9757
+ buildAccountDeployPayload({ classHash, addressSalt, constructorCalldata, contractAddress: providedContractAddress, abi, }: DeployAccountContractPayload & {
9758
+ abi?: Abi;
9759
+ }, details: InvocationsSignerDetails): Promise<DeployAccountContractTransaction>;
9714
9760
  /**
9715
9761
  * Build account invocations with proper typing based on transaction type
9716
9762
  * @private
@@ -11204,7 +11250,7 @@ declare const defaultPlugins: StarknetPlugin<any, any>[];
11204
11250
  declare function keccakBn(value: BigNumberish): string;
11205
11251
  /**
11206
11252
  * Calculate the BigInt Starknet Keccak hash for a given string
11207
- * [Reference](https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/starknet/public/abi.py#L38)
11253
+ * [Reference](https://docs.starknet.io/learn/protocol/cryptography#starknet-keccak)
11208
11254
  *
11209
11255
  * @param str value to hash
11210
11256
  * @returns BigInt Keccak hash
@@ -11217,7 +11263,7 @@ declare function keccakBn(value: BigNumberish): string;
11217
11263
  declare function starknetKeccak(str: string): bigint;
11218
11264
  /**
11219
11265
  * Calculate the hex-string selector for a given abi function name
11220
- * [Reference](https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/starknet/public/abi.py#L46)
11266
+ * [Reference](https://www.starknet.io/cairo-book/ch102-01-contract-class-abi.html#function-selector)
11221
11267
  *
11222
11268
  * @param funcName abi function name
11223
11269
  * @returns hex-string selector
@@ -12276,7 +12322,7 @@ type V3Details = Required<Pick<UniversalDetails, 'tip' | 'paymasterData' | 'acco
12276
12322
  /**
12277
12323
  * Compress compiled Cairo 0 program
12278
12324
  *
12279
- * [Reference](https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/starknet/services/api/gateway/transaction.py#L54-L58)
12325
+ * [Reference](https://github.com/starkware-libs/cairo-lang/blob/v0.14.0.1/src/starkware/starknet/services/api/gateway/transaction_utils.py#L34-L39)
12280
12326
  * @param {Program | string} jsonProgram Representing the compiled Cairo 0 program
12281
12327
  * @return {CompressedProgram} Compressed Cairo 0 program
12282
12328
  * @example
@@ -13511,7 +13557,7 @@ declare function extractAbi(contract: ContractClass): Abi;
13511
13557
  * ```typescript
13512
13558
  * const result= provider.getDefaultNodeUrl(constants.NetworkName.SN_MAIN);
13513
13559
  * // console : "Using default public node url, please provide nodeUrl in provider options!"
13514
- * // result = "https://starknet-mainnet.public.blastapi.io/rpc/v0_9"
13560
+ * // result = "https://api.zan.top/public/starknet-mainnet/rpc/v0_10"
13515
13561
  * ```
13516
13562
  */
13517
13563
  declare const getDefaultNodeUrl: (networkName?: _NetworkName, rpcVersion?: _SupportedRpcVersion) => string;