Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement starknet_core_types::curve module #8

Merged
merged 32 commits into from
Nov 1, 2023
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
922eee7
Create stark-cuve crate + naive implement ProjectivePoint
pefontana Oct 18, 2023
5bff6a9
Implement AffinePoint
pefontana Oct 18, 2023
05945f1
Add froms
pefontana Oct 18, 2023
0a1bd07
Implement ops::Add<&ProjectivePoint> for &ProjectivePoint
pefontana Oct 18, 2023
b9ff318
remove starknet-types-core
pefontana Oct 20, 2023
79a7461
Update .gitignore
pefontana Oct 20, 2023
c39043a
rename stark-felt -> starknet-types-core && Implement curve mod
pefontana Oct 20, 2023
f541949
remove todo
pefontana Oct 20, 2023
6d92354
Remove crates/stark-curve
pefontana Oct 20, 2023
ffca830
fix ensure_no_std
pefontana Oct 20, 2023
a7bf4eb
Update commit
pefontana Oct 23, 2023
c9a337b
implement x(), y(), z() methods
pefontana Oct 23, 2023
fd14bf5
little fix
pefontana Oct 23, 2023
ee74daa
Divide the curve into two mods projective_point affine_point
pefontana Oct 23, 2023
0ddba75
minor fixes
pefontana Oct 23, 2023
eff975d
Update Readme.md
pefontana Oct 23, 2023
abd9d51
Fix to_affine method
pefontana Oct 24, 2023
6bafc48
Remove AffinePoint operations
pefontana Oct 25, 2023
6862fd6
Add tests
pefontana Oct 25, 2023
b54dbdb
Add Error handle to to_affine method
pefontana Oct 25, 2023
3239971
Add CurveError
pefontana Oct 25, 2023
e5609a2
docs
pefontana Oct 25, 2023
495c0da
Update Cargo.toml
pefontana Oct 25, 2023
5d2a260
docs
pefontana Oct 25, 2023
b4da689
Restore .gitignore
pefontana Oct 25, 2023
93d5f0a
Docs
pefontana Oct 25, 2023
900cea3
Remove crates/.DS_Store
pefontana Oct 25, 2023
15bed72
Add curve feature
pefontana Oct 26, 2023
971bef6
Doc
pefontana Oct 26, 2023
df43f6c
Add #[repr(transparent)]
pefontana Oct 30, 2023
3a20aed
Add struct docs
pefontana Oct 30, 2023
8787772
Re export curve types
pefontana Oct 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Readme.md
  • Loading branch information
pefontana committed Oct 23, 2023
commit eff975d6e75cc5e603a5343dcd7ca3ae1929456b
18 changes: 10 additions & 8 deletions crates/starknet-types-core/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# stark-felt
# starknet-types-core

Field element representation for Cairo and STARK proofs.
Core types representation for Cairo and STARK proofs.

## Overview

The `stark-felt` crate provides the universal `Felt` (Field Element) type for Cairo and STARK proofs. It was created to reduce the fragmentation in the Starknet Rust ecosystem by providing a standardized representation of the `Felt` type.
The `starknet-types-core` crate provides:
* The universal `Felt` (Field Element) type for Cairo and STARK proofs. It was created to reduce the fragmentation in the Starknet Rust ecosystem by providing a standardized representation of the `Felt` type.
* The `AffinePoint` and `ProjectivePoint` structs, that represent a point in the Stark curve with which you can operate

## Features

Expand All @@ -16,29 +18,29 @@ The `stark-felt` crate provides the universal `Felt` (Field Element) type for Ca
Here are some examples of how to use the `Felt` type:

```rust
// example code here
let x = Felt::from(18)
```

## Usage

Include `stark-felt` in your library by adding the following to your `Cargo.toml`:
Include `starknet-types-core` in your library by adding the following to your `Cargo.toml`:

```toml
[dependencies]
stark-felt = { version = "0.0.3", git = "https://github.com/starknet-io/types-rs" }
starknet-types-core = { version = "0.0.3", git = "https://github.com/starknet-io/types-rs" }
```

## Build from source

Clone the repository and navigate to the stark-felt directory. Then run:
Clone the repository and navigate to the starknet-types-core directory. Then run:

```bash
cargo build --release
```

## Testing

Clone the repository and navigate to the stark-felt directory. Then run:
Clone the repository and navigate to the starknet-types-core directory. Then run:

```bash
cargo test
Expand Down