UNPKG

306 BJavaScriptView Raw
1import { objectSpread } from '@polkadot/util';
2import { jsonEncryptFormat } from '@polkadot/util-crypto';
3export function pairToJson(type, { address, meta }, encoded, isEncrypted) {
4 return objectSpread(jsonEncryptFormat(encoded, ['pkcs8', type], isEncrypted), {
5 address,
6 meta
7 });
8}