@manahippo/move-to-ts
Advanced tools
Comparing version 0.0.38 to 0.0.39
@@ -33,4 +33,5 @@ import { TypeTag } from "./typeTag"; | ||
export declare function u8str(array: U8[]): string; | ||
export declare function strToU8(str: string): U8[]; | ||
export declare function payloadArg(val: any): string | number | boolean | HexString; | ||
export declare function u8ArrayArg(val: U8[]): string; | ||
//# sourceMappingURL=builtinFuncs.d.ts.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.u8ArrayArg = exports.payloadArg = exports.u8str = exports.set = exports.copy = exports.veq = exports.dyn_ge = exports.dyn_le = exports.dyn_gt = exports.dyn_lt = exports.dyn_neq = exports.dyn_eq = exports.dyn_or = exports.dyn_and = exports.dyn_shr = exports.dyn_shl = exports.dyn_xor = exports.dyn_bitand = exports.dyn_bitor = exports.dyn_div = exports.dyn_mod = exports.dyn_mul = exports.dyn_sub = exports.dyn_add = exports.deep_eq = exports.u128 = exports.u64 = exports.u8 = exports.assert = exports.abortCode = void 0; | ||
exports.u8ArrayArg = exports.payloadArg = exports.strToU8 = exports.u8str = exports.set = exports.copy = exports.veq = exports.dyn_ge = exports.dyn_le = exports.dyn_gt = exports.dyn_lt = exports.dyn_neq = exports.dyn_eq = exports.dyn_or = exports.dyn_and = exports.dyn_shr = exports.dyn_shl = exports.dyn_xor = exports.dyn_bitand = exports.dyn_bitor = exports.dyn_div = exports.dyn_mod = exports.dyn_mul = exports.dyn_sub = exports.dyn_add = exports.deep_eq = exports.u128 = exports.u64 = exports.u8 = exports.assert = exports.abortCode = void 0; | ||
const typeTag_1 = require("./typeTag"); | ||
@@ -189,2 +189,10 @@ const builtinTypes_1 = require("./builtinTypes"); | ||
exports.u8str = u8str; | ||
function strToU8(str) { | ||
const result = []; | ||
for (let i = 0; i < str.length; i++) { | ||
result.push(u8(str.charCodeAt(i))); | ||
} | ||
return result; | ||
} | ||
exports.strToU8 = strToU8; | ||
function payloadArg(val) { | ||
@@ -191,0 +199,0 @@ if (val instanceof builtinTypes_1.UnsignedInt) { |
{ | ||
"name": "@manahippo/move-to-ts", | ||
"version": "0.0.38", | ||
"version": "0.0.39", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -184,2 +184,10 @@ import { TypeTag, StructTag } from "./typeTag"; | ||
export function strToU8(str: string): U8[] { | ||
const result: U8[] = []; | ||
for(let i = 0; i < str.length; i++) { | ||
result.push(u8(str.charCodeAt(i))); | ||
} | ||
return result; | ||
} | ||
export function payloadArg(val: any) { | ||
@@ -186,0 +194,0 @@ if (val instanceof UnsignedInt) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
225690
3901