Sublab's Scale Codec Swift library
This is a Swift repository which implements Parity's SCALE codec in a designated way.
This repository aims to provide easy to use interface using Swift's Codable family of protocols via natively formatted SCALE Encoder and Decoder.
Unfortunately, Swift misses reflection and static size array in it and to avoid Objective-C backed types usage we generated static size arrays for sizes from 1 to 256 and using some workarounds for existing types like enum with CodingKey.
Sublab
At Sublab we're making mobile-first libraries for developers in Substrate ecosystem. However, we seek our libraries to be available not only for mobile Apple OS or Android OS, but compatible with any Swift/Kotlin environment: web servers, desktop apps, and whatnot.
Our mission is to to develop fully native open-source libraries for mobile platforms in Polkadot and Kusama ecosystems, covering everything with reliable unit-tests and providing rich documentation to the developers community.
Our goal is to have more developers to come into the world of development of client applications in Substrate ecosystem, as we find this as most promising and intelligent blockchain project we ever seen. Thus, we as mobile development gurus trying to create enormously professional libraries which might be very complicated under the hood, but very simple and convenient for final developers.
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your Podfile
:
pod 'ScaleCodecSwift'
Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler.
Once you have your Swift package set up, adding ScaleCodecSwift as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
.package(url: "https://github.com/sublabdev/scale-codec-swift.git", from: "1.0.0")
Documentation
- Our GitBook: https://docs.sublab.dev/swift-libraries/scale-codec-library
- API reference: https://api-reference.sublab.dev/scale-codec-swift/
Contributing
Please look into our contribution guide and code of conduct prior to contributing.
Contacts
- Website: sublab.dev
- E-mail: info@sublab.dev
- Telegram support channel: t.me/sublabsupport
- Twitter: twitter.com/sublabdev