1 |
|
2 |
|
3 |
|
4 | const publicKey = new Uint8Array(32);
|
5 |
|
6 | const address = '5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM';
|
7 | const meta = {
|
8 | isTesting: true,
|
9 | name: 'nobody'
|
10 | };
|
11 | const json = {
|
12 | address,
|
13 | encoded: '',
|
14 | encoding: {
|
15 | content: ['pkcs8', 'ed25519'],
|
16 | type: 'none',
|
17 | version: '0'
|
18 | },
|
19 | meta
|
20 | };
|
21 | const pair = {
|
22 | address,
|
23 | addressRaw: publicKey,
|
24 |
|
25 | decodePkcs8: (passphrase, encoded) => undefined,
|
26 |
|
27 | decryptMessage: (encryptedMessageWithNonce, senderPublicKey) => null,
|
28 |
|
29 | derive: (suri, meta) => pair,
|
30 |
|
31 | encodePkcs8: passphrase => new Uint8Array(0),
|
32 |
|
33 | encryptMessage: (message, recipientPublicKey, _nonce) => new Uint8Array(),
|
34 | isLocked: true,
|
35 | lock: () => {
|
36 | },
|
37 | meta,
|
38 | publicKey,
|
39 |
|
40 | setMeta: meta => undefined,
|
41 |
|
42 | sign: message => new Uint8Array(64),
|
43 |
|
44 | toJson: passphrase => json,
|
45 | type: 'ed25519',
|
46 |
|
47 | unlock: passphrase => undefined,
|
48 |
|
49 | verify: (message, signature) => false,
|
50 |
|
51 | vrfSign: (message, context, extra) => new Uint8Array(96),
|
52 |
|
53 | vrfVerify: (message, vrfResult, context, extra) => false
|
54 | };
|
55 | export function nobody() {
|
56 | return pair;
|
57 | } |
\ | No newline at end of file |