XuJiandong / ckb-auth

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ckb-auth

A consolidated library featuring numerous blockchains authentication techniques on CKB-VM. More details in auth.md. We also write two simple script to demonstrate how to use this library:

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
├── examples
│   ├── auth-c-demo
│   └── auth-rust-demo
├── tests
│   ├── Makefile
│   ├── auth-c-tests
│   └── auth-spawn-tests
├─ 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
examples All examples
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

License:MIT License


Languages

Language:Rust 52.2%Language:C 43.9%Language:Makefile 3.1%Language:Shell 0.4%Language:JavaScript 0.3%