Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvana369 committed Mar 21, 2023
1 parent 0ad3816 commit e2d8a76
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 237 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2023 LinhNDH (https://github.com/nirvana369)
Copyright (c) 2023 nirvana369 (https://github.com/nirvana369)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
Expand Down
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# ed25519

Motoko implementation of [ed25519](https://en.wikipedia.org/wiki/EdDSA).

The library is a motoko version of [noble-ed25519](https://github.com/paulmillr/noble-ed25519).

## Usage

Vessel are supported:
> Setting of [dfx.json](https://github.com/nirvana369/ed25519-demo/blob/main/dfx.json) :
```json
{
"defaults": {
"build": {
"packtool": "vessel sources"
}
},
"version": 1
}
```
> Setting of [package-set.dhall](https://github.com/nirvana369/ed25519-demo/blob/main/package-set.dhall) :
```
let additions = [
{ name = "ed25519"
, version = "v1.0.0"
, repo = "https://github.com/nirvana369/ed25519.git"
, dependencies = [ "base" ] : List Text
}
]
```

> How to use :
```
import Lib "mo:ed25519";
let privateKey = Lib.Utils.randomPrivateKey();
let message : [Nat8] = [0xab, 0xbc, 0xcd, 0xde];
let publicKey = Lib.ED25519.getPublicKey(privateKey);
let signature = Lib.ED25519.sign(message, privateKey);
let isValid = Lib.ED25519.verify(signature, message, publicKey);
```

## Demo
[(https://github.com/nirvana369/ed25519-demo)](https://github.com/nirvana369/ed25519-demo).

## License
[MIT (c) nirvana369](https://github.com/nirvana369/ed25519/blob/main/LICENSE).
49 changes: 0 additions & 49 deletions src/log/log.mo

This file was deleted.

58 changes: 0 additions & 58 deletions src/log/logger.mo

This file was deleted.

29 changes: 0 additions & 29 deletions src/log/logqueue.mo

This file was deleted.

88 changes: 0 additions & 88 deletions src/test.mo

This file was deleted.

12 changes: 0 additions & 12 deletions src/types.mo
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,7 @@ module {
ep : ExtendedPoint;
};

public type Record = {
key : Point;
value : [ExtendedPoint];
};

public type Generator<T> = {
next : () -> T;
};

public type Log = {
id : Nat;
action : Text;
data : Text;
time : Nat;
};
}

0 comments on commit e2d8a76

Please sign in to comment.