Skip to content

Commit

Permalink
feat: Change interface of (Mutez, Int, Nat) literals to also accept s…
Browse files Browse the repository at this point in the history
…tring values
  • Loading branch information
RomarQ committed Apr 19, 2022
1 parent b15eaa1 commit 01744cf
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 172 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tezwell/michelson-sdk",
"version": "0.4.2",
"version": "0.4.3",
"description": "Michelson SDK is a framework for generating Michelson values and types from Javascript.",
"keywords": [
"Tezos",
Expand Down
6 changes: 3 additions & 3 deletions src/literal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ const buildLambda = (michelson: MichelsonMicheline | MichelsonJSON): IValue => {
};

// Singletons
export const Nat = (value: number) => new Michelson_Literal(Prim.int, value);
export const Int = (value: number) => new Michelson_Literal(Prim.int, value);
export const Mutez = (value: number) => new Michelson_Literal(Prim.int, value);
export const Nat = (value: number | string) => new Michelson_Literal(Prim.int, value);
export const Int = (value: number | string) => new Michelson_Literal(Prim.int, value);
export const Mutez = (value: number | string) => new Michelson_Literal(Prim.int, value);
export const Timestamp = (value: number | string) =>
new Michelson_Literal(typeof value === 'string' ? Prim.string : Prim.int, value);
export const String = (value: string) => new Michelson_Literal(Prim.string, value);
Expand Down
Loading

0 comments on commit 01744cf

Please sign in to comment.