starknet 5.26.0 → 5.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # [5.27.0](https://github.com/starknet-io/starknet.js/compare/v5.26.1...v5.27.0) (2024-01-23)
2
+
3
+ ### Features
4
+
5
+ - trigger release ([fbf983f](https://github.com/starknet-io/starknet.js/commit/fbf983f7820768f919cddb2c5806178a20e38bdd))
6
+
7
+ ## [5.26.1](https://github.com/starknet-io/starknet.js/compare/v5.26.0...v5.26.1) (2024-01-18)
8
+
9
+ ### Bug Fixes
10
+
11
+ - move abiwan from dev dependencies to regular dependencies ([#925](https://github.com/starknet-io/starknet.js/issues/925)) ([6b7ee49](https://github.com/starknet-io/starknet.js/commit/6b7ee49918d704f8143f51ab7a0360446ea4cf5e))
12
+
1
13
  # [5.26.0](https://github.com/starknet-io/starknet.js/compare/v5.25.0...v5.26.0) (2024-01-15)
2
14
 
3
15
  ### Features
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as weierstrass from '@noble/curves/abstract/weierstrass';
2
- import { Abi as Abi$1, TypedContract as TypedContract$1 } from 'abi-wan-kanabi';
3
- import { Abi as Abi$2, TypedContract as TypedContract$2 } from 'abi-wan-kanabi-v2';
2
+ import { Abi as Abi$1, TypedContract } from 'abi-wan-kanabi-v1';
3
+ import { Abi as Abi$2, TypedContract as TypedContract$1 } from 'abi-wan-kanabi-v2';
4
4
  import * as poseidon from '@noble/curves/abstract/poseidon';
5
5
  import * as json$1 from 'lossless-json';
6
6
  import * as starknet from '@scure/starknet';
@@ -231,7 +231,8 @@ type CairoEnumRaw = {
231
231
  * {Success: 234, Warning: undefined, Error: undefined}.
232
232
  * Only one variant with a value, object, array.
233
233
  * @returns an instance representing a Cairo custom Enum.
234
- * @example ```typescript
234
+ * @example
235
+ * ```typescript
235
236
  * const myCairoEnum = new CairoCustomEnum( {Success: undefined, Warning: "0x7f32ea", Error: undefined})
236
237
  * ```
237
238
  */
@@ -239,7 +240,8 @@ declare class CairoCustomEnum {
239
240
  /**
240
241
  * direct readonly access to variants of the Cairo Custom Enum.
241
242
  * @returns a value of type any
242
- * @example ```typescript
243
+ * @example
244
+ * ```typescript
243
245
  * const successValue = myCairoEnum.variant.Success;
244
246
  */
245
247
  readonly variant: CairoEnumRaw;
@@ -268,7 +270,8 @@ declare enum CairoOptionVariant {
268
270
  * @param variant CairoOptionVariant.Some or CairoOptionVariant.None
269
271
  * @param someContent value of type T.
270
272
  * @returns an instance representing a Cairo Option.
271
- * @example ```typescript
273
+ * @example
274
+ * ```typescript
272
275
  * const myOption = new CairoOption<BigNumberish>(CairoOptionVariant.Some, "0x54dda8");
273
276
  * ```
274
277
  */
@@ -303,7 +306,8 @@ declare enum CairoResultVariant {
303
306
  * @param variant CairoResultVariant.Ok or CairoResultVariant.Err
304
307
  * @param resultContent value of type T or U.
305
308
  * @returns an instance representing a Cairo Result.
306
- * @example ```typescript
309
+ * @example
310
+ * ```typescript
307
311
  * const myOption = new CairoResult<BigNumberish, CustomError>(CairoResultVariant.Ok, "0x54dda8");
308
312
  * ```
309
313
  */
@@ -4197,8 +4201,8 @@ declare module 'abi-wan-kanabi-v2' {
4197
4201
  InvokeFunctionResponse: InvokeFunctionResponse;
4198
4202
  }
4199
4203
  }
4200
- type TypedContract<TAbi extends Abi$1> = TypedContract$1<TAbi> & ContractInterface;
4201
- type TypedContractV2$1<TAbi extends Abi$2> = TypedContract$2<TAbi> & ContractInterface;
4204
+ type TypedContractV1<TAbi extends Abi$1> = TypedContract<TAbi> & ContractInterface;
4205
+ type TypedContractV2$1<TAbi extends Abi$2> = TypedContract$1<TAbi> & ContractInterface;
4202
4206
  declare abstract class ContractInterface {
4203
4207
  abstract abi: Abi;
4204
4208
  abstract address: string;
@@ -4293,11 +4297,11 @@ declare abstract class ContractInterface {
4293
4297
  * Retrieves the version of the contract (cairo version & compiler version)
4294
4298
  */
4295
4299
  abstract getVersion(): Promise<ContractVersion>;
4296
- abstract typed<TAbi extends Abi$1>(tAbi: TAbi): TypedContract<TAbi>;
4300
+ abstract typedv1<TAbi extends Abi$1>(tAbi: TAbi): TypedContractV1<TAbi>;
4297
4301
  abstract typedv2<TAbi extends Abi$2>(tAbi: TAbi): TypedContractV2$1<TAbi>;
4298
4302
  }
4299
4303
 
4300
- type TypedContractV2<TAbi extends Abi$2> = TypedContract$2<TAbi> & Contract;
4304
+ type TypedContractV2<TAbi extends Abi$2> = TypedContract$1<TAbi> & Contract;
4301
4305
  declare const splitArgsAndOptions: (args: ArgsOrCalldataWithOptions) => {
4302
4306
  args: ArgsOrCalldata;
4303
4307
  options: ContractOptions;
@@ -4347,7 +4351,7 @@ declare class Contract implements ContractInterface {
4347
4351
  parseEvents(receipt: GetTransactionReceiptResponse): ParsedEvents;
4348
4352
  isCairo1(): boolean;
4349
4353
  getVersion(): Promise<ContractVersion>;
4350
- typed<TAbi extends Abi$1>(tAbi: TAbi): TypedContract<TAbi>;
4354
+ typedv1<TAbi extends Abi$1>(tAbi: TAbi): TypedContractV1<TAbi>;
4351
4355
  typedv2<TAbi extends Abi$2>(tAbi: TAbi): TypedContractV2<TAbi>;
4352
4356
  }
4353
4357
 
@@ -5398,4 +5402,4 @@ declare function parseUDCEvent(txReceipt: InvokeTransactionReceiptResponse): {
5398
5402
  /** @deprecated prefer the 'num' naming */
5399
5403
  declare const number: typeof num;
5400
5404
 
5401
- export { Abi, AbiEntry, AbiEnums, AbiEvents, AbiStructs, Account, AccountInterface, AccountInvocationItem, AccountInvocations, AccountInvocationsFactoryDetails, AllowArray, Args, ArgsOrCalldata, ArgsOrCalldataWithOptions, ArraySignatureType, AsyncContractFunction, BigNumberish, BlockIdentifier, BlockNumber, BlockStatus, BlockTag, Builtins, ByteCode, Cairo1Event, CairoAssembly, CairoContract, CairoCustomEnum, CairoEnum, CairoEnumRaw, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoVersion, Call, CallContractResponse, CallData, CallDetails, CallL1Handler, CallOptions, CallStruct, Calldata, CommonTransactionResponse, CompiledContract, CompiledSierra, CompiledSierraCasm, CompilerVersion, CompleteDeclareContractPayload, CompressedProgram, Contract, ContractClass$1 as ContractClass, ContractClassResponse, ContractEntryPoint, ContractEntryPointFields, ContractFactory, ContractFactoryParams, ContractFunction, ContractInterface, ContractOptions, ContractVersion, CustomError, DeclareAndDeployContractPayload, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareDeployUDCResponse, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractResponse, DeployContractUDCResponse, DeployTransactionReceiptResponse, DeployedContractItem, Details, EntryPointType, EntryPointsByType, EnumAbi, EstimateFee, EstimateFeeAction, EstimateFeeBulk, EstimateFeeDetails, EstimateFeeResponse, EstimateFeeResponseBulk, Event, EventAbi, EventEntry, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, HexCalldata, HttpError, Invocation, Invocations, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeOptions, InvokeTransactionReceiptResponse, InvokeTransactionResponse, LegacyCompiledContract, LegacyContractClass, LegacyEvent, LibraryError, Litteral, MessageToL1, MessageToL2, MultiDeployContractResponse, MultiType, Nonce, OptionalPayload, ParsedEvent, ParsedEvents, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, PythonicHints, rpc as RPC, RawArgs, RawArgsArray, RawArgsObject, RawCalldata, RejectedTransactionReceiptResponse, RejectedTransactionResponse, Result, RevertedTransactionReceiptResponse, RpcProvider, RpcProviderOptions, SIMULATION_FLAG, sequencer as Sequencer, SequencerHttpMethod, SequencerIdentifier, SequencerProvider, SequencerProviderOptions, SierraContractClass, SierraContractEntryPointFields, SierraEntryPointsByType, SierraProgramDebugInfo, Signature, Signer, SignerInterface, SimulateTransactionDetails, SimulateTransactionResponse, SimulatedTransaction, SimulationFlags, StarkNetDomain, StarkNetMerkleType, StarkNetType, StateUpdateResponse, Storage, StructAbi, SuccessfulTransactionReceiptResponse, TransactionExecutionStatus, TransactionFinalityStatus, TransactionStatus$1 as TransactionStatus, TransactionType, Tupled, TypedContract, TypedContractV2, TypedData, Uint, Uint256, UniversalDeployerContractPayload, ValidateType, WeierstrassSignatureType, addAddressPadding, buildUrl, cairo, constants, contractClassResponseToLegacyCompiledContract, defaultProvider, ec, encode, index as events, extractContractHashes, fixProto, fixStack, getCalldata, getChecksumAddress, getContractVersionOptions, getDefaultNodeUrl, getEstimateFeeBulkOptions, getSimulateTransactionOptions, hash, isSierra, isUrl, json, merkle, num, number, parseUDCEvent, provider, selector, shortString, splitArgsAndOptions, stark, starknetId, transaction, typedData, index$1 as types, uint256$1 as uint256, validateAndParseAddress, validateChecksumAddress, waitForTransactionOptions };
5405
+ export { Abi, AbiEntry, AbiEnums, AbiEvents, AbiStructs, Account, AccountInterface, AccountInvocationItem, AccountInvocations, AccountInvocationsFactoryDetails, AllowArray, Args, ArgsOrCalldata, ArgsOrCalldataWithOptions, ArraySignatureType, AsyncContractFunction, BigNumberish, BlockIdentifier, BlockNumber, BlockStatus, BlockTag, Builtins, ByteCode, Cairo1Event, CairoAssembly, CairoContract, CairoCustomEnum, CairoEnum, CairoEnumRaw, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoVersion, Call, CallContractResponse, CallData, CallDetails, CallL1Handler, CallOptions, CallStruct, Calldata, CommonTransactionResponse, CompiledContract, CompiledSierra, CompiledSierraCasm, CompilerVersion, CompleteDeclareContractPayload, CompressedProgram, Contract, ContractClass$1 as ContractClass, ContractClassResponse, ContractEntryPoint, ContractEntryPointFields, ContractFactory, ContractFactoryParams, ContractFunction, ContractInterface, ContractOptions, ContractVersion, CustomError, DeclareAndDeployContractPayload, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareDeployUDCResponse, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractResponse, DeployContractUDCResponse, DeployTransactionReceiptResponse, DeployedContractItem, Details, EntryPointType, EntryPointsByType, EnumAbi, EstimateFee, EstimateFeeAction, EstimateFeeBulk, EstimateFeeDetails, EstimateFeeResponse, EstimateFeeResponseBulk, Event, EventAbi, EventEntry, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, HexCalldata, HttpError, Invocation, Invocations, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeOptions, InvokeTransactionReceiptResponse, InvokeTransactionResponse, LegacyCompiledContract, LegacyContractClass, LegacyEvent, LibraryError, Litteral, MessageToL1, MessageToL2, MultiDeployContractResponse, MultiType, Nonce, OptionalPayload, ParsedEvent, ParsedEvents, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, PythonicHints, rpc as RPC, RawArgs, RawArgsArray, RawArgsObject, RawCalldata, RejectedTransactionReceiptResponse, RejectedTransactionResponse, Result, RevertedTransactionReceiptResponse, RpcProvider, RpcProviderOptions, SIMULATION_FLAG, sequencer as Sequencer, SequencerHttpMethod, SequencerIdentifier, SequencerProvider, SequencerProviderOptions, SierraContractClass, SierraContractEntryPointFields, SierraEntryPointsByType, SierraProgramDebugInfo, Signature, Signer, SignerInterface, SimulateTransactionDetails, SimulateTransactionResponse, SimulatedTransaction, SimulationFlags, StarkNetDomain, StarkNetMerkleType, StarkNetType, StateUpdateResponse, Storage, StructAbi, SuccessfulTransactionReceiptResponse, TransactionExecutionStatus, TransactionFinalityStatus, TransactionStatus$1 as TransactionStatus, TransactionType, Tupled, TypedContractV1, TypedContractV2, TypedData, Uint, Uint256, UniversalDeployerContractPayload, ValidateType, WeierstrassSignatureType, addAddressPadding, buildUrl, cairo, constants, contractClassResponseToLegacyCompiledContract, defaultProvider, ec, encode, index as events, extractContractHashes, fixProto, fixStack, getCalldata, getChecksumAddress, getContractVersionOptions, getDefaultNodeUrl, getEstimateFeeBulkOptions, getSimulateTransactionOptions, hash, isSierra, isUrl, json, merkle, num, number, parseUDCEvent, provider, selector, shortString, splitArgsAndOptions, stark, starknetId, transaction, typedData, index$1 as types, uint256$1 as uint256, validateAndParseAddress, validateChecksumAddress, waitForTransactionOptions };
@@ -13371,7 +13371,7 @@ ${res.tx_failure_reason.error_message}`;
13371
13371
  async getVersion() {
13372
13372
  return this.providerOrAccount.getContractVersion(this.address);
13373
13373
  }
13374
- typed(tAbi) {
13374
+ typedv1(tAbi) {
13375
13375
  return this;
13376
13376
  }
13377
13377
  typedv2(tAbi) {