@dxos/credentials 0.8.4-main.ae835ea → 0.8.4-main.bc674ce

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/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "name": "@dxos/credentials",
3
- "version": "0.8.4-main.ae835ea",
3
+ "version": "0.8.4-main.bc674ce",
4
4
  "description": "DXOS Credentials",
5
5
  "homepage": "https://github.com/dxos/dxos/tree/main/packages/core/halo/credentials#readme",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
- "repository": "github:dxos/dxos",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
8
11
  "license": "MIT",
9
12
  "author": "info@dxos.org",
10
- "sideEffects": true,
13
+ "sideEffects": false,
11
14
  "type": "module",
12
15
  "exports": {
13
16
  ".": {
@@ -24,17 +27,17 @@
24
27
  "dependencies": {
25
28
  "bip39": "^3.1.0",
26
29
  "json-stable-stringify": "^1.3.0",
27
- "@dxos/async": "0.8.4-main.ae835ea",
28
- "@dxos/context": "0.8.4-main.ae835ea",
29
- "@dxos/crypto": "0.8.4-main.ae835ea",
30
- "@dxos/invariant": "0.8.4-main.ae835ea",
31
- "@dxos/keys": "0.8.4-main.ae835ea",
32
- "@dxos/log": "0.8.4-main.ae835ea",
33
- "@dxos/keyring": "0.8.4-main.ae835ea",
34
- "@dxos/node-std": "0.8.4-main.ae835ea",
35
- "@dxos/protocols": "0.8.4-main.ae835ea",
36
- "@dxos/timeframe": "0.8.4-main.ae835ea",
37
- "@dxos/util": "0.8.4-main.ae835ea"
30
+ "@dxos/async": "0.8.4-main.bc674ce",
31
+ "@dxos/context": "0.8.4-main.bc674ce",
32
+ "@dxos/crypto": "0.8.4-main.bc674ce",
33
+ "@dxos/invariant": "0.8.4-main.bc674ce",
34
+ "@dxos/keys": "0.8.4-main.bc674ce",
35
+ "@dxos/log": "0.8.4-main.bc674ce",
36
+ "@dxos/keyring": "0.8.4-main.bc674ce",
37
+ "@dxos/node-std": "0.8.4-main.bc674ce",
38
+ "@dxos/timeframe": "0.8.4-main.bc674ce",
39
+ "@dxos/util": "0.8.4-main.bc674ce",
40
+ "@dxos/protocols": "0.8.4-main.bc674ce"
38
41
  },
39
42
  "publishConfig": {
40
43
  "access": "public"
@@ -11,14 +11,14 @@ import { type Chain, type Credential } from '@dxos/protocols/proto/dxos/halo/cre
11
11
  import { getCredentialProofPayload } from './signing';
12
12
  import { SIGNATURE_TYPE_ED25519, verifyChain } from './verifier';
13
13
 
14
- export type CreateCredentialSignerParams = {
14
+ export type CreateCredentialSignerProps = {
15
15
  subject: PublicKey;
16
16
  assertion: TypedMessage;
17
17
  nonce?: Uint8Array;
18
18
  parentCredentialIds?: PublicKey[];
19
19
  };
20
20
 
21
- export type CreateCredentialParams = {
21
+ export type CreateCredentialProps = {
22
22
  signer: Signer;
23
23
  issuer: PublicKey;
24
24
  signingKey?: PublicKey;
@@ -44,7 +44,7 @@ export const createCredential = async ({
44
44
  chain,
45
45
  nonce,
46
46
  parentCredentialIds,
47
- }: CreateCredentialParams): Promise<Credential> => {
47
+ }: CreateCredentialProps): Promise<Credential> => {
48
48
  invariant(assertion['@type'], 'Invalid assertion.');
49
49
  invariant(!!signingKey === !!chain, 'Chain must be provided if and only if the signing key differs from the issuer.');
50
50
  if (chain) {
@@ -93,7 +93,7 @@ export const createCredentialMessage = (credential: Credential) => {
93
93
  // TODO(burdon): Vs. Signer.
94
94
  export interface CredentialSigner {
95
95
  getIssuer(): PublicKey;
96
- createCredential: (params: CreateCredentialSignerParams) => Promise<Credential>;
96
+ createCredential: (params: CreateCredentialSignerProps) => Promise<Credential>;
97
97
  }
98
98
 
99
99
  /**
@@ -13,7 +13,7 @@ import { getCredentialAssertion, isValidAuthorizedDeviceCredential } from '../cr
13
13
 
14
14
  import { type CredentialProcessor } from './credential-processor';
15
15
 
16
- export type DeviceStateMachineParams = {
16
+ export type DeviceStateMachineProps = {
17
17
  identityKey: PublicKey;
18
18
  deviceKey: PublicKey;
19
19
  onUpdate?: () => void;
@@ -30,7 +30,7 @@ export class DeviceStateMachine implements CredentialProcessor {
30
30
 
31
31
  public deviceCredentialChain?: Chain;
32
32
 
33
- constructor(private readonly _params: DeviceStateMachineParams) {}
33
+ constructor(private readonly _params: DeviceStateMachineProps) {}
34
34
 
35
35
  async processCredential(credential: Credential): Promise<void> {
36
36
  log('processing credential...', {
@@ -10,7 +10,7 @@ import { getCredentialAssertion } from '../credentials';
10
10
 
11
11
  import { type CredentialProcessor } from './credential-processor';
12
12
 
13
- export type ProfileStateMachineParams = {
13
+ export type ProfileStateMachineProps = {
14
14
  identityKey: PublicKey;
15
15
  onUpdate?: () => void;
16
16
  };
@@ -22,7 +22,7 @@ export class ProfileStateMachine implements CredentialProcessor {
22
22
  // TODO(burdon): Return values via getter.
23
23
  public profile?: ProfileDocument;
24
24
 
25
- constructor(private readonly _params: ProfileStateMachineParams) {}
25
+ constructor(private readonly _params: ProfileStateMachineProps) {}
26
26
 
27
27
  async processCredential(credential: Credential): Promise<void> {
28
28
  const assertion = getCredentialAssertion(credential);