Swiftpack.co - Package - ashchan/ckb-swift-kit

CKB Swift Kit

Platform Swift Package Manager compatible Swift

Swift toolkit for Nervos CKB.

Prerequisites

  • Swift 5.2, or higher
  • macOS 10.15, or iOS 13
  • Swift Package Manager

Installation

In your Package.swift file, specify this in dependencies:

dependencies: [
    .package(url: "https://github.com/ashchan/ckb-swift-kit", .branch("master"))
]

Getting Started

TODO: Under major refactoring. To get doc ready later.

Github

link
Stars: 15

Used By

Total: 0

Releases

v0.29.0 - 2020-03-07 10:05:09

v0.29.0 (2020-03-07)

  • Update CryptoSwift to 1.3.0

v0.25.1 - 2019-12-06 07:00:23

v0.25.1 (2019-12-06)

Features

  • Update Swift version to 5.1
  • Import FoundationNetworking

v0.25.0 - 2019-11-15 12:55:30

v0.25.0 (2019-11-16)

Features

  • Limit address generator to support short payload format version (0e5d410)

v0.24.0 - 2019-11-02 07:02:16

v0.24.0 (2019-11-02)

Features

  • Calculate transaction fee (73dae6e)
  • Implement estimate_fee_rate RPC (9e43807)
  • Implement tx size calculation (b4bac55)
  • Implement WitnessArgs and its serializer (f052a04)
  • Let WitnessArgs support both parsed witness and raw data (15dfe74)
  • Update tx signing (499978e)

v0.23.1 - 2019-10-19 12:53:30

v0.23.1 (2019-10-19)

Features

  • Set default fee to 1000 shannons

v0.23.0 - 2019-10-19 07:30:28

v0.23.0 (2019-10-19)

Bug Fixes

v0.22.0 - 2019-10-05 07:13:40

v0.22.0 (2019-10-05)

Features

  • Parse header/epoch compact target field as hex string (5f8f832)
  • Update header and epoch structures (ec0deaa)
  • Update Script.args and Transaction.witnesses type (95e16d2)

BREAKING CHANGES

  • header and epoch structures are changed as per CKB update.

Note: field compact_target is output from RPC as uint32, but they should be hex string to follow the convention. Await CKB to fix that.

  • Bytes serialization are used for these two structures. Before this [Bytes] serialization were used. This affects script and transaction hash calculation and transaction signing.

v0.21.2 - 2019-09-24 00:54:53

v0.21.2 (2019-09-24)

Features

  • Payment could be assigned a block number (09b94d6)

v0.21.1 - 2019-09-23 13:20:39

v0.21.1 (2019-09-23)

Features

  • Allow live cell collector to accept a from block number param (560d1b3)
  • Return last block around which live cells are scanned (079a169)

v0.21.0 - 2019-09-21 09:03:55

v0.21.0 (2019-09-21)

Bug Fixes

  • CellOutputWithOutPoint decoder for capacity (ccc5dd2)

Features

  • Add support for parsing hex number to UnsignedIntSerializer (9c5cadc)
  • Add UnsignedInteger initializer for parsing hex value (fdabbec)
  • Define HexStringRepresentable protocol (bda9101)
  • Encode/Parse numbers with hex format for RPC calling (2ea114c)
  • Implement a simple Payment class that sends capacity (a92942c)
  • Implenment simple LiveCellCollector (e746470)
  • Represent timestamp properties as Date type (74e84d6)
  • Update mocking client tests for parsing RPC numbers (adf04d9)
  • Update RPC client to use hex numbers (a2817dc)

v0.20.0 - 2019-09-07 07:07:40

v0.20.0 (2019-09-07)

Features

  • Add public key hash to lock script util (c4096d2)
  • Add public key to lock script util (8dd1844)
  • Extract and make public of TransactionSerializer/ScriptSerializer (8c79f70)
  • Implement Array Serializer(s) (b8598fd)
  • Implement ByteSerializer (eb64ddd)
  • Implement DynVecSerializer (a87a8da)
  • Implement FixVecSerializer, refactor other serializers (16b6186)
  • Implement StructSerializer (6530566)
  • Implement TableSerializer (fad544e)
  • Implement transaction serialization and other type serializers (ea0eeeb)
  • Re-implement ByteSerializer (9fecdd1)
  • Update Script to use Molecule serialization (013c4b3)

v0.19.0 - 2019-08-27 01:11:27

v0.19.0 (2019-08-27)

Features

  • Calculate system cell type hash (a5f30c2)
  • Change isDepGroup boolean to DepType enum (5f12311)
  • Change ScriptHashType values (c05a069)
  • Implement Experiment RPC method _compute_script_hash (9a67e45)
  • Implement loading system script with dep group (8dcf84c)
  • Modify transaction structure (546fd3d)
  • Remove seal from header (1dccb23)

v0.18.0 - 2019-08-10 05:56:08

v0.18.0 (2019-08-10)

Features

  • Add new chain RPC method get_cellbase_output_capacity_details (85b2f8a)
  • Add new chain RPC methods get_header, get_header_by_number (0a9f7af)
  • Add new net RPC methods set_ban, get_banned_addresses (df4a7a5)

v0.17.0 - 2019-07-27 05:54:20

v0.17.0 (2019-07-27)

Features

  • Add dao field of Header (6c884dd)
  • Add hash type support (6b01ab8)
  • Update address generator as per recent RFC 21 change (b5e73bb)

BREAKING CHANGES

  • A public key will derive different address from previous implementation. As the code hash index has been changed from 4 bytes to 1 byte, the first serveral fixed characters will become ckt1qyq from ckb1q9gry5zg and be shorter.

v0.16.0 - 2019-07-13 05:05:26

v0.16.0 (2019-07-13)

  • Update to support CKB v0.16.0 (Testnet rylai-v5).

v0.15.0 - 2019-06-29 09:00:34

v0.15.0 (2019-06-29)

Bug Fixes

  • Condition for azure pipelines rpc tests job (a201c0a)
  • Add missing AlertMessage source file (b007aed)
  • Optional block number param for index_lock_hash rpc method (fc4a56d)

Features

  • Implement indexer RPC (93b09b6)
  • Implement Secp256k1 recoverable sign (a5f490c)
  • RPC get_blockchain_info show alerts (5213e6a)
  • Update Epoch schema (b98fc04)
  • example: Update send tx (602bdad)
  • Use recoverable sign for tx (be88790)

BREAKING CHANGES

  • get_blockchain_info change warnings to alerts

v0.14.0 - 2019-06-15 05:06:38

v0.14.0 (2019-06-15)

Features

  • Add total_tx_cycles/total_tx_size to tx_pool_info RPC response (8257cfd)
  • Change base project type from iOS to macOS (675ad86)
  • Remove args property from CellInput (947c89b)
  • Throw exception when transaction sign fails (a344a98)
  • Update transaction signing based on new verification model (ab81c6d)

v0.13.0 - 2019-06-01 04:55:38

v0.13.0 (2019-06-01)

Features

  • Add osx support to podspec (814cb02)
  • Add public key hash (blake160) to address methods (0759ed7)
  • Add total_tx_cycles/total_tx_size to tx_pool_info RPC response (7c3a191)

v0.12.0 - 2019-05-17 23:35:03

v0.12.0 (2019-05-18)

🍻 Ready for rylai testnet launch.

Features

  • Add address to publicKeyHash (ae42882)
  • Add system script loading (c9f06bb)
  • Generalize OutPoint struct to reference headers (28bf93a)
  • Implement experiment RPC methods (f9d389d)
  • Implement get_current_epoch RPC method (be20881)
  • Implement get_epoch_by_number RPC method (2e7a96a)
  • Implement get_peers RPC method (abecb54)
  • Implement Stats RPC methods (52ad9f5)
  • Implement transaction sign (bfcb656)
  • Remove always success script (96a80c9)
  • secp256k1: Implement ECDSA sign, add test JSON fixture (fa28824)
  • Implement tx_pool_info RPC method (6432afc)
  • Stringify RPC number type (43c2fa9)
  • Update Header.proposalsRoot to Header.proposalsHash (5311a0c)
  • Update the param function of OutPoint (df1c1d0)
  • Remove trace RPC methods (b0f70b6)

Bug Fixes

  • Modify data type of CellOutputWithOutPoint.lock (6a5f6c9)
  • RPC request/response id unmatch issue (8872a85)

BREAKING CHANGES

  • Trace RPC methods are removed.

v0.11.0 - 2019-05-14 02:32:26

v0.11.0 (2019-05-14)

Bug Fixes

Features

  • Add an empty example iOS app (3bf41b2)
  • Implement get_block_by_number RPC method (cc3e3a1)

v0.10.0 - 2019-05-06 03:08:00

v0.10.0 (2019-05-06)

Features

  • Change RPC types per CKB change (c2f79ab)

BREAKING CHANGES

  • RPC types and fields are changed and client needs to update to adapt.

v0.9.0 - 2019-04-22 06:31:49

v0.9.0 (2019-04-22)

Bug Fixes

  • Fix public initializers (37368f0)

Features

  • Change get_cells_by_type_hash to get_cells_by_lock_hash (6a4f973)
  • Implement Bech32 and address format (3c38ae3)
  • Update Bench32 to convert data between 5 bits and 8 bits (7e46334)
  • Remove cellbase from header and uncle block (931d2ae)
  • Add segregated witness structure (a418daf)
  • Remove index field from witness (e0f3da2)

v0.8.0 - 2019-04-08 08:19:23

v0.8.0 (2019-04-08)

Features

  • Update to Swift 5 (6b07458)
  • Make more interfaces/properties public

BREAKING CHANGES

  • The SDK requires Xcode 10.2 and Swift 5 to build

v0.7.0 - 2019-03-25 05:38:49

v0.7.0 (2019-03-25)

Bug Fixes

  • test bundle damaged issue (970aefe)

Features

  • add SPM support
  • add tests for compressed/umcopressed public key computing (89f2f42)
  • replace secp256k1_swift with secp256k1.swift and implement Secp256k1.privateToPublic (f1911b8)
  • lint: use SwiftLint installed via CocoaPods (3f06d86)
  • rpc: implement local_node_info RPC method (7c05644)
  • rpc: implement trace rpc trace_transaction and get_transaction_trace (744d8b5)

BREAKING CHANGES

  • Repalce SHA3 with Blake2b.
  • Remove bitcoin_unblock.rb.

v0.6.0 - 2019-02-25 01:30:53

v0.6.0 (2019-02-25)

No changes for v0.6.0.

v0.5.0 - 2019-02-12 00:59:32

v0.5.0 (2019-02-11)

Bug Fixes

  • type hash changed by bitcoin_unlock.rb update (188a0fe)

Features

  • use ckb-ruby-scripts submodule to include ruby scripts (af6f834)

v0.4.0 - 2019-01-15 00:52:11