Skip to content

Commit

Permalink
Merge pull request #7 from telosnetwork/crate_changes
Browse files Browse the repository at this point in the history
Crate changes
  • Loading branch information
poplexity authored Jan 3, 2024
2 parents 16e7f36 + b00201f commit 83add30
Show file tree
Hide file tree
Showing 11 changed files with 120 additions and 90 deletions.
62 changes: 11 additions & 51 deletions Cargo.lock

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

15 changes: 13 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@
resolver = "2"
members = [
"crates/antelope",
"crates/antelope_macros",
]
"crates/macros",
]

[workspace.package]
version = "0.1.0"
edition = "2021"
rust-version = "1.75"
authors = ["Jesse Schulman <[email protected]>"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/telosnetwork/antelope-rs"
repository = "https://github.com/telosnetwork/antelope-rs"
keywords = ["blockchain", "antelope"]
categories = ["cryptography::cryptocurrencies", "encoding"]
File renamed without changes.
21 changes: 21 additions & 0 deletions LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
# AntelopeIO Rust SDK

[<img alt="Crates.io Version" src="https://img.shields.io/crates/v/antelope-client?style=for-the-badge&logo=rust">](https://crates.io/crates/antelope-client)
[<img alt="docs.rs" src="https://img.shields.io/docsrs/antelope-client?style=for-the-badge&logo=docs.rs&label=docs.rs">](https://docs.rs/antelope-client)
[<img alt="GitHub Workflow Status (with event)" src="https://img.shields.io/github/actions/workflow/status/telosnetwork/antelope-rs/on_push.yml?style=for-the-badge&logo=github">](https://github.com/telosnetwork/antelope-rs/actions)

### Reference libraries to use as examples when building:
## Description
A Rust library for interacting with Antelope blockchains. Currently a work in progress, interfaces may change before the `1.0.0` release is cut.

- Python: `https://github.com/guilledk/py-leap/blob/multi_push_action/src/leap/protocol.py`
- Typescript: `https://github.com/wharfkit/antelope/blob/master/src/serializer/encoder.ts`
## Documentation
https://docs.rs/antelope-client

## License
Licensed under either of

* Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.

## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.

## Credits
Much of this library (especially the tests & test data) was derived from the [WharfKit typescript client](https://github.com/wharfkit/antelope)

The rust serialization/deserialization via the Packer trait, as well as many of the types are from [rscdk](https://github.com/uuosio/rscdk)
37 changes: 17 additions & 20 deletions crates/antelope/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
[package]
name = "antelope"
version = "0.1.0"
edition = "2021"
include = ["Cargo.toml", "src/**/*.rs", "tests/**/*.rs", "README.md", "LICENSE"]
name = "antelope-client"
description = "Rust client for Antelope blockchains"

version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true

readme = "../../README.md"
exclude = ["tests"]

[lib]
name = "antelope"

[dependencies]
antelope_macros = "0.1.0"

log = "0.4.14"
antelope_macros = { version = "0.1.0", path = "../antelope_macros" }
base64 = "0.21.5"
bs58 = "0.5.0"
ecdsa = { version = "0.16.9", features = ["std", "rfc6979", "arithmetic", "signing"] }
Expand All @@ -19,7 +30,6 @@ k256 = { version = "0.13.2", features = ["ecdh", "ecdsa"] }
once_cell = "1.18.0"
p256 = { version = "0.13.2", features = ["ecdh", "ecdsa"] }
rand = "0.8.5"
regex = "1.10.2"
ripemd = "0.1.3"
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
Expand All @@ -31,17 +41,4 @@ tokio = { version = "1.35.0", features = ["full"] }
chrono = "0.4.31"
flate2 = "1.0"
hmac = "0.12.1"
rand_core = "0.6.4"
hmac-drbg = { git = "https://github.com/poplexity/rust-hmac-drbg.git", branch = "topic/deps-update-2" }

#[dependencies.digest_old]
#version = "0.9"
#package = "digest"
#
#[dependencies.hmac_old]
#version = "0.9"
#package = "hmac"
#
#[dependencies.sha2_old]
#version = "0.9"
#package = "sha2"
rand_core = "0.6.4"
2 changes: 2 additions & 0 deletions crates/antelope/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ pub mod chain;
pub mod crypto;
pub mod serializer;
pub mod util;

pub use antelope_macros::StructPacker;
14 changes: 0 additions & 14 deletions crates/antelope_macros/Cargo.toml

This file was deleted.

22 changes: 22 additions & 0 deletions crates/macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "antelope-client-macros"
description = "A proc-macro crate for StructPacker"
version = "0.1.0"
documentation = ""

edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true

[lib]
path = "lib.rs"
proc-macro = true

[dependencies]
syn = "1.0"
quote = "1.0"
7 changes: 7 additions & 0 deletions crates/macros/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Derive Macros for antelope-rs crate

## Description
Derive macros require being in their own crate. This create is required for the `StructPacker` derive macro.

## Documentation
https://docs.rs/antelope-client-macros
File renamed without changes.

0 comments on commit 83add30

Please sign in to comment.