Skip to content

Releases: software-mansion/starknet.swift

v0.12.0

02 Sep 11:28
974f038
Compare
Choose a tag to compare

What's Changed

Breaking changes

  • Move methods responsible for building RPC calls from StarknetProvider to StarknetRequest.
  • Remove send method from StarknetRequest - use added send in StarknetProvider to send RPC calls
  • Add provider param in estimateFeeV1 and estimateFeeV3 in StarknetAccountProtocol; Update following methods in StarknetAccount

Full Changelog: v0.11.1...v0.12.0

v0.11.1

15 Jul 13:23
19f4809
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.11.0...v0.11.1

v0.10.2

12 Jul 10:23
7c20878
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.10.1...v0.10.2

v0.11.0

12 Jun 17:58
a5c820a
Compare
Choose a tag to compare

What's Changed

  • add StarknetProvider.batchRequests() accepting both list and variadic parameters
  • add StarknetRequest and StarknetBatchRequest structs

Breaking changes

  • StarknetAccount
    • executeV1(...) async throws -> StarknetInvokeTransactionResponse -> executeV1(...) -> StarknetRequest<StarknetInvokeTransactionResponse>
    • executeV3(...) async throws -> StarknetInvokeTransactionResponse -> executeV3(...) -> StarknetRequest<StarknetInvokeTransactionResponse>
    • executeV1(...) async throws -> StarknetInvokeTransactionResponse -> executeV1(...) -> StarknetRequest<StarknetInvokeTransactionResponse>
    • executeV3(...) async throws -> StarknetInvokeTransactionResponse -> executeV3(...) -> StarknetRequest<StarknetInvokeTransactionResponse>
    • estimateFeeV1(...) async throws -> StarknetFeeEstimate -> estimateFeeV1(...) -> StarknetRequest<[StarknetFeeEstimate]>
    • estimateFeeV3(...) async throws -> StarknetFeeEstimate -> estimateFeeV3(...) -> StarknetRequest<[StarknetFeeEstimate]>
    • estimateDeployAccountFeeV1(...) async throws -> StarknetFeeEstimate -> estimateDeployAccountFeeV1(...) -> StarknetRequest<[StarknetFeeEstimate]>
    • estimateDeployAccountFeeV3(...) async throws -> StarknetFeeEstimate -> estimateDeployAccountFeeV3(...) -> StarknetRequest<[StarknetFeeEstimate]>
    • getNonce() async throws -> Felt -> getNonce()-> StarknetRequest<Felt>
  • StarknetProvider
    • specVersion() async throws -> String -> specVersion() -> StarknetRequest<String>
    • callContract(...) async throws -> [Felt] -> callContract(...) -> StarknetRequest<[Felt]>
    • estimateMessageFee(...) async throws -> StarknetFeeEstimate -> estimateMessageFee(...) -> StarknetRequest<StarknetFeeEstimate>
    • getNonce() async throws -> Felt -> getNonce() -> StarknetRequest<Felt>
    • addInvokeTransaction(...) async throws -> StarknetInvokeTransactionResponse -> addInvokeTransaction(...) -> StarknetRequest<StarknetInvokeTransactionResponse>
    • addDeployAccountTransaction(...) async throws -> StarknetDeployAccountResponse -> addDeployAccountTransaction(...) -> StarknetRequest<StarknetDeployAccountResponse>
    • getClassHashAt(...) async throws -> Felt -> getClassHashAt(...) -> StarknetRequest<Felt>
    • getBlockNumber() async throws -> UInt64 -> getBlockNumber() -> StarknetRequest<UInt64>
    • getBlockHashAndNumber() async throws -> StarknetBlockHashAndNumber -> getBlockHashAndNumber() -> StarknetRequest<StarknetBlockHashAndNumber>
    • getEvents(...) async throws -> StarknetGetEventsResponse -> getEvents(...) -> StarknetRequest<StarknetGetEventsResponse>
    • getTransactionBy(...) async throws -> any StarknetTransaction -> getTransactionBy(...) -> StarknetRequest<StarknetTransaction>
    • getTransactionReceiptBy(...) async throws -> any StarknetTransactionReceipt -> getTransactionReceiptBy(...) -> StarknetRequest<StarknetTransactionReceipt>
    • getTransactionStatusBy(...) async throws -> StarknetGetTransactionStatusResponse -> getTransactionStatusBy(...) async throws -> StarknetRequest<StarknetGetTransactionStatusResponse>
    • getChainId() async throws -> StarknetChainId -> getChainId() -> StarknetRequest<StarknetChainId>
    • simulateTransactions(...) async throws -> [StarknetSimulatedTransaction] -> simulateTransactions(...) -> StarknetRequest<[StarknetSimulatedTransaction]>

Merged PRs

Full Changelog: v0.10.1...v0.11.0

v0.10.1

24 May 11:58
f3ed7cd
Compare
Choose a tag to compare

What's Changed

Breaking changes

  • Removed Goerli chain ID support

Full Changelog: v0.10.0...v0.10.1

v0.10.0

12 Apr 12:01
5aed9f9
Compare
Choose a tag to compare

What's Changed

  • Bump swift version to 5.10
  • Update StaknetTypedData in line with SNIP-12
  • Add StarknetMerkleTree
  • Add Felt(fromSigned) initializer
  • Add StarknetByteArray

Breaking changes

  • XCode 15.3+ (macOS 14+) is now required to build the package
  • StaknetTypedData.domain is now of type StarknetTypedData.Domain instead of [String: Element]
    • StarknetTypedData initializers now take domain as StarknetTypedData.Domain instead of [String: Element]
  • StarknetTypedData.types is now of type [String: [TypeDeclarationWrapper]] instead of [String: [TypeDeclaration]]
    • StarknetTypedData initializers now take types as [String: [any TypeDeclaration]] instead of [String: [TypeDeclaration]]
  • StarknetTypedData.TypeDeclaration is now a protocol; Use StarknetTypedData.StandardType instead
  • StarknetTypedData initializers are now throwing, not failable
  • Type verification is now enforced when instantiating StarknetTypedData

Merged PRs

  • Run Checks on non-main PRs by @DelevoXDG in #168
  • Bump swift version to 5.10 by @DelevoXDG in #172
  • Allow StarknetTypedData revision 1 by @DelevoXDG in #166
  • Add StarknetMerkleTree and merkletree support in StarknetTypedData by @DelevoXDG in #167
  • Verify types in StarknetTypedData in line with SNIP-12 by @DelevoXDG in #170
  • Support bool, ClassHash, ContractAddress basic types in StarknetTypedData by @DelevoXDG in #173
  • Add Felt(fromSigned) initializer; Support u128, i128, timestamp types in StarknetTypedData by @DelevoXDG in #174
  • Add StarknetByteArray; Support revision 1 string in StarknetTypedData by @DelevoXDG in #175
  • Support enum basic type in StartknetTypedData by @DelevoXDG in #178
  • Support preset types in StarknetTypedData by @DelevoXDG in #182
  • Use enums for basic and preset types in StarknetTypedData by @DelevoXDG in #180
  • Update StarknetTypedData docs (SNIP-12) by @DelevoXDG in #181
  • Update demo app to support latest version by @franciszekjob in #177

New Contributors

Full Changelog: v0.9.0...v0.10.0

v0.9.0

27 Mar 10:44
6da127e
Compare
Choose a tag to compare

What's Changed

Breaking changes

  • StarknetFeeEstimate extension fee calculation utils
    • toResourceBounds() now takes amountMultiplier, unitPriceMultiplier instead of amountOverhead, unitPriceOverhead
    • toMaxFee() now takes multiplier instead of overhead
  • version of StarknetTransaction is now of type StarknetTransactionVersion instead of Felt; This applies to all derived transaction structs
  • Removed StarknetPendingTransactionReceipt, StarknetProcessedTransactionReceipt protocols
  • Renamed all Starknet[..]TransactionReceipt protocols to Starknet[..]TransactionReceiptProtocol
  • Removed all StarknetPending[..]TransactionReceipt and StarknetProcessed[..]TransactionReceipt classes; Use Starknet[..]TransactionReceipt classes with optional blockHash and blockNumber instead

Full Changelog: v0.8.3...v0.9.0

v0.8.3

28 Feb 13:46
a8e2794
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.8.2...v0.8.3

v0.8.2

19 Feb 14:33
4bf3c72
Compare
Choose a tag to compare

What's Changed

Breaking changes

  • Re-intruduce StarknetChainId as a struct
    • StarknetChainId is used instead of Felt; Use StarknetChainId.init(fromHex:), StarknetChainId.init(fromNetworkName:) for custom chain IDs
    • StarknetProviderProtocol.getChainId() now returns StarknetChainId instead of Felt
    • StarknetTransactionHashCalculator methods now take chain ID as StarknetChainId instead of Felt
  • StarknetAccount constructor now has a mandatory chainId argument
  • StarknetAccountProtocol now has chainId: StarknetChainId property

Full Changelog: v0.8.1...v0.8.2

v0.8.1

07 Feb 11:40
34c7260
Compare
Choose a tag to compare

What's Changed

Breaking changes

  • Removed StarknetChainId enum;
    • StarknetProviderProtocol.getChainId() returns Felt; Use Felt.toShortString() to convert to readable name
    • StarknetTransactionHashCalculator methods now take chain id as Felt instead of StarknetChainId
    • Removed starknetChainId from StarknetProviderProtocol; Use StarknetProviderProtocol.getChainId() instead
    • Removed starknetChainId parameter from all StarknetProvider constructors
  • All StarknetAccountProtocol signing methods are now async

Full Changelog: v0.8.0...v0.8.1