Latest 0.1.1
Homepage https://github.com/EOSIO/eosio-swift-abieos-serialization-provider
License MIT Copyright (c) 2017-2019 block.one and its contributors. All rights reserved.
Platforms ios 12.0
Authors , , , , ,

Swift Logo

EOSIO SDK for Swift: ABIEOS Serialization Provider EOSIO Alpha

Software License
Language C++/Swift
EosioSwiftAbieosSerializationProvider

ABIEOS Serialization Provider is a pluggable serialization provider for EOSIO SDK for Swift.

Serialization providers are responsible for ABI-driven transaction and action serialization and deserialization between JSON and binary data representations. This particular serialization provider wraps ABIEOS, a C/C++ library that facilitates this conversion.

All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Contents

Prerequisites

  • Xcode 10 or higher
  • CocoaPods 1.5.3 or higher
  • For iOS, iOS 12+

This project relies on platform functionality only present in iOS 12+. Therefore, any project depending on ABIEOS Serialization Provider with EOSIO SDK for Swift must be an iOS 12+ project. Other serialization providers, however, can be created to support iOS 11. If your project requires iOS 11 support, or if you’d like to create a serialization provider and have questions, please reach out to us by logging an issue.

Installation

ABIEOS Serialization Provider is intended to be used in conjunction with EOSIO SDK for Swift as a provider plugin.

To use ABIEOS Serialization Provider with EOSIO SDK for Swift in your app, add the following pods to your Podfile:

use_frameworks!

target "Your Target" do
  pod "EosioSwift", "~> 0.1.1" # EOSIO SDK for Swift core library
  pod "EosioSwiftAbieos", "~> 0.1.1" # pod for this library
  # add other providers for EOSIO SDK for Swift
  pod "EosioSwiftSoftkeySignatureProvider", "~> 0.1.1" # experimental provider for development only
end

Then run pod install.

Now ABIEOS Serialization Provider is ready for use within EOSIO SDK for Swift according to the EOSIO SDK for Swift Basic Usage instructions.

Direct Usage

If you wish to use ABIEOS Serialization Provider directly, its public methods can be called like this:

let abieos: EosioAbieosSerializationProvider? = EosioAbieosSerializationProvider()
let hex = "1686755CA99DE8E73E1200" // some binary data
let json = "{"name": "John"}" // some JSON

let jsonToBinaryTransaction = try? abieos?.serializeTransaction(json: json)
let binaryToJsonTransaction = try? abieos?.deserializeTransaction(hex: hex)

Documentation

Please refer to the generated code documentation at https://eosio.github.io/eosio-swift-abieos-serialization-provider or by cloning this repo and opening the docs/index.html file in your browser.

iOS Example App

If you’d like to see the EOSIO SDK for Swift: ABIEOS Serialization Provider in action, check out our open source iOS Example App–a working application that fetches an account’s token balance and pushes a transfer action.

Want to help?

Interested in contributing? That’s awesome! Here are some Contribution Guidelines and the Code of Conduct.

License

MIT

Important

See LICENSE for copyright and license terms. Block.one makes its contribution on a voluntary basis as a member of the EOSIO community and is not responsible for ensuring the overall performance of the software or any related applications. We make no representation, warranty, guarantee or undertaking in respect of the software or any related documentation, whether expressed or implied, including but not limited to the warranties or merchantability, fitness for a particular purpose and noninfringement. In no event shall we be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or documentation or the use or other dealings in the software or documentation. Any test results or performance figures are indicative and will not reflect performance under all conditions. Any reference to any third party or third-party product, service or other resource is not an endorsement or recommendation by Block.one. We are not responsible, and disclaim any and all responsibility and liability, for your use of or reliance on any of these resources. Third-party resources may be updated, changed or terminated at any time, so the information here may be out of date or inaccurate.

Wallets and related components are complex software that require the highest levels of security. If incorrectly built or used, they may compromise users’ private keys and digital assets. Wallet applications and related components should undergo thorough security evaluations before being used. Only experienced developers should work with this software.

Latest podspec

{
    "name": "EosioSwiftAbieosSerializationProvider",
    "version": "0.1.1",
    "summary": "Binary <> JSON conversion using ABIs. Compatible with languages which can interface to C.",
    "homepage": "https://github.com/EOSIO/eosio-swift-abieos-serialization-provider",
    "license": {
        "type": "MIT",
        "text": "                           Copyright (c) 2017-2019 block.one and its contributors.  All rights reserved.n"
    },
    "authors": {
        "Todd Bowden": "[email protected]",
        "Serguei Vinnitskii": "[email protected]",
        "Farid Rahmani": "[email protected]",
        "Brandon Fancher": "[email protected]",
        "Steve McCoole": "[email protected]",
        "Ben Martell": "[email protected]"
    },
    "source": {
        "git": "https://github.com/EOSIO/eosio-swift-abieos-serialization-provider.git",
        "tag": "v0.1.1"
    },
    "swift_version": "4.2",
    "platforms": {
        "ios": "12.0"
    },
    "public_header_files": [
        "EosioSwiftAbieosSerializationProvider/EosioSwiftAbieosSerializationProvider.h",
        "EosioSwiftAbieosSerializationProvider/abieos.h"
    ],
    "source_files": [
        "EosioSwiftAbieosSerializationProvider/**/*.{c,h,m,cpp,hpp}",
        "EosioSwiftAbieosSerializationProvider/**/*.swift"
    ],
    "preserve_paths": [
        "EosioSwiftAbieosSerializationProvider/eosio.assert.abi.json",
        "EosioSwiftAbieosSerializationProvider/transaction.abi.json",
        "EosioSwiftAbieosSerializationProvider/abi.abi.json"
    ],
    "ios": {
        "resource_bundles": {
            "EosioSwiftAbieosSerializationProvider": "EosioSwiftAbieosSerializationProvider/*.abi.json"
        },
        "dependencies": {
            "EosioSwift": [
                "~> 0.1.1"
            ]
        }
    },
    "resources": [
        "EosioSwiftAbieosSerializationProvider/transaction.abi.json",
        "EosioSwiftAbieosSerializationProvider/abi.abi.json",
        "EosioSwiftAbieosSerializationProvider/eosio.assert.abi.json"
    ],
    "libraries": "c++",
    "pod_target_xcconfig": {
        "CLANG_CXX_LANGUAGE_STANDARD": "gnu++17",
        "CLANG_CXX_LIBRARY": "libc++",
        "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES": "YES",
        "CLANG_ENABLE_MODULES": "YES",
        "SWIFT_COMPILATION_MODE": "wholemodule",
        "ENABLE_BITCODE": "YES"
    }
}

Pin It on Pinterest

Share This