Skip to content

Commit

Permalink
Merge pull request #285 from 0xcregis/284-refactor-anychain-crates
Browse files Browse the repository at this point in the history
refactor: anychain crates
  • Loading branch information
loki-cmu authored Nov 3, 2024
2 parents c9564a1 + 83870d6 commit d3eefd7
Show file tree
Hide file tree
Showing 169 changed files with 60 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get the release version from the tag
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cache Cargo dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[workspace]
resolver = "2"
members = [
"anychain-core",
"anychain-bitcoin",
"anychain-ethereum",
"anychain-tron",
"anychain-filecoin",
"anychain-polkadot",
"anychain-ripple",
"anychain-neo",
"anychain-kms",
"crates/anychain-core",
"crates/anychain-bitcoin",
"crates/anychain-ethereum",
"crates/anychain-tron",
"crates/anychain-filecoin",
"crates/anychain-polkadot",
"crates/anychain-ripple",
"crates/anychain-neo",
"crates/anychain-kms",
"examples/*",
]

Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ public blockchains including Bitcoin, Ethereum, Tron, Filecoin, etc.
* Build signed transactions for different blockchains by merging the raw transaction and the corresponding signature
taken from the user of this library

### Design Doc
### Architecture & Design Doc


```mermaid
flowchart LR
A[iOS/Android App] --> |Link library| B[anychain-ffi-rust];
B --> |Wrap| C[anychain-bitcoin C library];
C --> |Implement| D[anychain-core];
```

[Design Principles for AnyChain Wallet SDK](docs/design-en.md)

Expand Down Expand Up @@ -67,6 +75,7 @@ public blockchains including Bitcoin, Ethereum, Tron, Filecoin, etc.
- Sui
- Aptos
- Sei
- Ton

## License

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "anychain-bitcoin"
description = "A Rust library for Bitcoin-focused cryptocurrency wallets, enabling seamless transactions on the Bitcoin blockchain"
version = "0.1.7"
version = "0.1.8"
keywords = ["bitcoin", "blockchain", "cryptocurrencies", "wallet", "transactions"]

# Workspace inherited keys
Expand All @@ -12,7 +12,7 @@ license = { workspace = true }
repository = { workspace = true }

[dependencies]
anychain-core = { path = "../anychain-core", version = "0.1.6" }
anychain-core = { path = "../anychain-core", version = "0.1.7" }
base58 = { workspace = true }
bech32 = { workspace = true }
serde = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ anychain-bitcoin is a Rust crate that provides a simple and efficient way to int
To use anychain-bitcoin in your Rust project, add the following to your Cargo.toml file:
```toml
[dependencies]
anychain-bitcoin = "0.1.4"
anychain-bitcoin = "0.1.8"
```

Then, import the crate in your code:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anychain-core"
version = "0.1.6"
version = "0.1.7"
description = "A core support for cryptocurrency wallets"
categories = ["command-line-utilities", "cryptocurrencies"]
keywords = ["bitcoin", "blockchain", "ethereum", "no_std"]
Expand Down
2 changes: 1 addition & 1 deletion anychain-core/README.md → crates/anychain-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ anychain-core is a Rust crate that provides core functionality for working with
To start using anychain-core, add it as a dependency in your Cargo.toml file:
```toml
[dependencies]
anychain-core = "0.1.3"
anychain-core = "0.1.7"
```

Then, import the crate in your Rust code:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "anychain-ethereum"
description = "A Rust library for Ethereum-focused cryptocurrency wallets, enabling seamless transactions on the Ethereum blockchain"
version = "0.1.18"
version = "0.1.19"
keywords = ["blockchain", "crypto", "cryptocurrencies", "ethereum", "wallet"]

# Workspace inherited keys
Expand All @@ -12,7 +12,7 @@ license = { workspace = true }
repository = { workspace = true }

[dependencies]
anychain-core = { path = "../anychain-core", version = "0.1.6" }
anychain-core = { path = "../anychain-core", version = "0.1.7" }
regex = { workspace = true }
rlp = { workspace = true }
serde = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This is the README for the anychain-ethereum crate, a Rust library that provides
To use the anychain-ethereum crate in your Rust project, add the following to your Cargo.toml file:
```toml
[dependencies]
anychain-ethereum = "0.1.4"
anychain-ethereum = "0.1.19"
```

## Usage
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "anychain-filecoin"
description = "A Rust library for Filecoin-focused cryptocurrency wallets, enabling seamless transactions on the Filecoin blockchain"
version = "0.1.8"
version = "0.1.9"
keywords = ["filecoin", "blockchain", "cryptocurrencies", "wallet", "transactions"]

# Workspace inherited keys
Expand All @@ -14,7 +14,7 @@ repository = { workspace = true }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anychain-core = { path = "../anychain-core", version = "0.1.6" }
anychain-core = { path = "../anychain-core", version = "0.1.7" }
serde = { workspace = true }
serde_json = { workspace = true }
fvm_shared = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ anychain-filecoin is a Rust library that provides a simple and unified interface
Add the following to your Cargo.toml file:
```toml
[dependencies]
anychain-filecoin = "0.1.3"
anychain-filecoin = "0.1.9"
```

Then run cargo build to download and compile the library.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion anychain-kms/Cargo.toml → crates/anychain-kms/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "anychain-kms"
description = "A Rust library providing Key Management Schema for AnyChain. Handles general security and signature algorithms."
version = "0.1.12"
version = "0.1.13"
keywords = ["cryptography", "security", "signature", "algorithm"]

# Workspace inherited keys
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "anychain-polkadot"
description = "A Rust library for Polkadot cryptocurrency wallets, enabling seamless transactions on the Polkadot blockchain"
version = "0.1.3"
version = "0.1.4"
keywords = ["polkadot", "blockchain", "cryptocurrencies", "wallet", "transactions"]

# Workspace inherited keys
Expand All @@ -12,7 +12,7 @@ license = { workspace = true }
repository = { workspace = true }

[dependencies]
anychain-core = { path = "../anychain-core", version = "0.1.6" }
anychain-core = { path = "../anychain-core", version = "0.1.7" }
sp-core = "30.0.0"
base58 = { workspace = true }
parity-scale-codec = { version = "3.6.5" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Add the following to your `Cargo.toml` file:

```toml
[dependencies]
anychain-polkadot = "0.1.1"
anychain-polkadot = "0.1.4"
```

Then run `cargo build` to download and compile the library.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "anychain-ripple"
description = "A Rust library for interacting with the Ripple blockchain. It provides core functionalities such as transaction signing and serialization, address generation, and network communication."
version = "0.1.9"
version = "0.1.10"
keywords = ["ripple", "blockchain", "cryptocurrencies", "wallet", "transactions"]

# Workspace inherited keys
Expand All @@ -14,6 +14,6 @@ repository = { workspace = true }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anychain-core = { path = "../anychain-core", version = "0.1.6" }
anychain-core = { path = "../anychain-core", version = "0.1.7" }
base58 = { workspace = true }
libsecp256k1 = { workspace = true }
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Features
Add the following to your Cargo.toml file:
```toml
[dependencies]
anychain-ripple = "0.1.5"
anychain-ripple = "0.1.10"
```

Then run cargo build to download and compile the anychain-ripple library.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions anychain-tron/Cargo.toml → crates/anychain-tron/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "anychain-tron"
description = "A Rust library for Tron-focused cryptocurrency wallets, enabling seamless transactions on the Tron blockchain"
version = "0.2.7"
version = "0.2.8"
keywords = ["tron", "blockchain", "cryptocurrencies", "wallet", "transactions"]

# Workspace inherited keys
Expand All @@ -14,7 +14,7 @@ repository = { workspace = true }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anychain-core = { path = "../anychain-core", version = "0.1.6" }
anychain-core = { path = "../anychain-core", version = "0.1.7" }
serde = { workspace = true }
sha3 = { workspace = true }
sha2 = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion anychain-tron/README.md → crates/anychain-tron/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ anychain-tron is a Rust library that provides a simple and unified interface for
Add the following to your Cargo.toml file:
```toml
[dependencies]
anychain-tron = "0.2.2"
anychain-tron = "0.2.8"
```

Then, run cargo build to download and compile the library.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions examples/anychain-bitcoin-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anychain-core = { path = "../../anychain-core" }
anychain-bitcoin = { path = "../../anychain-bitcoin" }
anychain-core = { path = "../../crates/anychain-core" }
anychain-bitcoin = { path = "../../crates/anychain-bitcoin" }
clap = { workspace = true }
serde_json = { workspace = true }
libsecp256k1 = { workspace = true }
4 changes: 2 additions & 2 deletions examples/anychain-bitcoin-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anychain-core = { path = "../../anychain-core" }
anychain-bitcoin = { path = "../../anychain-bitcoin" }
anychain-core = { path = "../../crates/anychain-core" }
anychain-bitcoin = { path = "../../crates/anychain-bitcoin" }
libsecp256k1 = { workspace = true }
4 changes: 2 additions & 2 deletions examples/anychain-ethereum-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anychain-core = { path = "../../anychain-core" }
anychain-ethereum = { path = "../../anychain-ethereum" }
anychain-core = { path = "../../crates/anychain-core" }
anychain-ethereum = { path = "../../crates/anychain-ethereum" }
clap = { workspace = true }
rlp = { workspace = true }
primitive-types = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions examples/anychain-neo-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anychain-core = { path = "../../anychain-core" }
anychain-neo = { path = "../../anychain-neo" }
anychain-core = { path = "../../crates/anychain-core" }
anychain-neo = { path = "../../crates/anychain-neo" }
clap = { workspace = true }
12 changes: 0 additions & 12 deletions scripts/cargo_build_check.sh

This file was deleted.

0 comments on commit d3eefd7

Please sign in to comment.