Crates.io | farcaster_core |
lib.rs | farcaster_core |
version | 0.6.4 |
source | src |
created_at | 2021-08-24 14:11:50.667248 |
updated_at | 2023-01-02 14:25:59.906972 |
description | Farcaster project core library, blockchain atomic swaps. |
homepage | https://github.com/farcaster-project/farcaster-core |
repository | https://github.com/farcaster-project/farcaster-core |
max_upload_size | |
id | 441701 |
size | 424,672 |
The Farcaster atomic swaps project core library aim to implement in Rust the following functionalities needed to build a swap node:
Check out the documentation of this library on docs.rs/farcaster_core. All possible improvements, such as adding usage examples and expanding on existing docs would be extremely appreciated.
This library's purpose is twofold: providing a flexible framework to add specific blockchain support and implementing these specific blockchains (currently bitcoin and monero). The framework is split in modules at the root of the crate:
blockchain
: generic types and traits for declaring assets/chains and on-chain behavior.consensus
: encoding and decoding implementation for all types in the crate, used to serialize and deserialize messages exchanged.crypto
: traits and generic types to define cryptographic interactions (wallet capability, commit/reveal scheme, signature and key types, etc).trade
: generic types and utilities for handling the trade setup, e.g. creating a deal.protocol
: generic types related to the execution of the protocol and messages exchanged between peers.role
: role definitions (trade and swap) and trait for the generic framework.script
: generic types for transaction data management.swap
: swap related types and swap concrete instances (e.g. bitcoin-monero).transaction
: transaction traits for building and validating the arbitrating set of transactions, i.e. the on-chain engine that implements the protocol's game-theoretic mechanism.The blockchain specific support is added under the the following modules:
bitcoin
: support for Bitcoin, implementation of all required traits from the framework, e.g. the Arbitrating
blockchain role.monero
: support for Monero, implementation of all required traits from the framework, e.g. the Accordant
blockchain role.swap/btcxmr
: definition of a swap between bitcoin
and monero
modules with re-export of the majority of generic types with fixed types associated to bitcoin
and monero
.The experimental
a,d taproot
features are enabled by default.
Check bitcoin
, monero
, and swap/btcxmr
modules to see and example of swap pair. For more details on high level context see the RFCs.
See CHANGELOG.md and RELEASING.md.
This work is part of the Farcaster cross-chain atomic swap project, see Farcaster Project.
The code in this project is licensed under the LGPL-3.0 License