@dxos/credentials 2.33.7-dev.c7ce8f32 → 2.33.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rush/temp/package-deps_build.json +21 -21
- package/.rush/temp/package-deps_build_test.json +21 -21
- package/.rush/temp/shrinkwrap-deps.json +5 -8
- package/credentials.build.log +99 -0
- package/dist/src/auth/auth-message.d.ts +1 -1
- package/dist/src/auth/auth-message.d.ts.map +1 -1
- package/dist/src/auth/auth-message.js +2 -2
- package/dist/src/auth/auth-message.js.map +1 -1
- package/dist/src/auth/auth-plugin.test.js +6 -5
- package/dist/src/auth/auth-plugin.test.js.map +1 -1
- package/dist/src/auth/auth.test.js.map +1 -1
- package/dist/src/auth/authenticator.js +2 -2
- package/dist/src/auth/authenticator.js.map +1 -1
- package/dist/src/greet/greeter-plugin.test.js +6 -5
- package/dist/src/greet/greeter-plugin.test.js.map +1 -1
- package/dist/src/greet/greeter.d.ts +1 -1
- package/dist/src/greet/greeter.d.ts.map +1 -1
- package/dist/src/greet/greeter.js +2 -2
- package/dist/src/greet/greeter.js.map +1 -1
- package/dist/src/greet/invitation.d.ts +1 -1
- package/dist/src/greet/invitation.d.ts.map +1 -1
- package/dist/src/greet/invitation.js +2 -1
- package/dist/src/greet/invitation.js.map +1 -1
- package/dist/src/identity/identity-message-processor.d.ts +1 -1
- package/dist/src/identity/identity-message-processor.d.ts.map +1 -1
- package/dist/src/identity/identity-message-processor.js +4 -4
- package/dist/src/identity/identity-message-processor.js.map +1 -1
- package/dist/src/identity/seedphrase.test.js +2 -1
- package/dist/src/identity/seedphrase.test.js.map +1 -1
- package/dist/src/keys/filter.d.ts +1 -1
- package/dist/src/keys/filter.d.ts.map +1 -1
- package/dist/src/keys/filter.js +2 -2
- package/dist/src/keys/filter.js.map +1 -1
- package/dist/src/keys/keyring-helpers.d.ts +2 -1
- package/dist/src/keys/keyring-helpers.d.ts.map +1 -1
- package/dist/src/keys/keyring-helpers.js +6 -5
- package/dist/src/keys/keyring-helpers.js.map +1 -1
- package/dist/src/keys/keyring.d.ts +1 -1
- package/dist/src/keys/keyring.d.ts.map +1 -1
- package/dist/src/keys/keyring.js +9 -8
- package/dist/src/keys/keyring.js.map +1 -1
- package/dist/src/keys/keyring.test.js +6 -5
- package/dist/src/keys/keyring.test.js.map +1 -1
- package/dist/src/keys/keystore.js +2 -2
- package/dist/src/keys/keystore.js.map +1 -1
- package/dist/src/keys/signer.d.ts +1 -1
- package/dist/src/keys/signer.d.ts.map +1 -1
- package/dist/src/party/party-credential.d.ts +1 -1
- package/dist/src/party/party-credential.d.ts.map +1 -1
- package/dist/src/party/party-credential.js +7 -6
- package/dist/src/party/party-credential.js.map +1 -1
- package/dist/src/party/party-invitation-manager.js +3 -3
- package/dist/src/party/party-invitation-manager.js.map +1 -1
- package/dist/src/party/party-state.d.ts +1 -1
- package/dist/src/party/party-state.d.ts.map +1 -1
- package/dist/src/party/party-state.js +8 -7
- package/dist/src/party/party-state.js.map +1 -1
- package/dist/src/proto/gen/dxos/halo/keys.d.ts +9 -9
- package/dist/src/proto/gen/index.d.ts.map +1 -1
- package/dist/src/proto/gen/index.js +1 -1
- package/dist/src/proto/gen/index.js.map +1 -1
- package/dist/src/proto/substitutions.d.ts +2 -2
- package/dist/src/proto/substitutions.js +2 -2
- package/dist/src/proto/substitutions.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/src/auth/auth-message.ts +1 -1
- package/src/auth/auth-plugin.test.ts +2 -1
- package/src/auth/auth.test.ts +2 -1
- package/src/auth/authenticator.ts +1 -1
- package/src/greet/greeter-plugin.test.ts +2 -1
- package/src/greet/greeter.ts +1 -1
- package/src/greet/invitation.ts +2 -1
- package/src/identity/identity-message-processor.ts +1 -1
- package/src/identity/seedphrase.test.ts +2 -1
- package/src/keys/filter.ts +1 -1
- package/src/keys/keyring-helpers.ts +2 -1
- package/src/keys/keyring.test.ts +2 -1
- package/src/keys/keyring.ts +2 -1
- package/src/keys/keystore.ts +1 -1
- package/src/keys/signer.ts +1 -1
- package/src/party/party-credential.ts +2 -1
- package/src/party/party-invitation-manager.ts +1 -1
- package/src/party/party-state.ts +2 -1
- package/src/proto/gen/dxos/halo/keys.ts +9 -9
- package/src/proto/gen/index.ts +1 -1
- package/src/proto/substitutions.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/credentials",
|
|
3
|
-
"version": "2.33.7
|
|
3
|
+
"version": "2.33.7",
|
|
4
4
|
"description": "DXOS Credentials",
|
|
5
5
|
"homepage": "https://github.com/dxos/halo/tree/master/packages/credentials#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"> 5%"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@dxos/async": "2.33.7
|
|
21
|
-
"@dxos/codec-protobuf": "2.33.7
|
|
22
|
-
"@dxos/crypto": "2.33.7
|
|
23
|
-
"@dxos/debug": "2.33.7
|
|
24
|
-
"@dxos/feed-store": "2.33.7
|
|
25
|
-
"@dxos/mesh-protocol": "2.33.7
|
|
26
|
-
"@dxos/protocols": "2.33.7
|
|
27
|
-
"@dxos/util": "2.33.7
|
|
20
|
+
"@dxos/async": "2.33.7",
|
|
21
|
+
"@dxos/codec-protobuf": "2.33.7",
|
|
22
|
+
"@dxos/crypto": "2.33.7",
|
|
23
|
+
"@dxos/debug": "2.33.7",
|
|
24
|
+
"@dxos/feed-store": "2.33.7",
|
|
25
|
+
"@dxos/mesh-protocol": "2.33.7",
|
|
26
|
+
"@dxos/protocols": "2.33.7",
|
|
27
|
+
"@dxos/util": "2.33.7",
|
|
28
28
|
"buffer-json-encoding": "^1.0.2",
|
|
29
29
|
"debug": "^4.3.3",
|
|
30
30
|
"encoding-down": "^6.3.0",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"stream-to-array": "^2.3.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@dxos/eslint-plugin": "~1.0.
|
|
44
|
-
"@dxos/protocol-plugin-replicator": "2.33.7
|
|
45
|
-
"@dxos/protocols-toolchain": "2.33.
|
|
46
|
-
"@dxos/random-access-multi-storage": "2.33.7
|
|
43
|
+
"@dxos/eslint-plugin": "~1.0.34",
|
|
44
|
+
"@dxos/protocol-plugin-replicator": "2.33.7",
|
|
45
|
+
"@dxos/protocols-toolchain": "2.33.7",
|
|
46
|
+
"@dxos/random-access-multi-storage": "2.33.7",
|
|
47
47
|
"@types/debug": "^4.1.7",
|
|
48
48
|
"@types/encoding-down": "^5.0.0",
|
|
49
49
|
"@types/end-of-stream": "^1.4.0",
|
package/src/auth/auth-message.ts
CHANGED
|
@@ -12,10 +12,11 @@ import pify from 'pify';
|
|
|
12
12
|
import pump from 'pump';
|
|
13
13
|
import waitForExpect from 'wait-for-expect';
|
|
14
14
|
|
|
15
|
-
import { keyToString, randomBytes,
|
|
15
|
+
import { keyToString, randomBytes, createKeyPair } from '@dxos/crypto';
|
|
16
16
|
import { FeedStore, createBatchStream, HypercoreFeed } from '@dxos/feed-store';
|
|
17
17
|
import { Protocol, ProtocolOptions } from '@dxos/mesh-protocol';
|
|
18
18
|
import { Replicator } from '@dxos/protocol-plugin-replicator';
|
|
19
|
+
import { PublicKey } from '@dxos/protocols';
|
|
19
20
|
import { createStorage, StorageType } from '@dxos/random-access-multi-storage';
|
|
20
21
|
|
|
21
22
|
import { Keyring } from '../keys';
|
package/src/auth/auth.test.ts
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
import expect from 'expect';
|
|
8
8
|
import moment from 'moment';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { randomBytes } from '@dxos/crypto';
|
|
11
|
+
import { PublicKey } from '@dxos/protocols';
|
|
11
12
|
|
|
12
13
|
import { Filter, Keyring } from '../keys';
|
|
13
14
|
import {
|
|
@@ -7,8 +7,9 @@ import expect from 'expect';
|
|
|
7
7
|
import pump from 'pump';
|
|
8
8
|
|
|
9
9
|
import { trigger } from '@dxos/async';
|
|
10
|
-
import { keyToString, randomBytes
|
|
10
|
+
import { keyToString, randomBytes } from '@dxos/crypto';
|
|
11
11
|
import { Protocol } from '@dxos/mesh-protocol';
|
|
12
|
+
import { PublicKey, PublicKeyLike } from '@dxos/protocols';
|
|
12
13
|
import { arraysEqual } from '@dxos/util';
|
|
13
14
|
|
|
14
15
|
import { Keyring } from '../keys';
|
package/src/greet/greeter.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import assert from 'assert';
|
|
6
6
|
import debug from 'debug';
|
|
7
7
|
|
|
8
|
-
import { PublicKeyLike, PublicKey } from '@dxos/crypto';
|
|
9
8
|
import { ERR_EXTENSION_RESPONSE_FAILED } from '@dxos/mesh-protocol';
|
|
9
|
+
import { PublicKeyLike, PublicKey } from '@dxos/protocols';
|
|
10
10
|
import { arraysEqual } from '@dxos/util';
|
|
11
11
|
|
|
12
12
|
import { Keyring } from '../keys';
|
package/src/greet/invitation.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Copyright 2019 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { randomBytes
|
|
5
|
+
import { randomBytes } from '@dxos/crypto';
|
|
6
|
+
import { PublicKey, PublicKeyLike } from '@dxos/protocols';
|
|
6
7
|
|
|
7
8
|
import { createDateTimeString } from '../proto';
|
|
8
9
|
|
|
@@ -6,7 +6,7 @@ import assert from 'assert';
|
|
|
6
6
|
import debug from 'debug';
|
|
7
7
|
import { EventEmitter } from 'events';
|
|
8
8
|
|
|
9
|
-
import { PublicKey, PublicKeyLike } from '@dxos/
|
|
9
|
+
import { PublicKey, PublicKeyLike } from '@dxos/protocols';
|
|
10
10
|
|
|
11
11
|
import { isDeviceInfoMessage, isIdentityInfoMessage } from '../identity';
|
|
12
12
|
import { Keyring, assertValidPublicKey } from '../keys';
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import expect from 'expect';
|
|
6
6
|
|
|
7
|
-
import { generateSeedPhrase, KeyPair, keyPairFromSeedPhrase
|
|
7
|
+
import { generateSeedPhrase, KeyPair, keyPairFromSeedPhrase } from '@dxos/crypto';
|
|
8
|
+
import { PublicKey } from '@dxos/protocols';
|
|
8
9
|
|
|
9
10
|
import { Keyring } from '../keys';
|
|
10
11
|
import { KeyType } from '../proto';
|
package/src/keys/filter.ts
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
import assert from 'assert';
|
|
10
10
|
import stableStringify from 'json-stable-stringify';
|
|
11
11
|
|
|
12
|
-
import { createKeyPair, KeyPair,
|
|
12
|
+
import { createKeyPair, KeyPair, PUBLIC_KEY_LENGTH, SECRET_KEY_LENGTH } from '@dxos/crypto';
|
|
13
|
+
import { PublicKey, PublicKeyLike } from '@dxos/protocols';
|
|
13
14
|
|
|
14
15
|
import { KeyChain, KeyRecord, KeyType, createDateTimeString } from '../proto';
|
|
15
16
|
import { MakeOptional } from '../typedefs';
|
package/src/keys/keyring.test.ts
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
import assert from 'assert';
|
|
8
8
|
import expect from 'expect';
|
|
9
9
|
|
|
10
|
-
import { createKeyPair, keyToString, randomBytes, verify
|
|
10
|
+
import { createKeyPair, keyToString, randomBytes, verify } from '@dxos/crypto';
|
|
11
|
+
import { PublicKey } from '@dxos/protocols';
|
|
11
12
|
|
|
12
13
|
import { KeyType, schema } from '../proto';
|
|
13
14
|
import { Filter } from './filter';
|
package/src/keys/keyring.ts
CHANGED
|
@@ -7,8 +7,9 @@ import memdown from 'memdown';
|
|
|
7
7
|
|
|
8
8
|
import { Event } from '@dxos/async';
|
|
9
9
|
import {
|
|
10
|
-
|
|
10
|
+
KeyPair, keyToBuffer, randomBytes, sign as cryptoSign, verify as cryptoVerify
|
|
11
11
|
} from '@dxos/crypto';
|
|
12
|
+
import { PublicKey, PublicKeyLike } from '@dxos/protocols';
|
|
12
13
|
import { arraysEqual } from '@dxos/util';
|
|
13
14
|
|
|
14
15
|
import { isSignedMessage, unwrapMessage } from '../party';
|
package/src/keys/keystore.ts
CHANGED
|
@@ -10,7 +10,7 @@ import levelup, { LevelUp } from 'levelup';
|
|
|
10
10
|
import memdown from 'memdown';
|
|
11
11
|
import toArray from 'stream-to-array';
|
|
12
12
|
|
|
13
|
-
import { PublicKey } from '@dxos/
|
|
13
|
+
import { PublicKey } from '@dxos/protocols';
|
|
14
14
|
|
|
15
15
|
import { KeyRecord } from '../proto';
|
|
16
16
|
|
package/src/keys/signer.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import assert from 'assert';
|
|
6
6
|
|
|
7
|
-
import { randomBytes
|
|
7
|
+
import { randomBytes } from '@dxos/crypto';
|
|
8
|
+
import { PublicKey, PublicKeyLike } from '@dxos/protocols';
|
|
8
9
|
|
|
9
10
|
import { assertValidPublicKey, Signer } from '../keys';
|
|
10
11
|
import { KeyChain, KeyRecord, Message, SignedMessage, PartyCredential, Command, Auth, WithTypeUrl } from '../proto';
|
package/src/party/party-state.ts
CHANGED
|
@@ -6,7 +6,8 @@ import assert from 'assert';
|
|
|
6
6
|
import debug from 'debug';
|
|
7
7
|
import { EventEmitter } from 'events';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { discoveryKey } from '@dxos/crypto';
|
|
10
|
+
import { PublicKey, PublicKeyLike } from '@dxos/protocols';
|
|
10
11
|
|
|
11
12
|
import { isIdentityMessage, IdentityMessageProcessor, IdentityEvents } from '../identity';
|
|
12
13
|
import { Keyring, assertValidPublicKey, keyTypeName } from '../keys';
|
|
@@ -22,36 +22,36 @@ export interface PrivKey {
|
|
|
22
22
|
}
|
|
23
23
|
export interface KeyRecord {
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* The `KeyType` type of the key. This is often unknown for keys from other sources.
|
|
26
26
|
*/
|
|
27
27
|
type: KeyType;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* The public key as a Buffer (required).
|
|
30
30
|
*/
|
|
31
31
|
publicKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* The secret key as a Buffer (this will never be visible outside the Keyring).
|
|
34
34
|
*/
|
|
35
35
|
secretKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PrivKey"]["decode"]>;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Is this key from a Greeting "hint"?
|
|
38
38
|
*/
|
|
39
39
|
hint?: boolean;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
42
|
-
* may be false for "inception keys" such as the Party key.
|
|
41
|
+
* Determines if this is our key?
|
|
42
|
+
* Usually true if `secretKey` is present; may be false for "inception keys" such as the Party key.
|
|
43
43
|
*/
|
|
44
44
|
own?: boolean;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Is this key to be trusted?
|
|
47
47
|
*/
|
|
48
48
|
trusted?: boolean;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* An RFC-3339 date/time string for when the key was added to the Keyring.
|
|
51
51
|
*/
|
|
52
52
|
added?: string;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* An RFC-3339 date/time string for when the key was created.
|
|
55
55
|
*/
|
|
56
56
|
created?: string;
|
|
57
57
|
}
|
package/src/proto/gen/index.ts
CHANGED
|
@@ -49,5 +49,5 @@ export interface TYPES {
|
|
|
49
49
|
}
|
|
50
50
|
export interface SERVICES {
|
|
51
51
|
}
|
|
52
|
-
export const schemaJson = JSON.parse("{\"nested\":{\"dxos\":{\"nested\":{\"credentials\":{\"nested\":{\"auth\":{\"nested\":{\"Auth\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":\"The publicKey of the target Party for these credentials.\"},\"deviceKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":\"The publicKey of the authenticating Device.\"},\"identityKey\":{\"type\":\"PubKey\",\"id\":3,\"comment\":\"The publicKey of the authenticating Identity.\"},\"feedKey\":{\"type\":\"PubKey\",\"id\":4,\"comment\":\"The publicKey of the authenticating Identity.\"},\"feedAdmit\":{\"type\":\"google.protobuf.Any\",\"id\":5,\"comment\":\"FeedAdmit message to the should be written to a control feed in case the `feedKey` is not admitted to the party.\"}},\"comment\":\"The payload for a SignedMessage sent during handshake for replication authentication.\"}}},\"greet\":{\"nested\":{\"BeginResponse\":{\"fields\":{\"info\":{\"keyType\":\"string\",\"type\":\"google.protobuf.Any\",\"id\":1,\"comment\":null}},\"comment\":null},\"ClaimResponse\":{\"fields\":{\"id\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"rendezvousKey\":{\"type\":\"bytes\",\"id\":2,\"comment\":null}},\"comment\":null},\"Command\":{\"fields\":{\"command\":{\"type\":\"Type\",\"id\":1,\"comment\":null},\"secret\":{\"type\":\"bytes\",\"id\":2,\"comment\":null},\"params\":{\"rule\":\"repeated\",\"type\":\"google.protobuf.Any\",\"id\":10,\"comment\":null}},\"nested\":{\"Type\":{\"values\":{\"BEGIN\":0,\"HANDSHAKE\":1,\"NOTARIZE\":2,\"FINISH\":3,\"CLAIM\":10},\"comment\":null,\"comments\":{\"BEGIN\":null,\"HANDSHAKE\":null,\"NOTARIZE\":null,\"FINISH\":null,\"CLAIM\":null}}},\"comment\":\"A Greeter command.\"},\"HandshakeResponse\":{\"fields\":{\"nonce\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"partyKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null}},\"comment\":null},\"KeyHint\":{\"fields\":{\"publicKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"type\":{\"type\":\"KeyType\",\"id\":2,\"comment\":null}},\"comment\":null},\"NotarizeResponse\":{\"fields\":{\"copies\":{\"rule\":\"repeated\",\"type\":\"google.protobuf.Any\",\"id\":1,\"comment\":null},\"feedHints\":{\"rule\":\"repeated\",\"type\":\"PubKey\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"identity\":{\"nested\":{\"DeviceInfo\":{\"fields\":{\"publicKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"displayName\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"IdentityInfo\":{\"fields\":{\"publicKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"displayName\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"Message\":{\"fields\":{\"payload\":{\"rule\":\"required\",\"type\":\"google.protobuf.Any\",\"id\":1,\"comment\":null}},\"comment\":null},\"party\":{\"nested\":{\"Envelope\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"message\":{\"type\":\"Message\",\"id\":2,\"comment\":null}},\"comment\":null},\"FeedAdmit\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"feedKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null}},\"comment\":null},\"FeedGenesis\":{\"fields\":{\"feedKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"ownerKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null}},\"comment\":null},\"KeyAdmit\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"admitKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null},\"admitKeyType\":{\"type\":\"KeyType\",\"id\":3,\"comment\":null}},\"comment\":null},\"PartyCredential\":{\"oneofs\":{\"contents\":{\"oneof\":[\"envelope\",\"partyGenesis\",\"keyAdmit\",\"feedAdmit\",\"feedGenesis\"],\"comment\":null}},\"fields\":{\"type\":{\"type\":\"Type\",\"id\":1,\"comment\":null},\"envelope\":{\"type\":\"Envelope\",\"id\":10,\"comment\":null},\"partyGenesis\":{\"type\":\"PartyGenesis\",\"id\":11,\"comment\":null},\"keyAdmit\":{\"type\":\"KeyAdmit\",\"id\":12,\"comment\":null},\"feedAdmit\":{\"type\":\"FeedAdmit\",\"id\":13,\"comment\":null},\"feedGenesis\":{\"type\":\"FeedGenesis\",\"id\":14,\"comment\":null}},\"nested\":{\"Type\":{\"values\":{\"ENVELOPE\":0,\"PARTY_GENESIS\":1,\"FEED_GENESIS\":2,\"KEY_ADMIT\":3,\"FEED_ADMIT\":4},\"comment\":null,\"comments\":{\"ENVELOPE\":null,\"PARTY_GENESIS\":null,\"FEED_GENESIS\":null,\"KEY_ADMIT\":null,\"FEED_ADMIT\":null}}},\"comment\":null},\"PartyGenesis\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"feedKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null},\"admitKey\":{\"type\":\"PubKey\",\"id\":3,\"comment\":null},\"admitKeyType\":{\"type\":\"KeyType\",\"id\":4,\"comment\":null}},\"comment\":null},\"PartyInvitation\":{\"fields\":{\"id\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"partyKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null},\"issuerKey\":{\"type\":\"PubKey\",\"id\":3,\"comment\":null},\"inviteeKey\":{\"type\":\"PubKey\",\"id\":4,\"comment\":null}},\"comment\":null}}},\"SignedMessage\":{\"fields\":{\"signed\":{\"rule\":\"required\",\"type\":\"Signed\",\"id\":1,\"comment\":null},\"signatures\":{\"rule\":\"repeated\",\"type\":\"Signature\",\"id\":2,\"comment\":null}},\"nested\":{\"Signature\":{\"fields\":{\"key\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"signature\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":2,\"comment\":null},\"keyChain\":{\"type\":\"KeyChain\",\"id\":3,\"comment\":null}},\"comment\":null},\"Signed\":{\"fields\":{\"created\":{\"rule\":\"required\",\"type\":\"string\",\"id\":1,\"comment\":null},\"nonce\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":2,\"comment\":null},\"payload\":{\"rule\":\"required\",\"type\":\"google.protobuf.Any\",\"id\":10,\"comment\":null}},\"comment\":null}},\"comment\":\"A generic container message used whenever messages are signed (e.g. PartyCredential)\"}}},\"halo\":{\"nested\":{\"keys\":{\"nested\":{\"KeyChain\":{\"fields\":{\"publicKey\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"message\":{\"rule\":\"required\",\"type\":\"SignedMessage\",\"id\":2,\"comment\":null},\"parents\":{\"rule\":\"repeated\",\"type\":\"KeyChain\",\"id\":3,\"comment\":null}},\"comment\":null},\"KeyRecord\":{\"fields\":{\"type\":{\"rule\":\"required\",\"type\":\"KeyType\",\"id\":1,\"comment\":\"
|
|
52
|
+
export const schemaJson = JSON.parse("{\"nested\":{\"dxos\":{\"nested\":{\"credentials\":{\"nested\":{\"auth\":{\"nested\":{\"Auth\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":\"The publicKey of the target Party for these credentials.\"},\"deviceKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":\"The publicKey of the authenticating Device.\"},\"identityKey\":{\"type\":\"PubKey\",\"id\":3,\"comment\":\"The publicKey of the authenticating Identity.\"},\"feedKey\":{\"type\":\"PubKey\",\"id\":4,\"comment\":\"The publicKey of the authenticating Identity.\"},\"feedAdmit\":{\"type\":\"google.protobuf.Any\",\"id\":5,\"comment\":\"FeedAdmit message to the should be written to a control feed in case the `feedKey` is not admitted to the party.\"}},\"comment\":\"The payload for a SignedMessage sent during handshake for replication authentication.\"}}},\"greet\":{\"nested\":{\"BeginResponse\":{\"fields\":{\"info\":{\"keyType\":\"string\",\"type\":\"google.protobuf.Any\",\"id\":1,\"comment\":null}},\"comment\":null},\"ClaimResponse\":{\"fields\":{\"id\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"rendezvousKey\":{\"type\":\"bytes\",\"id\":2,\"comment\":null}},\"comment\":null},\"Command\":{\"fields\":{\"command\":{\"type\":\"Type\",\"id\":1,\"comment\":null},\"secret\":{\"type\":\"bytes\",\"id\":2,\"comment\":null},\"params\":{\"rule\":\"repeated\",\"type\":\"google.protobuf.Any\",\"id\":10,\"comment\":null}},\"nested\":{\"Type\":{\"values\":{\"BEGIN\":0,\"HANDSHAKE\":1,\"NOTARIZE\":2,\"FINISH\":3,\"CLAIM\":10},\"comment\":null,\"comments\":{\"BEGIN\":null,\"HANDSHAKE\":null,\"NOTARIZE\":null,\"FINISH\":null,\"CLAIM\":null}}},\"comment\":\"A Greeter command.\"},\"HandshakeResponse\":{\"fields\":{\"nonce\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"partyKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null}},\"comment\":null},\"KeyHint\":{\"fields\":{\"publicKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"type\":{\"type\":\"KeyType\",\"id\":2,\"comment\":null}},\"comment\":null},\"NotarizeResponse\":{\"fields\":{\"copies\":{\"rule\":\"repeated\",\"type\":\"google.protobuf.Any\",\"id\":1,\"comment\":null},\"feedHints\":{\"rule\":\"repeated\",\"type\":\"PubKey\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"identity\":{\"nested\":{\"DeviceInfo\":{\"fields\":{\"publicKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"displayName\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"IdentityInfo\":{\"fields\":{\"publicKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"displayName\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"Message\":{\"fields\":{\"payload\":{\"rule\":\"required\",\"type\":\"google.protobuf.Any\",\"id\":1,\"comment\":null}},\"comment\":null},\"party\":{\"nested\":{\"Envelope\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"message\":{\"type\":\"Message\",\"id\":2,\"comment\":null}},\"comment\":null},\"FeedAdmit\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"feedKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null}},\"comment\":null},\"FeedGenesis\":{\"fields\":{\"feedKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"ownerKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null}},\"comment\":null},\"KeyAdmit\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"admitKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null},\"admitKeyType\":{\"type\":\"KeyType\",\"id\":3,\"comment\":null}},\"comment\":null},\"PartyCredential\":{\"oneofs\":{\"contents\":{\"oneof\":[\"envelope\",\"partyGenesis\",\"keyAdmit\",\"feedAdmit\",\"feedGenesis\"],\"comment\":null}},\"fields\":{\"type\":{\"type\":\"Type\",\"id\":1,\"comment\":null},\"envelope\":{\"type\":\"Envelope\",\"id\":10,\"comment\":null},\"partyGenesis\":{\"type\":\"PartyGenesis\",\"id\":11,\"comment\":null},\"keyAdmit\":{\"type\":\"KeyAdmit\",\"id\":12,\"comment\":null},\"feedAdmit\":{\"type\":\"FeedAdmit\",\"id\":13,\"comment\":null},\"feedGenesis\":{\"type\":\"FeedGenesis\",\"id\":14,\"comment\":null}},\"nested\":{\"Type\":{\"values\":{\"ENVELOPE\":0,\"PARTY_GENESIS\":1,\"FEED_GENESIS\":2,\"KEY_ADMIT\":3,\"FEED_ADMIT\":4},\"comment\":null,\"comments\":{\"ENVELOPE\":null,\"PARTY_GENESIS\":null,\"FEED_GENESIS\":null,\"KEY_ADMIT\":null,\"FEED_ADMIT\":null}}},\"comment\":null},\"PartyGenesis\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"feedKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null},\"admitKey\":{\"type\":\"PubKey\",\"id\":3,\"comment\":null},\"admitKeyType\":{\"type\":\"KeyType\",\"id\":4,\"comment\":null}},\"comment\":null},\"PartyInvitation\":{\"fields\":{\"id\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"partyKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null},\"issuerKey\":{\"type\":\"PubKey\",\"id\":3,\"comment\":null},\"inviteeKey\":{\"type\":\"PubKey\",\"id\":4,\"comment\":null}},\"comment\":null}}},\"SignedMessage\":{\"fields\":{\"signed\":{\"rule\":\"required\",\"type\":\"Signed\",\"id\":1,\"comment\":null},\"signatures\":{\"rule\":\"repeated\",\"type\":\"Signature\",\"id\":2,\"comment\":null}},\"nested\":{\"Signature\":{\"fields\":{\"key\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"signature\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":2,\"comment\":null},\"keyChain\":{\"type\":\"KeyChain\",\"id\":3,\"comment\":null}},\"comment\":null},\"Signed\":{\"fields\":{\"created\":{\"rule\":\"required\",\"type\":\"string\",\"id\":1,\"comment\":null},\"nonce\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":2,\"comment\":null},\"payload\":{\"rule\":\"required\",\"type\":\"google.protobuf.Any\",\"id\":10,\"comment\":null}},\"comment\":null}},\"comment\":\"A generic container message used whenever messages are signed (e.g. PartyCredential)\"}}},\"halo\":{\"nested\":{\"keys\":{\"nested\":{\"KeyChain\":{\"fields\":{\"publicKey\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"message\":{\"rule\":\"required\",\"type\":\"SignedMessage\",\"id\":2,\"comment\":null},\"parents\":{\"rule\":\"repeated\",\"type\":\"KeyChain\",\"id\":3,\"comment\":null}},\"comment\":null},\"KeyRecord\":{\"fields\":{\"type\":{\"rule\":\"required\",\"type\":\"KeyType\",\"id\":1,\"comment\":\"The `KeyType` type of the key. This is often unknown for keys from other sources.\"},\"publicKey\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":2,\"comment\":\"The public key as a Buffer (required).\"},\"secretKey\":{\"type\":\"PrivKey\",\"id\":3,\"comment\":\"The secret key as a Buffer (this will never be visible outside the Keyring).\"},\"hint\":{\"type\":\"bool\",\"id\":4,\"comment\":\"Is this key from a Greeting \\\"hint\\\"?\"},\"own\":{\"type\":\"bool\",\"id\":5,\"comment\":\"Determines if this is our key?\\nUsually true if `secretKey` is present; may be false for \\\"inception keys\\\" such as the Party key.\"},\"trusted\":{\"type\":\"bool\",\"id\":6,\"comment\":\"Is this key to be trusted?\"},\"added\":{\"type\":\"string\",\"id\":7,\"comment\":\"An RFC-3339 date/time string for when the key was added to the Keyring.\"},\"created\":{\"type\":\"string\",\"id\":8,\"comment\":\"An RFC-3339 date/time string for when the key was created.\"}},\"comment\":null},\"KeyRecordList\":{\"fields\":{\"keys\":{\"rule\":\"repeated\",\"type\":\"KeyRecord\",\"id\":1,\"comment\":null}},\"comment\":null},\"KeyType\":{\"values\":{\"UNKNOWN\":0,\"IDENTITY\":1,\"DEVICE\":2,\"PARTY\":3,\"FEED\":4,\"DXNS_ADDRESS\":5},\"comment\":null,\"comments\":{\"UNKNOWN\":null,\"IDENTITY\":null,\"DEVICE\":null,\"PARTY\":null,\"FEED\":null,\"DXNS_ADDRESS\":null}},\"PrivKey\":{\"fields\":{\"data\":{\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":null},\"PubKey\":{\"fields\":{\"data\":{\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":null}}}}}}},\"google\":{\"nested\":{\"protobuf\":{\"nested\":{\"Any\":{\"fields\":{\"type_url\":{\"type\":\"string\",\"id\":1},\"value\":{\"type\":\"bytes\",\"id\":2}},\"comment\":null},\"BoolValue\":{\"fields\":{\"value\":{\"type\":\"bool\",\"id\":1}},\"comment\":null},\"BytesValue\":{\"fields\":{\"value\":{\"type\":\"bytes\",\"id\":1}},\"comment\":null},\"DoubleValue\":{\"fields\":{\"value\":{\"type\":\"double\",\"id\":1}},\"comment\":null},\"FloatValue\":{\"fields\":{\"value\":{\"type\":\"float\",\"id\":1}},\"comment\":null},\"Int32Value\":{\"fields\":{\"value\":{\"type\":\"int32\",\"id\":1}},\"comment\":null},\"Int64Value\":{\"fields\":{\"value\":{\"type\":\"int64\",\"id\":1}},\"comment\":null},\"StringValue\":{\"fields\":{\"value\":{\"type\":\"string\",\"id\":1}},\"comment\":null},\"UInt32Value\":{\"fields\":{\"value\":{\"type\":\"uint32\",\"id\":1}},\"comment\":null},\"UInt64Value\":{\"fields\":{\"value\":{\"type\":\"uint64\",\"id\":1}},\"comment\":null}}}}}}}");
|
|
53
53
|
export const schema = Schema.fromJson<TYPES, SERVICES>(schemaJson, substitutions);
|