starknet 5.0.2 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [5.1.1](https://github.com/0xs34n/starknet.js/compare/v5.1.0...v5.1.1) (2023-03-07)
2
+
3
+ ### Bug Fixes
4
+
5
+ - rectify default provider wait parameter typing ([fc9fd66](https://github.com/0xs34n/starknet.js/commit/fc9fd6661b13317d203a61407817e6ecf3897ba8))
6
+
7
+ # [5.1.0](https://github.com/0xs34n/starknet.js/compare/v5.0.2...v5.1.0) (2023-03-03)
8
+
9
+ ### Features
10
+
11
+ - expose base poseidon methods ([8459947](https://github.com/0xs34n/starknet.js/commit/84599474862416955da32d0e99957b8a112b4edd))
12
+ - rename number utility namespace to num ([032aadc](https://github.com/0xs34n/starknet.js/commit/032aadcf1401f3a0ef40eac947c23b8acfd1a0f7))
13
+
1
14
  ## [5.0.2](https://github.com/0xs34n/starknet.js/compare/v5.0.1...v5.0.2) (2023-03-02)
2
15
 
3
16
  ### Bug Fixes
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as _noble_curves_abstract_weierstrass from '@noble/curves/abstract/weierstrass';
2
+ import * as poseidon from '@noble/curves/abstract/poseidon';
2
3
  import * as stark$1 from '@noble/curves/stark';
3
4
  import { CustomError } from 'ts-custom-error';
4
5
 
@@ -30,40 +31,40 @@ declare function getHexString(value: string): string;
30
31
  declare function getHexStringArray(value: Array<string>): string[];
31
32
  declare const toCairoBool: (value: boolean) => string;
32
33
 
33
- type number_BigNumberish = BigNumberish;
34
- declare const number_isHex: typeof isHex;
35
- declare const number_toBigInt: typeof toBigInt;
36
- declare const number_isBigInt: typeof isBigInt;
37
- declare const number_toHex: typeof toHex;
38
- declare const number_hexToDecimalString: typeof hexToDecimalString;
39
- declare const number_cleanHex: typeof cleanHex;
40
- declare const number_assertInRange: typeof assertInRange;
41
- declare const number_bigNumberishArrayToDecimalStringArray: typeof bigNumberishArrayToDecimalStringArray;
42
- declare const number_bigNumberishArrayToHexadecimalStringArray: typeof bigNumberishArrayToHexadecimalStringArray;
43
- declare const number_isStringWholeNumber: typeof isStringWholeNumber;
44
- declare const number_toHexString: typeof toHexString;
45
- declare const number_getDecimalString: typeof getDecimalString;
46
- declare const number_getHexString: typeof getHexString;
47
- declare const number_getHexStringArray: typeof getHexStringArray;
48
- declare const number_toCairoBool: typeof toCairoBool;
49
- declare namespace number {
34
+ type num_BigNumberish = BigNumberish;
35
+ declare const num_isHex: typeof isHex;
36
+ declare const num_toBigInt: typeof toBigInt;
37
+ declare const num_isBigInt: typeof isBigInt;
38
+ declare const num_toHex: typeof toHex;
39
+ declare const num_hexToDecimalString: typeof hexToDecimalString;
40
+ declare const num_cleanHex: typeof cleanHex;
41
+ declare const num_assertInRange: typeof assertInRange;
42
+ declare const num_bigNumberishArrayToDecimalStringArray: typeof bigNumberishArrayToDecimalStringArray;
43
+ declare const num_bigNumberishArrayToHexadecimalStringArray: typeof bigNumberishArrayToHexadecimalStringArray;
44
+ declare const num_isStringWholeNumber: typeof isStringWholeNumber;
45
+ declare const num_toHexString: typeof toHexString;
46
+ declare const num_getDecimalString: typeof getDecimalString;
47
+ declare const num_getHexString: typeof getHexString;
48
+ declare const num_getHexStringArray: typeof getHexStringArray;
49
+ declare const num_toCairoBool: typeof toCairoBool;
50
+ declare namespace num {
50
51
  export {
51
- number_BigNumberish as BigNumberish,
52
- number_isHex as isHex,
53
- number_toBigInt as toBigInt,
54
- number_isBigInt as isBigInt,
55
- number_toHex as toHex,
56
- number_hexToDecimalString as hexToDecimalString,
57
- number_cleanHex as cleanHex,
58
- number_assertInRange as assertInRange,
59
- number_bigNumberishArrayToDecimalStringArray as bigNumberishArrayToDecimalStringArray,
60
- number_bigNumberishArrayToHexadecimalStringArray as bigNumberishArrayToHexadecimalStringArray,
61
- number_isStringWholeNumber as isStringWholeNumber,
62
- number_toHexString as toHexString,
63
- number_getDecimalString as getDecimalString,
64
- number_getHexString as getHexString,
65
- number_getHexStringArray as getHexStringArray,
66
- number_toCairoBool as toCairoBool,
52
+ num_BigNumberish as BigNumberish,
53
+ num_isHex as isHex,
54
+ num_toBigInt as toBigInt,
55
+ num_isBigInt as isBigInt,
56
+ num_toHex as toHex,
57
+ num_hexToDecimalString as hexToDecimalString,
58
+ num_cleanHex as cleanHex,
59
+ num_assertInRange as assertInRange,
60
+ num_bigNumberishArrayToDecimalStringArray as bigNumberishArrayToDecimalStringArray,
61
+ num_bigNumberishArrayToHexadecimalStringArray as bigNumberishArrayToHexadecimalStringArray,
62
+ num_isStringWholeNumber as isStringWholeNumber,
63
+ num_toHexString as toHexString,
64
+ num_getDecimalString as getDecimalString,
65
+ num_getHexString as getHexString,
66
+ num_getHexStringArray as getHexStringArray,
67
+ num_toCairoBool as toCairoBool,
67
68
  };
68
69
  }
69
70
 
@@ -1977,7 +1978,7 @@ declare class Provider implements ProviderInterface {
1977
1978
  getDeclareEstimateFee(transaction: DeclareContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
1978
1979
  getDeployAccountEstimateFee(transaction: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
1979
1980
  getCode(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<GetCodeResponse>;
1980
- waitForTransaction(txHash: BigNumberish, options: waitForTransactionOptions): Promise<GetTransactionReceiptResponse>;
1981
+ waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<GetTransactionReceiptResponse>;
1981
1982
  getSimulateTransaction(invocation: Invocation, invocationDetails: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<TransactionSimulationResponse>;
1982
1983
  getStateUpdate(blockIdentifier?: BlockIdentifier): Promise<StateUpdateResponse>;
1983
1984
  getStarkName(address: BigNumberish, StarknetIdContract?: string): Promise<string>;
@@ -2671,6 +2672,7 @@ declare const hash_calculateDeployAccountTransactionHash: typeof calculateDeploy
2671
2672
  declare const hash_calculateTransactionHash: typeof calculateTransactionHash;
2672
2673
  declare const hash_calculateContractAddressFromHash: typeof calculateContractAddressFromHash;
2673
2674
  declare const hash_computeContractClassHash: typeof computeContractClassHash;
2675
+ declare const hash_poseidon: typeof poseidon;
2674
2676
  declare namespace hash {
2675
2677
  export {
2676
2678
  computeHintedClassHash as default,
@@ -2688,6 +2690,7 @@ declare namespace hash {
2688
2690
  hash_calculateTransactionHash as calculateTransactionHash,
2689
2691
  hash_calculateContractAddressFromHash as calculateContractAddressFromHash,
2690
2692
  hash_computeContractClassHash as computeContractClassHash,
2693
+ hash_poseidon as poseidon,
2691
2694
  };
2692
2695
  }
2693
2696
 
@@ -2918,4 +2921,11 @@ declare function validateChecksumAddress(address: string): boolean;
2918
2921
  declare function isUrl(s?: string): boolean;
2919
2922
  declare function buildUrl(baseUrl: string, defaultPath: string, urlOrPath?: string): string;
2920
2923
 
2921
- export { Abi, AbiEntry, Account, AccountInterface, AllowArray, Args, AsyncContractFunction, BlockNumber, BlockTag, Call, CallContractResponse, CallDetails, CallL1Handler, CallOptions, Calldata, CommonTransactionReceiptResponse, CommonTransactionResponse, CompiledContract, CompressedCompiledContract, CompressedProgram, Contract, ContractClass, ContractEntryPoint, ContractEntryPointFields, ContractFactory, ContractFunction, ContractInterface, DeclareAndDeployContractPayload, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareDeployUDCResponse, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractPayload, DeployContractResponse, DeployContractUDCResponse, DeployedContractItem, EntryPointType, EntryPointsByType, EstimateFee, EstimateFeeAction, EstimateFeeBulk, EstimateFeeDetails, EstimateFeeResponse, EstimateFeeResponseBulk, Event, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, HttpError, Invocation, InvocationBulk, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeTransactionReceiptResponse, InvokeTransactionResponse, LibraryError, MessageToL1, MessageToL2, MultiDeployContractResponse, Nonces, Overrides, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, RPC, RawArgs, RawCalldata, RpcProvider, RpcProviderOptions, Sequencer, SequencerHttpMethod, SequencerIdentifier, SequencerProvider, SequencerProviderOptions, Signature, Signer, SignerInterface, StateDiffItem, StateUpdateResponse, Status, StorageDiffItem, Struct, StructAbi, TransactionBulk, TransactionSimulation, TransactionSimulationResponse, TransactionStatus, TransactionTraceResponse, TransactionType, Tupled, UniversalDeployerContractPayload, abiStructs, addAddressPadding, buildUrl, constants, defaultProvider, ec, encode, getChecksumAddress, hash, isUrl, json, merkle, number, shortString, stark, transaction, index as typedData, uint256, validateAndParseAddress, validateChecksumAddress, waitForTransactionOptions };
2924
+ /**
2925
+ * Main
2926
+ */
2927
+
2928
+ /** @deprecated prefer the 'num' naming */
2929
+ declare const number: typeof num;
2930
+
2931
+ export { Abi, AbiEntry, Account, AccountInterface, AllowArray, Args, AsyncContractFunction, BlockNumber, BlockTag, Call, CallContractResponse, CallDetails, CallL1Handler, CallOptions, Calldata, CommonTransactionReceiptResponse, CommonTransactionResponse, CompiledContract, CompressedCompiledContract, CompressedProgram, Contract, ContractClass, ContractEntryPoint, ContractEntryPointFields, ContractFactory, ContractFunction, ContractInterface, DeclareAndDeployContractPayload, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareDeployUDCResponse, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractPayload, DeployContractResponse, DeployContractUDCResponse, DeployedContractItem, EntryPointType, EntryPointsByType, EstimateFee, EstimateFeeAction, EstimateFeeBulk, EstimateFeeDetails, EstimateFeeResponse, EstimateFeeResponseBulk, Event, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, HttpError, Invocation, InvocationBulk, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeTransactionReceiptResponse, InvokeTransactionResponse, LibraryError, MessageToL1, MessageToL2, MultiDeployContractResponse, Nonces, Overrides, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, RPC, RawArgs, RawCalldata, RpcProvider, RpcProviderOptions, Sequencer, SequencerHttpMethod, SequencerIdentifier, SequencerProvider, SequencerProviderOptions, Signature, Signer, SignerInterface, StateDiffItem, StateUpdateResponse, Status, StorageDiffItem, Struct, StructAbi, TransactionBulk, TransactionSimulation, TransactionSimulationResponse, TransactionStatus, TransactionTraceResponse, TransactionType, Tupled, UniversalDeployerContractPayload, abiStructs, addAddressPadding, buildUrl, constants, defaultProvider, ec, encode, getChecksumAddress, hash, isUrl, json, merkle, num, number, shortString, stark, transaction, index as typedData, uint256, validateAndParseAddress, validateChecksumAddress, waitForTransactionOptions };