Skip to content

Commit

Permalink
prepare for release 2.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-rogobete committed Sep 5, 2024
1 parent aa6e3b5 commit cd41bfa
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To integrate stellar SDK into your Xcode project using CocoaPods, specify it in
use_frameworks!

target '<Your Target Name>' do
pod 'stellar-ios-mac-sdk', '~> 2.6.5'
pod 'stellar-ios-mac-sdk', '~> 2.6.6'
end
```

Expand All @@ -44,15 +44,15 @@ $ brew install carthage
To integrate stellar-ios-mac-sdk into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "soneso/stellar-ios-mac-sdk" ~> 2.6.5
github "soneso/stellar-ios-mac-sdk" ~> 2.6.6
```

Run `carthage update` to build the framework and drag the build `stellar-ios-mac-sdk.framework` into your Xcode project.

### Swift Package Manager

```swift
.package(name: "stellarsdk", url: "[email protected]:Soneso/stellar-ios-mac-sdk.git", from: "2.6.5"),
.package(name: "stellarsdk", url: "[email protected]:Soneso/stellar-ios-mac-sdk.git", from: "2.6.6"),
```

### Manual
Expand Down
53 changes: 52 additions & 1 deletion soroban.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ Find the complete code in the [Soroban Events Test](https://github.com/Soneso/st

You can find the working code and more in the [Soroban Test](https://github.com/Soneso/stellar-ios-mac-sdk/blob/master/stellarsdk/stellarsdkTests/soroban), the [Soroban Auth Test](https://github.com/Soneso/stellar-ios-mac-sdk/blob/master/stellarsdk/stellarsdkTests/soroban/SorobanAuthTest.swift) and in the [Atomic Swap Test](https://github.com/Soneso/stellar-ios-mac-sdk/blob/master/stellarsdk/stellarsdkTests/soroban/SorobanAtomicSwapTest.swift) of the iOS SDK. The wasm byte-code files can also be found there.

Because Soroban and the iOS SDK support for Soroban are in development, errors may occur. For a better understanding of an error you can enable the ```SorobanServer``` logging:
For a better understanding of an error you can enable the ```SorobanServer``` logging:

```swift
sorobanServer.enableLogging = true
Expand All @@ -471,3 +471,54 @@ This will log the responses received from the Soroban-RPC server.

If you find any issues please report them [here](https://github.com/Soneso/stellar-ios-mac-sdk/issues). It will help us to improve the SDK.

### Soroban contract parser

The soroban contract parser allows you to access the contract info stored in the contract bytecode.
You can access the environment metadata, contract spec and contract meta.

The environment metadata holds the interface version that should match the version of the soroban environment host functions supported.

The contract spec contains a `SCSpecEntryXDR` for every function, struct, and union exported by the contract.

In the contract meta, contracts may store any metadata in the entries that can be used by applications and tooling off-network.

You can access the parser directly if you have the contract bytecode:

```swift
let byteCode = FileManager.default.contents(atPath: 'path to .wasm file')
let contractInfo = try SorobanContractParser.parseContractByteCode(byteCode: byteCode)
```

Or you can use `SorobanServer` methods to load the contract code form the network and parse it.

By contract id:
```swift
sorobanServer.getContractInfoForContractId(contractId: contractId) { (response) -> (Void) in
switch response {
case .success(let contractInfo):
// ...
case .rpcFailure(let error):
// ...
case .parsingFailure (let error):
// ...
}
}
```

By wasm id:
```swift
sorobanServer.getContractInfoForWasmId(wasmId: wasmId) { (response) -> (Void) in
switch response {
case .success(let contractInfo):
// ...
case .rpcFailure(let error):
// ...
case .parsingFailure (let error):
// ...
}
}
```

The parser returns a `SorobanContractInfo` object containing the parsed data.
In [SorobanParserTest.swift](https://github.com/Soneso/stellar-ios-mac-sdk/blob/master/stellarsdk/stellarsdkTests/soroban/SorobanParserTest.swift) you can find a detailed example of how you can access the parsed data.

2 changes: 1 addition & 1 deletion stellar-ios-mac-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "stellar-ios-mac-sdk"
s.version = "2.6.5"
s.version = "2.6.6"
s.summary = "Fully featured iOS and macOS SDK that provides APIs to build transactions and connect to Horizon server for the Stellar ecosystem."
s.module_name = 'stellarsdk'
s.swift_version = '5.0'
Expand Down
2 changes: 1 addition & 1 deletion stellarsdk/stellarsdk/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.6.5</string>
<string>2.6.6</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down

0 comments on commit cd41bfa

Please sign in to comment.