Skip to content

Commit

Permalink
Merge pull request #18 from nervina-labs/header-deps
Browse files Browse the repository at this point in the history
Impl header deps
  • Loading branch information
duanyytop authored Jun 16, 2022
2 parents 8b1742d + 222da0b commit e4565d0
Show file tree
Hide file tree
Showing 15 changed files with 3,557 additions and 7,559 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cota-smt"
version = "0.4.0"
version = "0.5.0"
edition = "2018"

[dependencies]
Expand Down
20 changes: 17 additions & 3 deletions src/common.mol
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
// Uint16/Uint32: big endian
// The `UintN` is used to store a `N` bits unsigned integer
// as a byte array in big endian.

array Byte32 [byte; 32];
array Uint16 [byte; 2];
array Uint32 [byte; 4];
array Uint64 [byte; 8];
vector Bytes <byte>;
array Byte32 [byte; 32];

array CotaId [byte; 20];
array Characteristic [byte; 20];
array OutPointSlice [byte; 24];

vector Bytes <byte>;
vector Uint32Vec <Uint32>;
vector Byte32Vec <Byte32>;

struct CotaNFTId {
smt_type: Uint16,
cota_id: CotaId,
Expand All @@ -22,6 +26,16 @@ struct CotaNFTInfo {
characteristic: Characteristic,
}

table MerkleProof {
indices: Uint32Vec,
lemmas: Byte32Vec,
}

table TransactionProof {
witnesses_root: Byte32,
proof: MerkleProof,
}

struct DefineCotaNFTId {
smt_type: Uint16,
cota_id: CotaId,
Expand Down
Loading

0 comments on commit e4565d0

Please sign in to comment.