UNPKG

1.16 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.nobody = void 0;
4const publicKey = new Uint8Array(32);
5const address = '5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM';
6const meta = {
7 isTesting: true,
8 name: 'nobody'
9};
10const json = {
11 address,
12 encoded: '',
13 encoding: {
14 content: ['pkcs8', 'ed25519'],
15 type: 'none',
16 version: '0'
17 },
18 meta
19};
20const pair = {
21 address,
22 addressRaw: publicKey,
23 decodePkcs8: (_passphrase, _encoded) => undefined,
24 derive: (_suri, _meta) => pair,
25 encodePkcs8: (_passphrase) => new Uint8Array(0),
26 isLocked: true,
27 lock: () => {
28 // no locking, it is always locked
29 },
30 meta,
31 publicKey,
32 setMeta: (_meta) => undefined,
33 sign: (_message) => new Uint8Array(64),
34 toJson: (_passphrase) => json,
35 type: 'ed25519',
36 unlock: (_passphrase) => undefined,
37 verify: (_message, _signature) => false,
38 vrfSign: (_message, _context, _extra) => new Uint8Array(96),
39 vrfVerify: (_message, _vrfResult, _context, _extra) => false
40};
41function nobody() {
42 return pair;
43}
44exports.nobody = nobody;