Skip to content

Commit 76db6ce

Browse files
Add integer types
1 parent e394899 commit 76db6ce

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

wasm/src/types/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ pub use field::Field;
2323
pub mod group;
2424
pub use group::Group;
2525

26+
pub mod integer;
27+
pub use integer::{I8, I16, I32, I64, I128, U8, U16, U32, U64, U128};
28+
2629
mod networks;
2730

2831
pub(crate) mod native;

wasm/src/types/native/mod.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use snarkvm_console::{
3434
Value,
3535
ValueType,
3636
},
37-
types::{Boolean, Field, Group, Scalar, U16, U64},
37+
types::{Boolean, Field, Group, Scalar, I8, I16, I32, I64, I128, U8, U16, U32, U64, U128},
3838
};
3939
use snarkvm_ledger_block::{Execution, Input, Output, Transaction, Transition};
4040
use snarkvm_ledger_query::Query;
@@ -59,8 +59,17 @@ pub type BooleanNative = Boolean<CurrentNetwork>;
5959
pub type FieldNative = Field<CurrentNetwork>;
6060
pub type GroupNative = Group<CurrentNetwork>;
6161
pub type ScalarNative = Scalar<CurrentNetwork>;
62+
pub type I8Native = I8<CurrentNetwork>;
63+
pub type I16Native = I16<CurrentNetwork>;
64+
pub type I32Native = I32<CurrentNetwork>;
65+
pub type I64Native = I64<CurrentNetwork>;
66+
pub type I128Native = I128<CurrentNetwork>;
67+
pub type U8Native = U8<CurrentNetwork>;
6268
pub type U16Native = U16<CurrentNetwork>;
69+
pub type U32Native = U32<CurrentNetwork>;
6370
pub type U64Native = U64<CurrentNetwork>;
71+
pub type U128Native = U128<CurrentNetwork>;
72+
6473

6574
// Algorithms
6675
pub type BHP256Native = BHP256<CurrentNetwork>;

0 commit comments

Comments
 (0)