@dxos/credentials 0.7.5-main.9d2a38b → 0.7.5-main.e94eead

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.
@@ -1 +1 @@
1
- {"inputs":{"packages/core/halo/credentials/src/invitations.ts":{"bytes":1781,"imports":[],"format":"esm"},"packages/core/halo/credentials/src/seedphrase.ts":{"bytes":2345,"imports":[{"path":"bip39","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/core/halo/credentials/src/passcode.ts":{"bytes":1464,"imports":[],"format":"esm"},"packages/core/halo/credentials/src/credentials/signing.ts":{"bytes":11236,"imports":[{"path":"json-stable-stringify","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/halo/credentials/src/presentations/signing.ts":{"bytes":3794,"imports":[{"path":"packages/core/halo/credentials/src/credentials/signing.ts","kind":"import-statement","original":"../credentials/signing"}],"format":"esm"},"packages/core/halo/credentials/src/credentials/assertions.ts":{"bytes":3821,"imports":[],"format":"esm"},"packages/core/halo/credentials/src/credentials/verifier.ts":{"bytes":8574,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/assertions.ts","kind":"import-statement","original":"./assertions"},{"path":"packages/core/halo/credentials/src/credentials/signing.ts","kind":"import-statement","original":"./signing"}],"format":"esm"},"packages/core/halo/credentials/src/credentials/credential-factory.ts":{"bytes":11553,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/signing.ts","kind":"import-statement","original":"./signing"},{"path":"packages/core/halo/credentials/src/credentials/verifier.ts","kind":"import-statement","original":"./verifier"}],"format":"esm"},"packages/core/halo/credentials/src/credentials/credential-generator.ts":{"bytes":25434,"imports":[{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/credential-factory.ts","kind":"import-statement","original":"./credential-factory"}],"format":"esm"},"packages/core/halo/credentials/src/credentials/index.ts":{"bytes":929,"imports":[{"path":"packages/core/halo/credentials/src/credentials/assertions.ts","kind":"import-statement","original":"./assertions"},{"path":"packages/core/halo/credentials/src/credentials/credential-factory.ts","kind":"import-statement","original":"./credential-factory"},{"path":"packages/core/halo/credentials/src/credentials/credential-generator.ts","kind":"import-statement","original":"./credential-generator"},{"path":"packages/core/halo/credentials/src/credentials/signing.ts","kind":"import-statement","original":"./signing"},{"path":"packages/core/halo/credentials/src/credentials/verifier.ts","kind":"import-statement","original":"./verifier"}],"format":"esm"},"packages/core/halo/credentials/src/presentations/presentation.ts":{"bytes":3718,"imports":[{"path":"packages/core/halo/credentials/src/presentations/signing.ts","kind":"import-statement","original":"./signing"},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/presentations/verifier.ts":{"bytes":10470,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/presentations/signing.ts","kind":"import-statement","original":"./signing"},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/presentations/index.ts":{"bytes":703,"imports":[{"path":"packages/core/halo/credentials/src/presentations/signing.ts","kind":"import-statement","original":"./signing"},{"path":"packages/core/halo/credentials/src/presentations/presentation.ts","kind":"import-statement","original":"./presentation"},{"path":"packages/core/halo/credentials/src/presentations/verifier.ts","kind":"import-statement","original":"./verifier"}],"format":"esm"},"packages/core/halo/credentials/src/state-machine/feed-state-machine.ts":{"bytes":6028,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/state-machine/invitation-state-machine.ts":{"bytes":11718,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/graph/credential-graph.ts":{"bytes":73642,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/halo/credentials/src/state-machine/member-state-machine.ts":{"bytes":21767,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"},{"path":"packages/core/halo/credentials/src/graph/credential-graph.ts","kind":"import-statement","original":"../graph/credential-graph"}],"format":"esm"},"packages/core/halo/credentials/src/state-machine/space-state-machine.ts":{"bytes":37745,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/state-machine/feed-state-machine.ts","kind":"import-statement","original":"./feed-state-machine"},{"path":"packages/core/halo/credentials/src/state-machine/invitation-state-machine.ts","kind":"import-statement","original":"./invitation-state-machine"},{"path":"packages/core/halo/credentials/src/state-machine/member-state-machine.ts","kind":"import-statement","original":"./member-state-machine"},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/state-machine/index.ts":{"bytes":909,"imports":[{"path":"packages/core/halo/credentials/src/state-machine/space-state-machine.ts","kind":"import-statement","original":"./space-state-machine"},{"path":"packages/core/halo/credentials/src/state-machine/feed-state-machine.ts","kind":"import-statement","original":"./feed-state-machine"},{"path":"packages/core/halo/credentials/src/state-machine/member-state-machine.ts","kind":"import-statement","original":"./member-state-machine"},{"path":"packages/core/halo/credentials/src/state-machine/invitation-state-machine.ts","kind":"import-statement","original":"./invitation-state-machine"}],"format":"esm"},"packages/core/halo/credentials/src/processor/credential-processor.ts":{"bytes":735,"imports":[],"format":"esm"},"packages/core/halo/credentials/src/processor/device-state-machine.ts":{"bytes":10680,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/processor/profile-state-machine.ts":{"bytes":5520,"imports":[{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/processor/index.ts":{"bytes":785,"imports":[{"path":"packages/core/halo/credentials/src/processor/credential-processor.ts","kind":"import-statement","original":"./credential-processor"},{"path":"packages/core/halo/credentials/src/processor/device-state-machine.ts","kind":"import-statement","original":"./device-state-machine"},{"path":"packages/core/halo/credentials/src/processor/profile-state-machine.ts","kind":"import-statement","original":"./profile-state-machine"}],"format":"esm"},"packages/core/halo/credentials/src/index.ts":{"bytes":1093,"imports":[{"path":"packages/core/halo/credentials/src/invitations.ts","kind":"import-statement","original":"./invitations"},{"path":"packages/core/halo/credentials/src/seedphrase.ts","kind":"import-statement","original":"./seedphrase"},{"path":"packages/core/halo/credentials/src/passcode.ts","kind":"import-statement","original":"./passcode"},{"path":"packages/core/halo/credentials/src/presentations/index.ts","kind":"import-statement","original":"./presentations"},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"./credentials"},{"path":"packages/core/halo/credentials/src/state-machine/index.ts","kind":"import-statement","original":"./state-machine"},{"path":"packages/core/halo/credentials/src/processor/index.ts","kind":"import-statement","original":"./processor"}],"format":"esm"}},"outputs":{"packages/core/halo/credentials/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":119410},"packages/core/halo/credentials/dist/lib/node-esm/index.mjs":{"imports":[{"path":"bip39","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"json-stable-stringify","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["CredentialGenerator","DeviceStateMachine","FeedStateMachine","InvitationStateMachine","MemberStateMachine","ProfileStateMachine","SIGNATURE_TYPE_ED25519","SpaceStateMachine","canonicalStringify","checkCredentialType","createAdmissionCredentials","createCancelDelegatedSpaceInvitationCredential","createCredential","createCredentialMessage","createCredentialSignerWithChain","createCredentialSignerWithKey","createDelegatedSpaceInvitationCredential","createDeviceAuthorization","credentialTypeFilter","defaultSecretProvider","defaultSecretValidator","generatePasscode","generateSeedPhrase","getCredentialAssertion","getCredentialProofPayload","getPresentationProofPayload","isValidAuthorizedDeviceCredential","keyPairFromSeedPhrase","signPresentation","verifyChain","verifyCredential","verifyCredentialSignature","verifyPresentation","verifyPresentationChain","verifyPresentationSignature"],"entryPoint":"packages/core/halo/credentials/src/index.ts","inputs":{"packages/core/halo/credentials/src/invitations.ts":{"bytesInOutput":126},"packages/core/halo/credentials/src/index.ts":{"bytesInOutput":0},"packages/core/halo/credentials/src/seedphrase.ts":{"bytesInOutput":560},"packages/core/halo/credentials/src/passcode.ts":{"bytesInOutput":178},"packages/core/halo/credentials/src/credentials/signing.ts":{"bytesInOutput":2037},"packages/core/halo/credentials/src/presentations/signing.ts":{"bytesInOutput":733},"packages/core/halo/credentials/src/presentations/index.ts":{"bytesInOutput":0},"packages/core/halo/credentials/src/credentials/assertions.ts":{"bytesInOutput":648},"packages/core/halo/credentials/src/credentials/index.ts":{"bytesInOutput":0},"packages/core/halo/credentials/src/credentials/credential-factory.ts":{"bytesInOutput":2614},"packages/core/halo/credentials/src/credentials/verifier.ts":{"bytesInOutput":1762},"packages/core/halo/credentials/src/credentials/credential-generator.ts":{"bytesInOutput":5630},"packages/core/halo/credentials/src/presentations/presentation.ts":{"bytesInOutput":578},"packages/core/halo/credentials/src/presentations/verifier.ts":{"bytesInOutput":2306},"packages/core/halo/credentials/src/state-machine/space-state-machine.ts":{"bytesInOutput":8924},"packages/core/halo/credentials/src/state-machine/feed-state-machine.ts":{"bytesInOutput":1545},"packages/core/halo/credentials/src/state-machine/invitation-state-machine.ts":{"bytesInOutput":2764},"packages/core/halo/credentials/src/state-machine/member-state-machine.ts":{"bytesInOutput":5260},"packages/core/halo/credentials/src/graph/credential-graph.ts":{"bytesInOutput":18877},"packages/core/halo/credentials/src/state-machine/index.ts":{"bytesInOutput":0},"packages/core/halo/credentials/src/processor/index.ts":{"bytesInOutput":0},"packages/core/halo/credentials/src/processor/device-state-machine.ts":{"bytesInOutput":2782},"packages/core/halo/credentials/src/processor/profile-state-machine.ts":{"bytesInOutput":1204}},"bytes":61032}}}
1
+ {"inputs":{"packages/core/halo/credentials/src/did.ts":{"bytes":3728,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/halo/credentials/src/invitations.ts":{"bytes":1781,"imports":[],"format":"esm"},"packages/core/halo/credentials/src/seedphrase.ts":{"bytes":2345,"imports":[{"path":"bip39","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/core/halo/credentials/src/passcode.ts":{"bytes":1464,"imports":[],"format":"esm"},"packages/core/halo/credentials/src/credentials/signing.ts":{"bytes":11260,"imports":[{"path":"json-stable-stringify","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/halo/credentials/src/presentations/signing.ts":{"bytes":3794,"imports":[{"path":"packages/core/halo/credentials/src/credentials/signing.ts","kind":"import-statement","original":"../credentials/signing"}],"format":"esm"},"packages/core/halo/credentials/src/credentials/assertions.ts":{"bytes":3821,"imports":[],"format":"esm"},"packages/core/halo/credentials/src/credentials/verifier.ts":{"bytes":8574,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/assertions.ts","kind":"import-statement","original":"./assertions"},{"path":"packages/core/halo/credentials/src/credentials/signing.ts","kind":"import-statement","original":"./signing"}],"format":"esm"},"packages/core/halo/credentials/src/credentials/credential-factory.ts":{"bytes":11553,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/signing.ts","kind":"import-statement","original":"./signing"},{"path":"packages/core/halo/credentials/src/credentials/verifier.ts","kind":"import-statement","original":"./verifier"}],"format":"esm"},"packages/core/halo/credentials/src/credentials/credential-generator.ts":{"bytes":25434,"imports":[{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/credential-factory.ts","kind":"import-statement","original":"./credential-factory"}],"format":"esm"},"packages/core/halo/credentials/src/credentials/index.ts":{"bytes":929,"imports":[{"path":"packages/core/halo/credentials/src/credentials/assertions.ts","kind":"import-statement","original":"./assertions"},{"path":"packages/core/halo/credentials/src/credentials/credential-factory.ts","kind":"import-statement","original":"./credential-factory"},{"path":"packages/core/halo/credentials/src/credentials/credential-generator.ts","kind":"import-statement","original":"./credential-generator"},{"path":"packages/core/halo/credentials/src/credentials/signing.ts","kind":"import-statement","original":"./signing"},{"path":"packages/core/halo/credentials/src/credentials/verifier.ts","kind":"import-statement","original":"./verifier"}],"format":"esm"},"packages/core/halo/credentials/src/presentations/presentation.ts":{"bytes":3718,"imports":[{"path":"packages/core/halo/credentials/src/presentations/signing.ts","kind":"import-statement","original":"./signing"},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/presentations/verifier.ts":{"bytes":10470,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/presentations/signing.ts","kind":"import-statement","original":"./signing"},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/presentations/index.ts":{"bytes":703,"imports":[{"path":"packages/core/halo/credentials/src/presentations/signing.ts","kind":"import-statement","original":"./signing"},{"path":"packages/core/halo/credentials/src/presentations/presentation.ts","kind":"import-statement","original":"./presentation"},{"path":"packages/core/halo/credentials/src/presentations/verifier.ts","kind":"import-statement","original":"./verifier"}],"format":"esm"},"packages/core/halo/credentials/src/state-machine/feed-state-machine.ts":{"bytes":6028,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/state-machine/invitation-state-machine.ts":{"bytes":11718,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/graph/credential-graph.ts":{"bytes":73642,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/halo/credentials/src/state-machine/member-state-machine.ts":{"bytes":21767,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"},{"path":"packages/core/halo/credentials/src/graph/credential-graph.ts","kind":"import-statement","original":"../graph/credential-graph"}],"format":"esm"},"packages/core/halo/credentials/src/state-machine/space-state-machine.ts":{"bytes":36169,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/state-machine/feed-state-machine.ts","kind":"import-statement","original":"./feed-state-machine"},{"path":"packages/core/halo/credentials/src/state-machine/invitation-state-machine.ts","kind":"import-statement","original":"./invitation-state-machine"},{"path":"packages/core/halo/credentials/src/state-machine/member-state-machine.ts","kind":"import-statement","original":"./member-state-machine"},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/state-machine/index.ts":{"bytes":909,"imports":[{"path":"packages/core/halo/credentials/src/state-machine/space-state-machine.ts","kind":"import-statement","original":"./space-state-machine"},{"path":"packages/core/halo/credentials/src/state-machine/feed-state-machine.ts","kind":"import-statement","original":"./feed-state-machine"},{"path":"packages/core/halo/credentials/src/state-machine/member-state-machine.ts","kind":"import-statement","original":"./member-state-machine"},{"path":"packages/core/halo/credentials/src/state-machine/invitation-state-machine.ts","kind":"import-statement","original":"./invitation-state-machine"}],"format":"esm"},"packages/core/halo/credentials/src/processor/credential-processor.ts":{"bytes":735,"imports":[],"format":"esm"},"packages/core/halo/credentials/src/processor/device-state-machine.ts":{"bytes":10657,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/processor/profile-state-machine.ts":{"bytes":5520,"imports":[{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"../credentials"}],"format":"esm"},"packages/core/halo/credentials/src/processor/index.ts":{"bytes":785,"imports":[{"path":"packages/core/halo/credentials/src/processor/credential-processor.ts","kind":"import-statement","original":"./credential-processor"},{"path":"packages/core/halo/credentials/src/processor/device-state-machine.ts","kind":"import-statement","original":"./device-state-machine"},{"path":"packages/core/halo/credentials/src/processor/profile-state-machine.ts","kind":"import-statement","original":"./profile-state-machine"}],"format":"esm"},"packages/core/halo/credentials/src/index.ts":{"bytes":1172,"imports":[{"path":"packages/core/halo/credentials/src/did.ts","kind":"import-statement","original":"./did"},{"path":"packages/core/halo/credentials/src/invitations.ts","kind":"import-statement","original":"./invitations"},{"path":"packages/core/halo/credentials/src/seedphrase.ts","kind":"import-statement","original":"./seedphrase"},{"path":"packages/core/halo/credentials/src/passcode.ts","kind":"import-statement","original":"./passcode"},{"path":"packages/core/halo/credentials/src/presentations/index.ts","kind":"import-statement","original":"./presentations"},{"path":"packages/core/halo/credentials/src/credentials/index.ts","kind":"import-statement","original":"./credentials"},{"path":"packages/core/halo/credentials/src/state-machine/index.ts","kind":"import-statement","original":"./state-machine"},{"path":"packages/core/halo/credentials/src/processor/index.ts","kind":"import-statement","original":"./processor"}],"format":"esm"}},"outputs":{"packages/core/halo/credentials/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":120538},"packages/core/halo/credentials/dist/lib/node-esm/index.mjs":{"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"bip39","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"json-stable-stringify","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["CredentialGenerator","DeviceStateMachine","FeedStateMachine","InvitationStateMachine","MemberStateMachine","ProfileStateMachine","SIGNATURE_TYPE_ED25519","SpaceStateMachine","canonicalStringify","checkCredentialType","createAdmissionCredentials","createCancelDelegatedSpaceInvitationCredential","createCredential","createCredentialMessage","createCredentialSignerWithChain","createCredentialSignerWithKey","createDelegatedSpaceInvitationCredential","createDeviceAuthorization","createDidFromIdentityKey","credentialTypeFilter","defaultSecretProvider","defaultSecretValidator","generatePasscode","generateSeedPhrase","getCredentialAssertion","getCredentialProofPayload","getPresentationProofPayload","isValidAuthorizedDeviceCredential","keyPairFromSeedPhrase","signPresentation","verifyChain","verifyCredential","verifyCredentialSignature","verifyPresentation","verifyPresentationChain","verifyPresentationSignature"],"entryPoint":"packages/core/halo/credentials/src/index.ts","inputs":{"packages/core/halo/credentials/src/did.ts":{"bytesInOutput":656},"packages/core/halo/credentials/src/index.ts":{"bytesInOutput":0},"packages/core/halo/credentials/src/invitations.ts":{"bytesInOutput":126},"packages/core/halo/credentials/src/seedphrase.ts":{"bytesInOutput":560},"packages/core/halo/credentials/src/passcode.ts":{"bytesInOutput":178},"packages/core/halo/credentials/src/credentials/signing.ts":{"bytesInOutput":2052},"packages/core/halo/credentials/src/presentations/signing.ts":{"bytesInOutput":733},"packages/core/halo/credentials/src/presentations/index.ts":{"bytesInOutput":0},"packages/core/halo/credentials/src/credentials/assertions.ts":{"bytesInOutput":648},"packages/core/halo/credentials/src/credentials/index.ts":{"bytesInOutput":0},"packages/core/halo/credentials/src/credentials/credential-factory.ts":{"bytesInOutput":2632},"packages/core/halo/credentials/src/credentials/verifier.ts":{"bytesInOutput":1762},"packages/core/halo/credentials/src/credentials/credential-generator.ts":{"bytesInOutput":5630},"packages/core/halo/credentials/src/presentations/presentation.ts":{"bytesInOutput":578},"packages/core/halo/credentials/src/presentations/verifier.ts":{"bytesInOutput":2306},"packages/core/halo/credentials/src/state-machine/space-state-machine.ts":{"bytesInOutput":8920},"packages/core/halo/credentials/src/state-machine/feed-state-machine.ts":{"bytesInOutput":1561},"packages/core/halo/credentials/src/state-machine/invitation-state-machine.ts":{"bytesInOutput":2764},"packages/core/halo/credentials/src/state-machine/member-state-machine.ts":{"bytesInOutput":5260},"packages/core/halo/credentials/src/graph/credential-graph.ts":{"bytesInOutput":18877},"packages/core/halo/credentials/src/state-machine/index.ts":{"bytesInOutput":0},"packages/core/halo/credentials/src/processor/index.ts":{"bytesInOutput":0},"packages/core/halo/credentials/src/processor/device-state-machine.ts":{"bytesInOutput":2529},"packages/core/halo/credentials/src/processor/profile-state-machine.ts":{"bytesInOutput":1204}},"bytes":61554}}}
@@ -1 +1 @@
1
- {"version":3,"file":"signing.d.ts","sourceRoot":"","sources":["../../../../src/credentials/signing.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAI9E;;GAEG;AAEH,eAAO,MAAM,yBAAyB,eAAgB,UAAU,KAAG,UAelE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAS,GAAG,WA8CvC,CAAC;AAUL;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
1
+ {"version":3,"file":"signing.d.ts","sourceRoot":"","sources":["../../../../src/credentials/signing.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAI9E;;GAEG;AAEH,eAAO,MAAM,yBAAyB,eAAgB,UAAU,KAAG,UAelE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAS,GAAG,KAAG,MA8ChC,CAAC;AAUf;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
@@ -0,0 +1,7 @@
1
+ import { PublicKey, IdentityDid } from '@dxos/keys';
2
+ /**
3
+ * Identity DIDs are generated by creating a keypair, and then taking the first 20 bytes of the SHA-256 hash of the public key and encoding them to multibase RFC4648 base-32 format (prefixed with B, see Multibase Table).
4
+ * Inspired by how ethereum addresses are derived.
5
+ */
6
+ export declare const createDidFromIdentityKey: (identityKey: PublicKey) => Promise<IdentityDid>;
7
+ //# sourceMappingURL=did.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"did.d.ts","sourceRoot":"","sources":["../../../src/did.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAKpD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,gBAAuB,SAAS,KAAG,OAAO,CAAC,WAAW,CAY1F,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from './did';
1
2
  export * from './invitations';
2
3
  export * from './seedphrase';
3
4
  export * from './passcode';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"device-state-machine.d.ts","sourceRoot":"","sources":["../../../../src/processor/device-state-machine.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACtH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE,SAAS,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,qBAAa,kBAAmB,YAAW,mBAAmB;IAQhD,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpC,SAAgB,oBAAoB,+CAAoE;IAExG,SAAgB,gBAAgB,gBAAiB;IAE1C,qBAAqB,CAAC,EAAE,KAAK,CAAC;gBAER,OAAO,EAAE,wBAAwB;IAExD,iBAAiB,CAAC,UAAU,EAAE,UAAU;CA6C/C"}
1
+ {"version":3,"file":"device-state-machine.d.ts","sourceRoot":"","sources":["../../../../src/processor/device-state-machine.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACtH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE,SAAS,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,qBAAa,kBAAmB,YAAW,mBAAmB;IAQhD,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpC,SAAgB,oBAAoB,+CAAoE;IAExG,SAAgB,gBAAgB,gBAAiB;IAE1C,qBAAqB,CAAC,EAAE,KAAK,CAAC;gBAER,OAAO,EAAE,wBAAwB;IAExD,iBAAiB,CAAC,UAAU,EAAE,UAAU;CA8C/C"}
@@ -64,12 +64,10 @@ export declare class SpaceStateMachine implements SpaceState {
64
64
  /**
65
65
  * @param credential Message to process.
66
66
  * @param fromFeed Key of the feed where this credential is recorded.
67
- * @synchronized
68
67
  */
69
68
  process(credential: Credential, { sourceFeed, skipVerification }: ProcessOptions): Promise<boolean>;
70
69
  getMemberRole(memberKey: PublicKey): SpaceMember.Role;
71
70
  hasMembershipManagementPermission(memberKey: PublicKey): boolean;
72
71
  private _canInviteNewMembers;
73
- private _canAdmitFeeds;
74
72
  }
75
73
  //# sourceMappingURL=space-state-machine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"space-state-machine.d.ts","sourceRoot":"","sources":["../../../../src/state-machine/space-state-machine.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE,MAAM,6CAA6C,C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os/credentials",
3
- "version": "0.7.5-main.9d2a38b",
3
+ "version": "0.7.5-main.e94eead",
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",
@@ -8,6 +8,7 @@
8
8
  "license": "MIT",
9
9
  "author": "info@dxos.org",
10
10
  "sideEffects": true,
11
+ "type": "module",
11
12
  "exports": {
12
13
  ".": {
13
14
  "types": "./dist/types/src/index.d.ts",
@@ -22,17 +23,17 @@
22
23
  "dependencies": {
23
24
  "bip39": "^3.1.0",
24
25
  "json-stable-stringify": "^1.0.1",
25
- "@dxos/async": "0.7.5-main.9d2a38b",
26
- "@dxos/context": "0.7.5-main.9d2a38b",
27
- "@dxos/crypto": "0.7.5-main.9d2a38b",
28
- "@dxos/invariant": "0.7.5-main.9d2a38b",
29
- "@dxos/keys": "0.7.5-main.9d2a38b",
30
- "@dxos/keyring": "0.7.5-main.9d2a38b",
31
- "@dxos/node-std": "0.7.5-main.9d2a38b",
32
- "@dxos/log": "0.7.5-main.9d2a38b",
33
- "@dxos/protocols": "0.7.5-main.9d2a38b",
34
- "@dxos/timeframe": "0.7.5-main.9d2a38b",
35
- "@dxos/util": "0.7.5-main.9d2a38b"
26
+ "@dxos/async": "0.7.5-main.e94eead",
27
+ "@dxos/crypto": "0.7.5-main.e94eead",
28
+ "@dxos/keyring": "0.7.5-main.e94eead",
29
+ "@dxos/context": "0.7.5-main.e94eead",
30
+ "@dxos/invariant": "0.7.5-main.e94eead",
31
+ "@dxos/log": "0.7.5-main.e94eead",
32
+ "@dxos/keys": "0.7.5-main.e94eead",
33
+ "@dxos/node-std": "0.7.5-main.e94eead",
34
+ "@dxos/protocols": "0.7.5-main.e94eead",
35
+ "@dxos/timeframe": "0.7.5-main.e94eead",
36
+ "@dxos/util": "0.7.5-main.e94eead"
36
37
  },
37
38
  "devDependencies": {
38
39
  "@types/json-stable-stringify": "^1.0.32"
package/project.json CHANGED
@@ -17,6 +17,7 @@
17
17
  }
18
18
  },
19
19
  "lint": {},
20
+ "pack": {},
20
21
  "test": {}
21
22
  },
22
23
  "implicitDependencies": [
@@ -33,7 +33,7 @@ export const getCredentialProofPayload = (credential: Credential): Uint8Array =>
33
33
  /**
34
34
  * Utility method to produce stable output for signing/verifying.
35
35
  */
36
- export const canonicalStringify = (obj: any) =>
36
+ export const canonicalStringify = (obj: any): string =>
37
37
  stableStringify(obj, {
38
38
  /* The point of signing and verifying is not that the internal, private state of the objects be
39
39
  * identical, but that the public contents can be verified not to have been altered. For that reason,
@@ -79,7 +79,7 @@ export const canonicalStringify = (obj: any) =>
79
79
 
80
80
  return value;
81
81
  },
82
- });
82
+ }) as string;
83
83
 
84
84
  /**
85
85
  * Old key truncation method (339d...9d66) to keep backwards compatibility with credentials signed with old method
package/src/did.ts ADDED
@@ -0,0 +1,27 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { subtleCrypto } from '@dxos/crypto';
6
+ import { PublicKey, IdentityDid } from '@dxos/keys';
7
+ import { ComplexMap } from '@dxos/util';
8
+
9
+ const IDENTITY_DIDS_CACHE = new ComplexMap<PublicKey, IdentityDid>(PublicKey.hash);
10
+
11
+ /**
12
+ * Identity DIDs are generated by creating a keypair, and then taking the first 20 bytes of the SHA-256 hash of the public key and encoding them to multibase RFC4648 base-32 format (prefixed with B, see Multibase Table).
13
+ * Inspired by how ethereum addresses are derived.
14
+ */
15
+ export const createDidFromIdentityKey = async (identityKey: PublicKey): Promise<IdentityDid> => {
16
+ const cachedValue = IDENTITY_DIDS_CACHE.get(identityKey);
17
+ if (cachedValue !== undefined) {
18
+ return cachedValue;
19
+ }
20
+
21
+ const digest = await subtleCrypto.digest('SHA-256', identityKey.asUint8Array());
22
+
23
+ const bytes = new Uint8Array(digest).slice(0, IdentityDid.byteLength);
24
+ const identityDid = IdentityDid.encode(bytes);
25
+ IDENTITY_DIDS_CACHE.set(identityKey, identityDid);
26
+ return identityDid;
27
+ };
package/src/index.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  // Copyright 2019 DXOS.org
3
3
  //
4
4
 
5
+ export * from './did';
5
6
  export * from './invitations';
6
7
  export * from './seedphrase';
7
8
  export * from './passcode';
@@ -48,9 +48,10 @@ export class DeviceStateMachine implements CredentialProcessor {
48
48
 
49
49
  switch (assertion['@type']) {
50
50
  case 'dxos.halo.credentials.AuthorizedDevice': {
51
- invariant(!this.authorizedDeviceKeys.has(assertion.deviceKey), 'Device already added.');
52
- // TODO(dmaretskyi): Extra validation for the credential?
53
- this.authorizedDeviceKeys.set(assertion.deviceKey, {});
51
+ // We don't need to validate that the device is already added since the credentials are considered idempotent.
52
+ // In the future, when we will have device-specific attributes, we should join them from all concurrent credentials.
53
+ this.authorizedDeviceKeys.set(assertion.deviceKey, this.authorizedDeviceKeys.get(assertion.deviceKey) ?? {});
54
+
54
55
  log('added device', {
55
56
  localDeviceKey: this._params.deviceKey,
56
57
  deviceKey: assertion.deviceKey,
@@ -2,7 +2,7 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
- import { runInContextAsync } from '@dxos/async';
5
+ import { runInContextAsync, synchronized } from '@dxos/async';
6
6
  import { Context } from '@dxos/context';
7
7
  import { PublicKey } from '@dxos/keys';
8
8
  import { log } from '@dxos/log';
@@ -140,11 +140,14 @@ export class SpaceStateMachine implements SpaceState {
140
140
  /**
141
141
  * @param credential Message to process.
142
142
  * @param fromFeed Key of the feed where this credential is recorded.
143
- * @synchronized
144
143
  */
144
+ @synchronized
145
145
  async process(credential: Credential, { sourceFeed, skipVerification }: ProcessOptions): Promise<boolean> {
146
- if (credential.id && this._processedCredentials.has(credential.id)) {
147
- return true;
146
+ if (credential.id) {
147
+ if (this._processedCredentials.has(credential.id)) {
148
+ return true;
149
+ }
150
+ this._processedCredentials.add(credential.id);
148
151
  }
149
152
 
150
153
  if (!skipVerification) {
@@ -208,15 +211,8 @@ export class SpaceStateMachine implements SpaceState {
208
211
  log.warn('Space must have a genesis credential before admitting feeds.');
209
212
  return false;
210
213
  }
211
- if (!this._canAdmitFeeds(credential.issuer)) {
212
- log.warn(`Space member is not authorized to admit feeds: ${credential.issuer}`, {
213
- sourceFeed: sourceFeed.toHex(),
214
- feed: credential.subject.id.toHex(),
215
- });
216
- return false;
217
- }
218
214
 
219
- // TODO(dmaretskyi): Check that the feed owner is a member of the space.
215
+ // We don't do any validation on feed admission since we would perform the same validation on the credentials inside .
220
216
  await this._feeds.process(credential, sourceFeed);
221
217
  break;
222
218
  }
@@ -246,10 +242,6 @@ export class SpaceStateMachine implements SpaceState {
246
242
  }
247
243
 
248
244
  await this.onCredentialProcessed.callIfSet(credential);
249
- // Mark as processed only after all processors have processed the credential.
250
- if (credential.id) {
251
- this._processedCredentials.add(credential.id);
252
- }
253
245
  return true;
254
246
  }
255
247
 
@@ -268,11 +260,6 @@ export class SpaceStateMachine implements SpaceState {
268
260
  this._members.getRole(key) === SpaceMember.Role.OWNER
269
261
  );
270
262
  }
271
-
272
- private _canAdmitFeeds(key: PublicKey): boolean {
273
- const role = this._members.getRole(key);
274
- return role === SpaceMember.Role.EDITOR || role === SpaceMember.Role.ADMIN || role === SpaceMember.Role.OWNER;
275
- }
276
263
  }
277
264
 
278
265
  // TODO(dmaretskyi): Simplify.
package/tsconfig.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "extends": "../../../../tsconfig.base.json",
3
3
  "compilerOptions": {
4
- "outDir": "./dist/types",
5
4
  "types": [
6
5
  "node"
7
6
  ]
File without changes