UNPKG

461 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.pairToJson = void 0;
4const util_1 = require("@polkadot/util");
5const util_crypto_1 = require("@polkadot/util-crypto");
6function pairToJson(type, { address, meta }, encoded, isEncrypted) {
7 return (0, util_1.objectSpread)((0, util_crypto_1.jsonEncryptFormat)(encoded, ['pkcs8', type], isEncrypted), {
8 address,
9 meta
10 });
11}
12exports.pairToJson = pairToJson;