Skip to content

quake/ckb-auth

 
 

Repository files navigation

ckb-auth

A consolidated library featuring numerous blockchains authentication techniques on CKB-VM. More details in auth.md. We also write a repository to demonstrate how to use this library: ckb-auth-example.

Motivation

The CKB-VM in CKB has provided a multitude of advanced smart contract functionalities that are not typically found within other blockchain networks. CKB presents a seamless solution for implementing blockchain interoperability. Through the utilization of ckb-auth, a sophisticated smart contract library, users can effortlessly access CKB assets from alternate blockchain wallets, such as Ethereum or Bitcoin, without the use of a CKB wallet.

To illustrate, considering a scenario where Alice only possesses an Ethereum wallet, Bob can transmit assets, including CKB or NFT, to Alice. With the application of ckb-auth, Alice can effectively utilize and transfer these assets using her Ethereum wallet without requiring the creation of a CKB wallet throughout the process.

Integration

The following blockchains are supported:

Build

git submodule update --init
make all-via-docker

For more details, please check out CI script.

Test

All test case commands are located in tests/Makefile.

Installing Dependencies

make install_all

Running All Tests

cd tests && make all_tests

Test with Spawn (activated after hardfork 2023)

Before running test cases with spawn support, please install ckb-debugger for next hardfork:

cargo install --git https://github.com/nervosnetwork/ckb-standalone-debugger ckb-debugger

Then run:

cd tests/auth_spawn_rust && make all

Directory Structure

├── build
├── c
├── ckb-auth-rs
├── ckb-auth-types
├── deps
├── docs
├── tests
│   ├── Makefile
|   ├── auth-c-lock
|   ├── auth-rust-lock
│   ├── auth-c-tests
│   ├── auth-spawn-tests
│   └── bin
├─ tools
│   ├── ckb-auth-cli
│   ├── rippled
│   └── tron
└─ Makefile
Directory Description
build Build output
c ckb-auth code, written in C language
ckb-auth-rs Rust interface of ckb-auth
ckb-auth-types Public code referenced by contracts and test cases
deps Dependencies of ckb-auth using C language
docs Detailed introduction to each chain in ckb-auth
tests All test cases
tools ckb-auth-cli and end-to-end testing tools

About

A consolidated library featuring numerous blockchains authentication techniques on CKB-VM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 54.1%
  • C 41.7%
  • Makefile 3.6%
  • Other 0.6%