Releases: software-mansion/starknet.swift
Releases · software-mansion/starknet.swift
v0.12.0
What's Changed
- Refactor
StarknetProvider
andStarknetRequest
by @franciszekjob in #217
Breaking changes
- Move methods responsible for building RPC calls from
StarknetProvider
toStarknetRequest
. - Remove
send
method fromStarknetRequest
- use addedsend
inStarknetProvider
to send RPC calls - Add
provider
param inestimateFeeV1
andestimateFeeV3
inStarknetAccountProtocol
; Update following methods inStarknetAccount
Full Changelog: v0.11.1...v0.12.0
v0.11.1
What's Changed
- Add hotfix from
v0.10.2
tomain
by @franciszekjob in #211
Full Changelog: v0.11.0...v0.11.1
v0.10.2
What's Changed
- Fix typed data serialization by @franciszekjob in #207
Full Changelog: v0.10.1...v0.10.2
v0.11.0
What's Changed
- add
StarknetProvider.batchRequests()
accepting both list and variadic parameters - add
StarknetRequest
andStarknetBatchRequest
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
- Convert StarkNet -> Starknet by @franciszekjob in #194
- Support batching multiple RPC requests by @franciszekjob in #187
Full Changelog: v0.10.1...v0.11.0
v0.10.1
What's Changed
- Remove Goerli chain ID support by @franciszekjob in #192
- Fix types encoding in StarknetTypedData by @franciszekjob in #199
- Fix calculated overall fees in
FeeEstimateTests
by @franciszekjob in #200 - Add public
init
forStarknetFeeEstimate
by @franciszekjob in #198
Breaking changes
- Removed Goerli chain ID support
Full Changelog: v0.10.0...v0.10.1
v0.10.0
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 typeStarknetTypedData.Domain
instead of[String: Element]
StarknetTypedData
initializers now takedomain
asStarknetTypedData.Domain
instead of[String: Element]
StarknetTypedData.types
is now of type[String: [TypeDeclarationWrapper]]
instead of[String: [TypeDeclaration]]
StarknetTypedData
initializers now taketypes
as[String: [any TypeDeclaration]]
instead of[String: [TypeDeclaration]]
StarknetTypedData.TypeDeclaration
is now a protocol; UseStarknetTypedData.StandardType
insteadStarknetTypedData
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
andmerkletree
support inStarknetTypedData
by @DelevoXDG in #167 - Verify types in
StarknetTypedData
in line with SNIP-12 by @DelevoXDG in #170 - Support
bool
,ClassHash
,ContractAddress
basic types inStarknetTypedData
by @DelevoXDG in #173 - Add
Felt(fromSigned)
initializer; Supportu128
,i128
,timestamp
types inStarknetTypedData
by @DelevoXDG in #174 - Add
StarknetByteArray
; Support revision 1string
inStarknetTypedData
by @DelevoXDG in #175 - Support
enum
basic type inStartknetTypedData
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
- @franciszekjob made their first contribution in #177
Full Changelog: v0.9.0...v0.10.0
v0.9.0
What's Changed
- Support RPC 0.7.0 by @DelevoXDG in #162
Breaking changes
StarknetFeeEstimate
extension fee calculation utilstoResourceBounds()
now takesamountMultiplier
,unitPriceMultiplier
instead ofamountOverhead
,unitPriceOverhead
toMaxFee()
now takesmultiplier
instead ofoverhead
version
ofStarknetTransaction
is now of typeStarknetTransactionVersion
instead ofFelt
; This applies to all derived transaction structs- Removed
StarknetPendingTransactionReceipt
,StarknetProcessedTransactionReceipt
protocols - Renamed all
Starknet[..]TransactionReceipt
protocols toStarknet[..]TransactionReceiptProtocol
- Removed all
StarknetPending[..]TransactionReceipt
andStarknetProcessed[..]TransactionReceipt
classes; UseStarknet[..]TransactionReceipt
classes with optionalblockHash
andblockNumber
instead
Full Changelog: v0.8.3...v0.9.0
v0.8.3
What's Changed
- Change signing methods which are no longer
async
by @dmcrodrigues in #157 - Support
string
,selector
base types inStarknetTypedData
by @DelevoXDG in #158
Full Changelog: v0.8.2...v0.8.3
v0.8.2
What's Changed
- Revert "Remove StarknetChainId" by @DelevoXDG in #151
- Support custom chain IDs by @DelevoXDG in #155
- Set chain ID in
StarknetAccount
initializer by @DelevoXDG in #154
Breaking changes
- Re-intruduce
StarknetChainId
as a structStarknetChainId
is used instead ofFelt
; UseStarknetChainId.init(fromHex:)
,StarknetChainId.init(fromNetworkName:)
for custom chain IDsStarknetProviderProtocol.getChainId()
now returnsStarknetChainId
instead ofFelt
StarknetTransactionHashCalculator
methods now take chain ID asStarknetChainId
instead ofFelt
StarknetAccount
constructor now has a mandatorychainId
argumentStarknetAccountProtocol
now haschainId: StarknetChainId
property
Full Changelog: v0.8.1...v0.8.2
v0.8.1
What's Changed
- Support Sepolia networks; Support
starknet_chainId
endpoint by @DelevoXDG in #137 - Remove
StarknetChainId
by @DelevoXDG in #142
Breaking changes
- Removed
StarknetChainId
enum;StarknetProviderProtocol.getChainId()
returnsFelt
; UseFelt.toShortString()
to convert to readable nameStarknetTransactionHashCalculator
methods now take chain id asFelt
instead ofStarknetChainId
- Removed
starknetChainId
fromStarknetProviderProtocol
; UseStarknetProviderProtocol.getChainId()
instead - Removed
starknetChainId
parameter from allStarknetProvider
constructors
- All
StarknetAccountProtocol
signing methods are now async
Full Changelog: v0.8.0...v0.8.1