UNPKG

@tidecloak/js

Version:

TideCloak client side JS SDK

17 lines 815 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Tide_Key; const Ed25519Scheme_js_1 = __importDefault(require("../Cryptide/Components/Schemes/Ed25519/Ed25519Scheme.js")); const TideKey_js_1 = __importDefault(require("../Cryptide/TideKey.js")); async function Tide_Key() { const k = TideKey_js_1.default.NewKey(Ed25519Scheme_js_1.default); const msg = new TextEncoder().encode("hello"); const sig = await k.sign(msg); const v = TideKey_js_1.default.FromSerializedComponent(k.get_public_component().Serialize().ToBytes()); await v.verify(msg, sig); console.log("all g"); } //# sourceMappingURL=TideKey.js.map