@dxos/protocols 0.1.0
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/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/src/codec.test.d.ts +2 -0
- package/dist/src/codec.test.d.ts.map +1 -0
- package/dist/src/codec.test.js +21 -0
- package/dist/src/codec.test.js.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +23 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/proto/gen/dxos/bot.d.ts +268 -0
- package/dist/src/proto/gen/dxos/bot.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/bot.js +19 -0
- package/dist/src/proto/gen/dxos/bot.js.map +1 -0
- package/dist/src/proto/gen/dxos/client.d.ts +388 -0
- package/dist/src/proto/gen/dxos/client.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/client.js +15 -0
- package/dist/src/proto/gen/dxos/client.js.map +1 -0
- package/dist/src/proto/gen/dxos/config.d.ts +849 -0
- package/dist/src/proto/gen/dxos/config.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/config.js +39 -0
- package/dist/src/proto/gen/dxos/config.js.map +1 -0
- package/dist/src/proto/gen/dxos/devtools/host.d.ts +387 -0
- package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/devtools/host.js +3 -0
- package/dist/src/proto/gen/dxos/devtools/host.js.map +1 -0
- package/dist/src/proto/gen/dxos/devtools/swarmLog.d.ts +50 -0
- package/dist/src/proto/gen/dxos/devtools/swarmLog.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/devtools/swarmLog.js +3 -0
- package/dist/src/proto/gen/dxos/devtools/swarmLog.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/feed.d.ts +112 -0
- package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/feed.js +17 -0
- package/dist/src/proto/gen/dxos/echo/feed.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts +64 -0
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/metadata.js +3 -0
- package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts +10 -0
- package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/messenger.js +3 -0
- package/dist/src/proto/gen/dxos/echo/model/messenger.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/object.d.ts +141 -0
- package/dist/src/proto/gen/dxos/echo/model/object.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/object.js +40 -0
- package/dist/src/proto/gen/dxos/echo/model/object.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/text.d.ts +16 -0
- package/dist/src/proto/gen/dxos/echo/model/text.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/text.js +3 -0
- package/dist/src/proto/gen/dxos/echo/model/text.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/service.d.ts +83 -0
- package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/service.js +3 -0
- package/dist/src/proto/gen/dxos/echo/service.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +133 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.js +3 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts +20 -0
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/timeframe.js +3 -0
- package/dist/src/proto/gen/dxos/echo/timeframe.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts +36 -0
- package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/auth.js +3 -0
- package/dist/src/proto/gen/dxos/halo/credentials/auth.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts +70 -0
- package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/greet.js +19 -0
- package/dist/src/proto/gen/dxos/halo/credentials/greet.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts +18 -0
- package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/identity.js +3 -0
- package/dist/src/proto/gen/dxos/halo/credentials/identity.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/party.d.ts +82 -0
- package/dist/src/proto/gen/dxos/halo/credentials/party.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/party.js +19 -0
- package/dist/src/proto/gen/dxos/halo/credentials/party.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials.d.ts +272 -0
- package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials.js +31 -0
- package/dist/src/proto/gen/dxos/halo/credentials.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/invitations.d.ts +117 -0
- package/dist/src/proto/gen/dxos/halo/invitations.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/invitations.js +16 -0
- package/dist/src/proto/gen/dxos/halo/invitations.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keyring.d.ts +9 -0
- package/dist/src/proto/gen/dxos/halo/keyring.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keyring.js +3 -0
- package/dist/src/proto/gen/dxos/halo/keyring.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keys.d.ts +88 -0
- package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keys.js +17 -0
- package/dist/src/proto/gen/dxos/halo/keys.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/signed.d.ts +64 -0
- package/dist/src/proto/gen/dxos/halo/signed.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/signed.js +3 -0
- package/dist/src/proto/gen/dxos/halo/signed.js.map +1 -0
- package/dist/src/proto/gen/dxos/iframe.d.ts +27 -0
- package/dist/src/proto/gen/dxos/iframe.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/iframe.js +3 -0
- package/dist/src/proto/gen/dxos/iframe.js.map +1 -0
- package/dist/src/proto/gen/dxos/keys.d.ts +15 -0
- package/dist/src/proto/gen/dxos/keys.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/keys.js +3 -0
- package/dist/src/proto/gen/dxos/keys.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/bridge.d.ts +92 -0
- package/dist/src/proto/gen/dxos/mesh/bridge.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/bridge.js +15 -0
- package/dist/src/proto/gen/dxos/mesh/bridge.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts +15 -0
- package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/broadcast.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/broadcast.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/messaging.d.ts +26 -0
- package/dist/src/proto/gen/dxos/mesh/messaging.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/messaging.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/messaging.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/presence.d.ts +28 -0
- package/dist/src/proto/gen/dxos/mesh/presence.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/presence.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/presence.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/protocol.d.ts +27 -0
- package/dist/src/proto/gen/dxos/mesh/protocol.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/protocol.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/protocol.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/replicator.d.ts +26 -0
- package/dist/src/proto/gen/dxos/mesh/replicator.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/replicator.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/replicator.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/signal.d.ts +99 -0
- package/dist/src/proto/gen/dxos/mesh/signal.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/signal.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/signal.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/swarm.d.ts +60 -0
- package/dist/src/proto/gen/dxos/mesh/swarm.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/swarm.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/swarm.js.map +1 -0
- package/dist/src/proto/gen/dxos/registry.d.ts +82 -0
- package/dist/src/proto/gen/dxos/registry.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/registry.js +3 -0
- package/dist/src/proto/gen/dxos/registry.js.map +1 -0
- package/dist/src/proto/gen/dxos/rpc.d.ts +94 -0
- package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/rpc.js +16 -0
- package/dist/src/proto/gen/dxos/rpc.js.map +1 -0
- package/dist/src/proto/gen/dxos/service/publisher.d.ts +39 -0
- package/dist/src/proto/gen/dxos/service/publisher.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/service/publisher.js +3 -0
- package/dist/src/proto/gen/dxos/service/publisher.js.map +1 -0
- package/dist/src/proto/gen/dxos/service/scheduler.d.ts +300 -0
- package/dist/src/proto/gen/dxos/service/scheduler.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/service/scheduler.js +16 -0
- package/dist/src/proto/gen/dxos/service/scheduler.js.map +1 -0
- package/dist/src/proto/gen/dxos/type.d.ts +167 -0
- package/dist/src/proto/gen/dxos/type.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/type.js +3 -0
- package/dist/src/proto/gen/dxos/type.js.map +1 -0
- package/dist/src/proto/gen/example/testing/data.d.ts +23 -0
- package/dist/src/proto/gen/example/testing/data.d.ts.map +1 -0
- package/dist/src/proto/gen/example/testing/data.js +3 -0
- package/dist/src/proto/gen/example/testing/data.js.map +1 -0
- package/dist/src/proto/gen/example/testing/rpc.d.ts +67 -0
- package/dist/src/proto/gen/example/testing/rpc.d.ts.map +1 -0
- package/dist/src/proto/gen/example/testing/rpc.js +3 -0
- package/dist/src/proto/gen/example/testing/rpc.js.map +1 -0
- package/dist/src/proto/gen/google/protobuf.d.ts +38 -0
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -0
- package/dist/src/proto/gen/google/protobuf.js +3 -0
- package/dist/src/proto/gen/google/protobuf.js.map +1 -0
- package/dist/src/proto/gen/index.d.ts +385 -0
- package/dist/src/proto/gen/index.d.ts.map +1 -0
- package/dist/src/proto/gen/index.js +11 -0
- package/dist/src/proto/gen/index.js.map +1 -0
- package/dist/src/proto/index.d.ts +2 -0
- package/dist/src/proto/index.d.ts.map +1 -0
- package/dist/src/proto/index.js +10 -0
- package/dist/src/proto/index.js.map +1 -0
- package/dist/src/proto/substitutions.d.ts +60 -0
- package/dist/src/proto/substitutions.d.ts.map +1 -0
- package/dist/src/proto/substitutions.js +37 -0
- package/dist/src/proto/substitutions.js.map +1 -0
- package/dist/src/testing.d.ts +5 -0
- package/dist/src/testing.d.ts.map +1 -0
- package/dist/src/testing.js +22 -0
- package/dist/src/testing.js.map +1 -0
- package/dist/src/types.d.ts +33 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +6 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +40 -0
- package/proto/README.md +7 -0
- package/proto/dxos/bot.d.ts +2 -0
- package/proto/dxos/bot.d.ts.map +10 -0
- package/proto/dxos/bot.js +2 -0
- package/proto/dxos/client.d.ts +2 -0
- package/proto/dxos/client.d.ts.map +10 -0
- package/proto/dxos/client.js +2 -0
- package/proto/dxos/config.d.ts +2 -0
- package/proto/dxos/config.d.ts.map +10 -0
- package/proto/dxos/config.js +2 -0
- package/proto/dxos/devtools/host.d.ts +2 -0
- package/proto/dxos/devtools/host.d.ts.map +10 -0
- package/proto/dxos/devtools/host.js +2 -0
- package/proto/dxos/devtools/swarmLog.d.ts +2 -0
- package/proto/dxos/devtools/swarmLog.d.ts.map +10 -0
- package/proto/dxos/devtools/swarmLog.js +2 -0
- package/proto/dxos/echo/feed.d.ts +2 -0
- package/proto/dxos/echo/feed.d.ts.map +10 -0
- package/proto/dxos/echo/feed.js +2 -0
- package/proto/dxos/echo/metadata.d.ts +2 -0
- package/proto/dxos/echo/metadata.d.ts.map +10 -0
- package/proto/dxos/echo/metadata.js +2 -0
- package/proto/dxos/echo/model/messenger.d.ts +2 -0
- package/proto/dxos/echo/model/messenger.d.ts.map +10 -0
- package/proto/dxos/echo/model/messenger.js +2 -0
- package/proto/dxos/echo/model/object.d.ts +2 -0
- package/proto/dxos/echo/model/object.d.ts.map +10 -0
- package/proto/dxos/echo/model/object.js +2 -0
- package/proto/dxos/echo/model/text.d.ts +2 -0
- package/proto/dxos/echo/model/text.d.ts.map +10 -0
- package/proto/dxos/echo/model/text.js +2 -0
- package/proto/dxos/echo/service.d.ts +2 -0
- package/proto/dxos/echo/service.d.ts.map +10 -0
- package/proto/dxos/echo/service.js +2 -0
- package/proto/dxos/echo/snapshot.d.ts +2 -0
- package/proto/dxos/echo/snapshot.d.ts.map +10 -0
- package/proto/dxos/echo/snapshot.js +2 -0
- package/proto/dxos/echo/timeframe.d.ts +2 -0
- package/proto/dxos/echo/timeframe.d.ts.map +10 -0
- package/proto/dxos/echo/timeframe.js +2 -0
- package/proto/dxos/google.d.ts +2 -0
- package/proto/dxos/google.d.ts.map +10 -0
- package/proto/dxos/google.js +2 -0
- package/proto/dxos/halo/credentials/auth.d.ts +2 -0
- package/proto/dxos/halo/credentials/auth.d.ts.map +10 -0
- package/proto/dxos/halo/credentials/auth.js +2 -0
- package/proto/dxos/halo/credentials/greet.d.ts +2 -0
- package/proto/dxos/halo/credentials/greet.d.ts.map +10 -0
- package/proto/dxos/halo/credentials/greet.js +2 -0
- package/proto/dxos/halo/credentials/identity.d.ts +2 -0
- package/proto/dxos/halo/credentials/identity.d.ts.map +10 -0
- package/proto/dxos/halo/credentials/identity.js +2 -0
- package/proto/dxos/halo/credentials/party.d.ts +2 -0
- package/proto/dxos/halo/credentials/party.d.ts.map +10 -0
- package/proto/dxos/halo/credentials/party.js +2 -0
- package/proto/dxos/halo/credentials.d.ts +2 -0
- package/proto/dxos/halo/credentials.d.ts.map +10 -0
- package/proto/dxos/halo/credentials.js +2 -0
- package/proto/dxos/halo/invitations.d.ts +2 -0
- package/proto/dxos/halo/invitations.d.ts.map +10 -0
- package/proto/dxos/halo/invitations.js +2 -0
- package/proto/dxos/halo/keyring.d.ts +2 -0
- package/proto/dxos/halo/keyring.d.ts.map +10 -0
- package/proto/dxos/halo/keyring.js +2 -0
- package/proto/dxos/halo/keys.d.ts +2 -0
- package/proto/dxos/halo/keys.d.ts.map +10 -0
- package/proto/dxos/halo/keys.js +2 -0
- package/proto/dxos/halo/signed.d.ts +2 -0
- package/proto/dxos/halo/signed.d.ts.map +10 -0
- package/proto/dxos/halo/signed.js +2 -0
- package/proto/dxos/iframe.d.ts +2 -0
- package/proto/dxos/iframe.d.ts.map +10 -0
- package/proto/dxos/iframe.js +2 -0
- package/proto/dxos/keys.d.ts +2 -0
- package/proto/dxos/keys.d.ts.map +10 -0
- package/proto/dxos/keys.js +2 -0
- package/proto/dxos/mesh/bridge.d.ts +2 -0
- package/proto/dxos/mesh/bridge.d.ts.map +10 -0
- package/proto/dxos/mesh/bridge.js +2 -0
- package/proto/dxos/mesh/broadcast.d.ts +2 -0
- package/proto/dxos/mesh/broadcast.d.ts.map +10 -0
- package/proto/dxos/mesh/broadcast.js +2 -0
- package/proto/dxos/mesh/messaging.d.ts +2 -0
- package/proto/dxos/mesh/messaging.d.ts.map +10 -0
- package/proto/dxos/mesh/messaging.js +2 -0
- package/proto/dxos/mesh/presence.d.ts +2 -0
- package/proto/dxos/mesh/presence.d.ts.map +10 -0
- package/proto/dxos/mesh/presence.js +2 -0
- package/proto/dxos/mesh/protocol.d.ts +2 -0
- package/proto/dxos/mesh/protocol.d.ts.map +10 -0
- package/proto/dxos/mesh/protocol.js +2 -0
- package/proto/dxos/mesh/replicator.d.ts +2 -0
- package/proto/dxos/mesh/replicator.d.ts.map +10 -0
- package/proto/dxos/mesh/replicator.js +2 -0
- package/proto/dxos/mesh/signal.d.ts +2 -0
- package/proto/dxos/mesh/signal.d.ts.map +10 -0
- package/proto/dxos/mesh/signal.js +2 -0
- package/proto/dxos/mesh/swarm.d.ts +2 -0
- package/proto/dxos/mesh/swarm.d.ts.map +10 -0
- package/proto/dxos/mesh/swarm.js +2 -0
- package/proto/dxos/registry.d.ts +2 -0
- package/proto/dxos/registry.d.ts.map +10 -0
- package/proto/dxos/registry.js +2 -0
- package/proto/dxos/rpc.d.ts +2 -0
- package/proto/dxos/rpc.d.ts.map +10 -0
- package/proto/dxos/rpc.js +2 -0
- package/proto/dxos/service/publisher.d.ts +2 -0
- package/proto/dxos/service/publisher.d.ts.map +10 -0
- package/proto/dxos/service/publisher.js +2 -0
- package/proto/dxos/service/scheduler.d.ts +2 -0
- package/proto/dxos/service/scheduler.d.ts.map +10 -0
- package/proto/dxos/service/scheduler.js +2 -0
- package/proto/dxos/type.d.ts +2 -0
- package/proto/dxos/type.d.ts.map +10 -0
- package/proto/dxos/type.js +2 -0
- package/proto/example/testing/data.d.ts +2 -0
- package/proto/example/testing/data.d.ts.map +10 -0
- package/proto/example/testing/data.js +2 -0
- package/proto/example/testing/rpc.d.ts +2 -0
- package/proto/example/testing/rpc.d.ts.map +10 -0
- package/proto/example/testing/rpc.js +2 -0
- package/src/codec.test.ts +24 -0
- package/src/index.ts +7 -0
- package/src/proto/dxos/bot.proto +151 -0
- package/src/proto/dxos/client.proto +254 -0
- package/src/proto/dxos/config.proto +305 -0
- package/src/proto/dxos/devtools/host.proto +294 -0
- package/src/proto/dxos/devtools/swarmLog.proto +32 -0
- package/src/proto/dxos/echo/feed.proto +83 -0
- package/src/proto/dxos/echo/metadata.proto +51 -0
- package/src/proto/dxos/echo/model/messenger.proto +13 -0
- package/src/proto/dxos/echo/model/object.proto +123 -0
- package/src/proto/dxos/echo/model/text.proto +16 -0
- package/src/proto/dxos/echo/service.proto +63 -0
- package/src/proto/dxos/echo/snapshot.proto +98 -0
- package/src/proto/dxos/echo/timeframe.proto +21 -0
- package/src/proto/dxos/google.proto +7 -0
- package/src/proto/dxos/halo/credentials/auth.proto +31 -0
- package/src/proto/dxos/halo/credentials/greet.proto +125 -0
- package/src/proto/dxos/halo/credentials/identity.proto +21 -0
- package/src/proto/dxos/halo/credentials/party.proto +127 -0
- package/src/proto/dxos/halo/credentials.proto +232 -0
- package/src/proto/dxos/halo/invitations.proto +90 -0
- package/src/proto/dxos/halo/keyring.proto +13 -0
- package/src/proto/dxos/halo/keys.proto +83 -0
- package/src/proto/dxos/halo/signed.proto +51 -0
- package/src/proto/dxos/iframe.proto +24 -0
- package/src/proto/dxos/keys.proto +15 -0
- package/src/proto/dxos/mesh/bridge.proto +76 -0
- package/src/proto/dxos/mesh/broadcast.proto +21 -0
- package/src/proto/dxos/mesh/messaging.proto +24 -0
- package/src/proto/dxos/mesh/presence.proto +22 -0
- package/src/proto/dxos/mesh/protocol.proto +28 -0
- package/src/proto/dxos/mesh/replicator.proto +19 -0
- package/src/proto/dxos/mesh/signal.proto +79 -0
- package/src/proto/dxos/mesh/swarm.proto +41 -0
- package/src/proto/dxos/registry.proto +60 -0
- package/src/proto/dxos/rpc.proto +73 -0
- package/src/proto/dxos/service/publisher.proto +35 -0
- package/src/proto/dxos/service/scheduler.proto +171 -0
- package/src/proto/dxos/type.proto +166 -0
- package/src/proto/example/testing/data.proto +20 -0
- package/src/proto/example/testing/rpc.proto +47 -0
- package/src/proto/gen/dxos/bot.ts +303 -0
- package/src/proto/gen/dxos/client.ts +422 -0
- package/src/proto/gen/dxos/config.ts +888 -0
- package/src/proto/gen/dxos/devtools/host.ts +419 -0
- package/src/proto/gen/dxos/devtools/swarmLog.ts +89 -0
- package/src/proto/gen/dxos/echo/feed.ts +149 -0
- package/src/proto/gen/dxos/echo/metadata.ts +102 -0
- package/src/proto/gen/dxos/echo/model/messenger.ts +50 -0
- package/src/proto/gen/dxos/echo/model/object.ts +181 -0
- package/src/proto/gen/dxos/echo/model/text.ts +56 -0
- package/src/proto/gen/dxos/echo/service.ts +119 -0
- package/src/proto/gen/dxos/echo/snapshot.ts +171 -0
- package/src/proto/gen/dxos/echo/timeframe.ts +60 -0
- package/src/proto/gen/dxos/halo/credentials/auth.ts +75 -0
- package/src/proto/gen/dxos/halo/credentials/greet.ts +108 -0
- package/src/proto/gen/dxos/halo/credentials/identity.ts +57 -0
- package/src/proto/gen/dxos/halo/credentials/party.ts +119 -0
- package/src/proto/gen/dxos/halo/credentials.ts +311 -0
- package/src/proto/gen/dxos/halo/invitations.ts +156 -0
- package/src/proto/gen/dxos/halo/keyring.ts +49 -0
- package/src/proto/gen/dxos/halo/keys.ts +126 -0
- package/src/proto/gen/dxos/halo/signed.ts +102 -0
- package/src/proto/gen/dxos/iframe.ts +67 -0
- package/src/proto/gen/dxos/keys.ts +55 -0
- package/src/proto/gen/dxos/mesh/bridge.ts +129 -0
- package/src/proto/gen/dxos/mesh/broadcast.ts +55 -0
- package/src/proto/gen/dxos/mesh/messaging.ts +65 -0
- package/src/proto/gen/dxos/mesh/presence.ts +68 -0
- package/src/proto/gen/dxos/mesh/protocol.ts +66 -0
- package/src/proto/gen/dxos/mesh/replicator.ts +65 -0
- package/src/proto/gen/dxos/mesh/signal.ts +137 -0
- package/src/proto/gen/dxos/mesh/swarm.ts +99 -0
- package/src/proto/gen/dxos/registry.ts +121 -0
- package/src/proto/gen/dxos/rpc.ts +133 -0
- package/src/proto/gen/dxos/service/publisher.ts +78 -0
- package/src/proto/gen/dxos/service/scheduler.ts +337 -0
- package/src/proto/gen/dxos/type.ts +206 -0
- package/src/proto/gen/example/testing/data.ts +63 -0
- package/src/proto/gen/example/testing/rpc.ts +105 -0
- package/src/proto/gen/google/protobuf.ts +78 -0
- package/src/proto/gen/index.ts +385 -0
- package/src/proto/index.ts +5 -0
- package/src/proto/substitutions.ts +39 -0
- package/src/testing.ts +28 -0
- package/src/types.ts +51 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2020 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "dxos/echo/timeframe.proto";
|
|
8
|
+
import "dxos/halo/signed.proto";
|
|
9
|
+
import "dxos/keys.proto";
|
|
10
|
+
|
|
11
|
+
package dxos.echo.snapshot;
|
|
12
|
+
|
|
13
|
+
//
|
|
14
|
+
// Snapshots define full party state at a given point in time.
|
|
15
|
+
// They must have enough information to be able to recover the party state without reading the feed messages.
|
|
16
|
+
//
|
|
17
|
+
// Each snapshot is identified by a party key and a timeframe.
|
|
18
|
+
// The timeframe defines the set of feed messages that have already been processed.
|
|
19
|
+
// When loading from the snapshot, application would skip all of the feed messages up to (and including) the provided timeframe.
|
|
20
|
+
//
|
|
21
|
+
|
|
22
|
+
message PartySnapshot {
|
|
23
|
+
bytes party_key = 1;
|
|
24
|
+
optional timeframe.TimeframeVector timeframe = 2;
|
|
25
|
+
|
|
26
|
+
// Unix timestamp of the snapshot creation time. For information purposes only.
|
|
27
|
+
// TODO(dmaretskyi): Convert to google.protobuf.Timestamp.
|
|
28
|
+
optional int32 timestamp = 3;
|
|
29
|
+
|
|
30
|
+
HaloStateSnapshot halo = 11;
|
|
31
|
+
// TODO(dmaretskyi): Rename to EchoSnapshot.
|
|
32
|
+
DatabaseSnapshot database = 12;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// TODO(dmaretskyi): Rename to HaloSnapshot.
|
|
36
|
+
// For now we just store and replay a list of all halo messages as thier number is expected to be relatively low.
|
|
37
|
+
message HaloStateSnapshot {
|
|
38
|
+
repeated dxos.halo.signed.Message messages = 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//
|
|
42
|
+
// Database Snapshot
|
|
43
|
+
//
|
|
44
|
+
|
|
45
|
+
message DatabaseSnapshot {
|
|
46
|
+
repeated ItemSnapshot items = 1;
|
|
47
|
+
repeated LinkSnapshot links = 2;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message ItemSnapshot {
|
|
51
|
+
optional string item_id = 1;
|
|
52
|
+
optional string item_type = 2;
|
|
53
|
+
string model_type = 3;
|
|
54
|
+
optional string model_version = 4;
|
|
55
|
+
optional string parent_id = 5;
|
|
56
|
+
optional ModelSnapshot model = 6;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message LinkSnapshot {
|
|
60
|
+
optional string link_id = 1;
|
|
61
|
+
optional string link_type = 2;
|
|
62
|
+
string model_type = 3;
|
|
63
|
+
optional string model_version = 4;
|
|
64
|
+
string source = 5;
|
|
65
|
+
string target = 6;
|
|
66
|
+
optional ModelSnapshot model = 7;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Represents the reified state of a state machine.
|
|
71
|
+
* The snapshots make consist of a custom snapshot object and/or a list of mutations
|
|
72
|
+
* that are applied to the snapshot or the initial state.
|
|
73
|
+
*/
|
|
74
|
+
// TODO(burdon): Rename?
|
|
75
|
+
message ModelSnapshot {
|
|
76
|
+
/**
|
|
77
|
+
* Encoded model snapshot (defined by the model's codec).
|
|
78
|
+
* If undefined the state machine will be initialized with it's default state.
|
|
79
|
+
*/
|
|
80
|
+
optional bytes snapshot = 1;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Mutations to be applied on top of the snapshot, or on top of initial state if the snapshot is undefined.
|
|
84
|
+
*/
|
|
85
|
+
repeated ModelMutation mutations = 2;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
message ModelMutation {
|
|
89
|
+
// Encoded model mutation, format is defined by model's codec.
|
|
90
|
+
bytes mutation = 1;
|
|
91
|
+
ModelMutationMeta meta = 2;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message ModelMutationMeta {
|
|
95
|
+
dxos.keys.PublicKey feed_key = 1;
|
|
96
|
+
int32 seq = 2;
|
|
97
|
+
dxos.keys.PublicKey member_key = 3;
|
|
98
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2020 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
package dxos.echo.timeframe;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Vector timestamp used to order messages.
|
|
11
|
+
*/
|
|
12
|
+
message TimeframeVector {
|
|
13
|
+
message Frame {
|
|
14
|
+
// TODO(dmaretskyi): Compress using numeric feed indexes.
|
|
15
|
+
// TODO(burdon): Determine if admit DAG can be ordered. Requires party messages to be ordered (by lexical feed key).
|
|
16
|
+
bytes feed_key = 1;
|
|
17
|
+
int32 seq = 3;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
repeated Frame frames = 1;
|
|
21
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2020 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/any.proto";
|
|
8
|
+
|
|
9
|
+
import "dxos/keys.proto";
|
|
10
|
+
|
|
11
|
+
package dxos.halo.credentials.auth;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The payload for a SignedMessage sent during handshake for replication authentication.
|
|
15
|
+
*/
|
|
16
|
+
message Auth {
|
|
17
|
+
/// The publicKey of the target Party for these credentials.
|
|
18
|
+
dxos.keys.PublicKey party_key = 1;
|
|
19
|
+
|
|
20
|
+
/// The publicKey of the authenticating Device.
|
|
21
|
+
dxos.keys.PublicKey device_key = 2;
|
|
22
|
+
|
|
23
|
+
/// The publicKey of the authenticating Identity.
|
|
24
|
+
dxos.keys.PublicKey identity_key = 3;
|
|
25
|
+
|
|
26
|
+
/// The publicKey of the authenticating Identity.
|
|
27
|
+
optional dxos.keys.PublicKey feed_key = 4;
|
|
28
|
+
|
|
29
|
+
/// FeedAdmit message to the should be written to a control feed in case the `feed_key` is not admitted to the party.
|
|
30
|
+
optional google.protobuf.Any feed_admit = 5;
|
|
31
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2020 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/any.proto";
|
|
8
|
+
|
|
9
|
+
import "dxos/halo/keys.proto";
|
|
10
|
+
import "dxos/keys.proto";
|
|
11
|
+
|
|
12
|
+
package dxos.halo.credentials.greet;
|
|
13
|
+
|
|
14
|
+
//
|
|
15
|
+
// Greeting protocol:
|
|
16
|
+
//
|
|
17
|
+
// Two nodes: Greeter which acts like a "server" and Invitee which acts like a "client".
|
|
18
|
+
// All interactions are request/response with the request always sent by the Invitee and the response always
|
|
19
|
+
// sent by the Invitee.
|
|
20
|
+
//
|
|
21
|
+
// 1) An invitation is generated for the Invitee with a unique ID, known to the Greeter.
|
|
22
|
+
// 2) The Invitee connects to the Greeter over an *open* Topic, using the invitation ID as their peer ID.
|
|
23
|
+
// This is NOT the Topic of the Party they wish to join, it is one used for Greeting.
|
|
24
|
+
// 3) The Invitee sends a Command message of type BEGIN. This signals the arrival of the invitee, and if necessary,
|
|
25
|
+
// triggers creation or retrieval of an auth secret for the rest of the process. This secret is normally
|
|
26
|
+
// communicated out-of-band (eg, voice, IM, etc.). The Greeter responds with a BeginResponse message, acknowledging
|
|
27
|
+
// the request and indicating the Invitee should proceed to the next step:
|
|
28
|
+
// 4) The Invitee sends a Command message of type HANDSHAKE which includes their secret (eg, PIN, AuthMessage).
|
|
29
|
+
// 5) The Greeter validates the contents (it's genuine, hasn't already been redeemed, the secret matches, etc.)
|
|
30
|
+
// 6) The Greeter returns a HandshakeResponse message with the Party public key and challenge nonce.
|
|
31
|
+
// 7) The Invitee generates one or more AdmitKey and AdmitFeed messages, including the nonce from step (5) then signs
|
|
32
|
+
// the contents in a SignedMessage.
|
|
33
|
+
// 8) The Invitee sends the SignedMessages in a Command message of type NOTARIZE.
|
|
34
|
+
// 9) The Greeter checks credentials presented and validates the SignedMessage signatures and nonce values.
|
|
35
|
+
// If all the checks pass then the Admit messages may be published on the Greeter's feed for the target Party,
|
|
36
|
+
// placed in Envelope messages signed by the Greeter.
|
|
37
|
+
// 10) After writing the messages, the Greeter marks the invitation as having been redeemed, so that it cannot be
|
|
38
|
+
// used again.
|
|
39
|
+
// 11) The Greeter sends copies of the Greeter-signed Envelope messages to the Invitee in a NotarizeResponse message,
|
|
40
|
+
// as well as a list of "hints" regarding keys and feeds which are enrolled in the Party. The Invitee uses thes
|
|
41
|
+
// "hints" to construct its initial view of Party membership, necessary to participate in mutual authentication
|
|
42
|
+
// for Party feed replication.
|
|
43
|
+
// 12) The Invitee sends the Greeter a FINISH command to acknowledge receipt.
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A Greeter command.
|
|
47
|
+
*/
|
|
48
|
+
message Command {
|
|
49
|
+
enum Type {
|
|
50
|
+
BEGIN = 0;
|
|
51
|
+
HANDSHAKE = 1;
|
|
52
|
+
NOTARIZE = 2;
|
|
53
|
+
FINISH = 3;
|
|
54
|
+
CLAIM = 10;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
Type command = 1;
|
|
58
|
+
|
|
59
|
+
// Auth secret (PIN, hash, AuthMessage, etc.).
|
|
60
|
+
optional bytes secret = 2;
|
|
61
|
+
|
|
62
|
+
// TODO(burdon): These seem to be signed messages? In which case we already know the type.
|
|
63
|
+
// TODO(dboreham): static typing of contained messages is not yet supported, change from any when it is.
|
|
64
|
+
// Parameters to the command.
|
|
65
|
+
repeated google.protobuf.Any params = 10;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
//
|
|
69
|
+
// Info is optional, and not needed for very simple schemes like using a PIN, but more complicated scenarios schemes
|
|
70
|
+
// might need to communicate additional info in the response (eg, what key is expected for a signed AuthMessage).
|
|
71
|
+
//
|
|
72
|
+
message BeginResponse {
|
|
73
|
+
map<string, google.protobuf.Any> info = 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
//
|
|
77
|
+
// The next command is 'HANDSHAKE', the invitee sends the `secret` for authentication, and if successful, the
|
|
78
|
+
// Greeter returns the `party_key` and a `nonce` which the invitee will need to use for the Party credential messages.
|
|
79
|
+
//
|
|
80
|
+
message HandshakeResponse {
|
|
81
|
+
// Random bytes which must be included in the signed portion of messages submitted in a 'NOTARIZE' command
|
|
82
|
+
// (proving ownership of the keys in question).
|
|
83
|
+
bytes nonce = 1;
|
|
84
|
+
|
|
85
|
+
// The public key of the party.
|
|
86
|
+
dxos.keys.PublicKey party_key = 2;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
//
|
|
90
|
+
// The 'NOTARIZE' command takes an array of SignedMessages which the invitee would like added to the Party. The
|
|
91
|
+
// standard case would be a message admitting an Identity (or Device) key and a message admitting a feed.
|
|
92
|
+
//
|
|
93
|
+
message NotarizeResponse {
|
|
94
|
+
// A copy of each of the messages as written to the Party (now in an Envelope signed by the Greeter) and the Feed
|
|
95
|
+
// and key hints necessary to bootstrap the invitee into the Party.
|
|
96
|
+
repeated google.protobuf.Any copies = 1;
|
|
97
|
+
|
|
98
|
+
dxos.keys.PublicKey genesis_feed = 3;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// TODO(dmaretskyi): Verify if this is valid. Wouldn't the knowledge of the party's public key be enough to verify the rest of credential messages?
|
|
102
|
+
//
|
|
103
|
+
// Feed and key hints are by the invitee, because even though the Party members now trust it, it does not trust
|
|
104
|
+
// them. Until it has a chance to replicate, it cannot construct its own understanding of the Party from party.*
|
|
105
|
+
// messages, but neither can it replicate unless it trusts its peers. The Hints break this cycle by providing an
|
|
106
|
+
// initial set of keys and Feeds to trust.
|
|
107
|
+
//
|
|
108
|
+
message KeyHint {
|
|
109
|
+
// TODO(telackey): These should be changed to be the full set of signed party messages, so the recipient can build
|
|
110
|
+
// and verify the party structure just as it would if it had obtained them from the feeds.
|
|
111
|
+
dxos.keys.PublicKey public_key = 1;
|
|
112
|
+
keys.KeyType type = 2;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
//
|
|
116
|
+
// The 'CLAIM' command is used to trigger the Greeting flow by "claiming" a PartyInvitation which was replicated
|
|
117
|
+
// to the Party or presented as a "proof".
|
|
118
|
+
//
|
|
119
|
+
// The ClaimResponse provides the invitee with information about the interactive invitation triggered by the "claim",
|
|
120
|
+
// such as the invitation ID and the swarm key to use to connect to the Greeter.
|
|
121
|
+
//
|
|
122
|
+
message ClaimResponse {
|
|
123
|
+
bytes id = 1; // The ID of the invitation.
|
|
124
|
+
bytes rendezvous_key = 2; // The swarm key to use to rendezvous with the Greeter.
|
|
125
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2020 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "dxos/keys.proto";
|
|
8
|
+
|
|
9
|
+
package dxos.halo.credentials.identity;
|
|
10
|
+
|
|
11
|
+
// Additional, descriptive information about an Identity. Must be signed by the Identity's key.
|
|
12
|
+
message IdentityInfo {
|
|
13
|
+
dxos.keys.PublicKey public_key = 1; // The publicKey of the Identity (must be signed by this key).
|
|
14
|
+
string display_name = 2; // The display name to use for this key.
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Additional, descriptive information about a Device. Must be signed by the Device's key.
|
|
18
|
+
message DeviceInfo {
|
|
19
|
+
dxos.keys.PublicKey public_key = 1; // The publicKey of the Device (must be signed by this key).
|
|
20
|
+
string display_name = 2; // The display name to use for this key.
|
|
21
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2020 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "dxos/halo/keys.proto";
|
|
8
|
+
import "dxos/halo/signed.proto";
|
|
9
|
+
import "dxos/keys.proto";
|
|
10
|
+
|
|
11
|
+
package dxos.halo.credentials.party;
|
|
12
|
+
|
|
13
|
+
//
|
|
14
|
+
// Party Credentials are messages that, by virtue of their being signed by a key that is a
|
|
15
|
+
// recognized authority, convey to the recipient that something should be allowed or done.
|
|
16
|
+
// They are therefore similar in structure and purpose to X.509 certificates and to W3C
|
|
17
|
+
// Verifiable Credentials. The "subject" for a Party Credential (who or what can do the thing allowed),
|
|
18
|
+
// along with the kind of action permitted is specified in one of the four contained message
|
|
19
|
+
// types: PartyGenesis, FeedGenesis, KeyAdmit, FeedAdmit. One such subject message is
|
|
20
|
+
// present in the contents field of each PartyCredential message.
|
|
21
|
+
// PartyMessage carries common metadata (created, nonce) and the type of the subject message (type).
|
|
22
|
+
// Note that the subject message type is explicitly present in the type field even though
|
|
23
|
+
// its type will be discoverable via the relevant codec at runtime. This arrangement allows
|
|
24
|
+
// for signing to be done over the relevant fields (fields for which signature inclusion is
|
|
25
|
+
// necessary to ensure the security of the system), without needing to make assumptions about
|
|
26
|
+
// the presence and specific form of the codec-supplied message type identification.
|
|
27
|
+
// The complete credential comprises the PartyCredential message contents, signed by the
|
|
28
|
+
// relevant authority key(s), encoded as a SignedMessage (see ../signed.proto).
|
|
29
|
+
//
|
|
30
|
+
message PartyCredential {
|
|
31
|
+
enum Type {
|
|
32
|
+
ENVELOPE = 0;
|
|
33
|
+
PARTY_GENESIS = 1;
|
|
34
|
+
FEED_GENESIS = 2;
|
|
35
|
+
KEY_ADMIT = 3;
|
|
36
|
+
FEED_ADMIT = 4;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
Type type = 1;
|
|
40
|
+
|
|
41
|
+
oneof contents {
|
|
42
|
+
Envelope envelope = 10;
|
|
43
|
+
PartyGenesis party_genesis = 11;
|
|
44
|
+
KeyAdmit key_admit = 12;
|
|
45
|
+
FeedAdmit feed_admit = 13;
|
|
46
|
+
FeedGenesis feed_genesis = 14;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//
|
|
51
|
+
// The start-of-authority record for the Party, admitting a single key (usually a pseudonym) and a single feed.
|
|
52
|
+
// It must be signed by all three keys (party, key, feed). The Party private key should be destroyed after
|
|
53
|
+
// signing this message. This pattern is sometimes called an Inception Key.
|
|
54
|
+
//
|
|
55
|
+
message PartyGenesis {
|
|
56
|
+
dxos.keys.PublicKey party_key = 1; // The party public key.
|
|
57
|
+
dxos.keys.PublicKey feed_key = 2; // The initial feed to admit.
|
|
58
|
+
dxos.keys.PublicKey admit_key = 3; // The key to admit (usually a pseudonym key).
|
|
59
|
+
keys.KeyType admit_key_type = 4; // The KeyType of the admitKey.
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//
|
|
63
|
+
// Admit a single public key to the Party. This message must be signed by the key to be admitted, to prevent
|
|
64
|
+
// impersonation attacks, and unless the contents of an Envelope, also by a key which has already been admitted.
|
|
65
|
+
// Admitted keys represent entities in the Party Authority trust tree, for example: an identity pseudonym key
|
|
66
|
+
// representing "Alice in this party", or a device pseudonym key representing "Alice's Laptop in this Party".
|
|
67
|
+
//
|
|
68
|
+
message KeyAdmit {
|
|
69
|
+
dxos.keys.PublicKey party_key = 1;
|
|
70
|
+
dxos.keys.PublicKey admit_key = 2; // The public key to admit.
|
|
71
|
+
keys.KeyType admit_key_type = 3; // The KeyType of the admitKey.
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
//
|
|
75
|
+
// Admit a single feed to the Party. This message must be signed by the feed key to be admitted, also by some other
|
|
76
|
+
// key which has already been admitted (usually by a device pseudonym key).
|
|
77
|
+
// FeedAdmit messages constitute the leaf nodes in the Party Authority trust tree in that Party data is transmitted
|
|
78
|
+
// via feeds and therefore to write to a Party a node must have at least one feed admitted.
|
|
79
|
+
//
|
|
80
|
+
message FeedAdmit {
|
|
81
|
+
dxos.keys.PublicKey party_key = 1; // The Party public key.
|
|
82
|
+
dxos.keys.PublicKey feed_key = 2; // The Feed public key.
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//
|
|
86
|
+
// The start-of-authority record for the Feed, signed by the owner of the feed and the feed.
|
|
87
|
+
// The owner must be a key previously admitted to the Party.
|
|
88
|
+
//
|
|
89
|
+
message FeedGenesis {
|
|
90
|
+
dxos.keys.PublicKey feed_key = 1; // The feed public key.
|
|
91
|
+
dxos.keys.PublicKey owner_key = 2; // The public key of the owner of this feed.
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
//
|
|
95
|
+
// TODO(burdon): Needs discussion.
|
|
96
|
+
// A signed message containing a signed message. The nested signed structure allows a signed message
|
|
97
|
+
// received from another node that is not yet a party member (invitee), to be published on the party on behalf
|
|
98
|
+
// of that node by another node (greeter). It thereby provides a kind of delegated authority mechanism used to
|
|
99
|
+
// link signatures across the two nodes in a replay and impersonation resistant manner.
|
|
100
|
+
// Envelope is used by a Greeter to write, and countersign using
|
|
101
|
+
// its key, a message provided to it, signed by the Invitee, to the Party, via the greeting node's feed.
|
|
102
|
+
// The signature on the Envelope is that of the Greeter, while the signature(s) on the interior message are
|
|
103
|
+
// those of the Invitee, demonstrating ownership by the Invitee of the keys or feeds to be admitted.
|
|
104
|
+
// Envelope exists solely to include the party key under the countersignature, otherwise two nested SignedMessages
|
|
105
|
+
// could be used. The party key is included to prevent replay attacks where a valid credential from one
|
|
106
|
+
// party is used to gain access to a different party.
|
|
107
|
+
// The interior message can only be of types:
|
|
108
|
+
// KEY_ADMIT
|
|
109
|
+
// FEED_ADMIT
|
|
110
|
+
//
|
|
111
|
+
message Envelope {
|
|
112
|
+
dxos.keys.PublicKey party_key = 1; // The Party public key.
|
|
113
|
+
dxos.halo.signed.Message message = 2; // The original Message.
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
//
|
|
117
|
+
// A PartyInvitation message that can be written to the Party so that any Party member can authenticate
|
|
118
|
+
// the invitee and perform greeting. This message must be written within a SignedMessage signed by the key (or KeyChain)
|
|
119
|
+
// of listed as the `issuer`. The invitee must authenticate themselves to the Greeter with Auth messages signed by
|
|
120
|
+
// the key (or KeyChain) of listed in the `invitee` field.
|
|
121
|
+
//
|
|
122
|
+
message PartyInvitation {
|
|
123
|
+
bytes id = 1; // A unique ID for this Invitation.
|
|
124
|
+
dxos.keys.PublicKey party_key = 2; // The public key of the Party for which this Invitation is valid.
|
|
125
|
+
dxos.keys.PublicKey issuer_key = 3; // The public key of the Party member issuing this invitation.
|
|
126
|
+
dxos.keys.PublicKey invitee_key = 4; // The public key of the non-member that is being invited to join the Party.
|
|
127
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
package dxos.halo.credentials;
|
|
8
|
+
|
|
9
|
+
import "google/protobuf/any.proto";
|
|
10
|
+
import "google/protobuf/timestamp.proto";
|
|
11
|
+
|
|
12
|
+
import "dxos/keys.proto";
|
|
13
|
+
|
|
14
|
+
//
|
|
15
|
+
// TODO(burdon): Move these notes to the design doc commentary.
|
|
16
|
+
// Peers maintain Feeds that are admitted to HALO and ECHO Parties.
|
|
17
|
+
// Peers act as Verifiers for Credentials that may be Presented from other Peers.
|
|
18
|
+
// Since Feeds implement a signed hash-linked data structure, they constitute a chain-of-authority for chained Credentials.
|
|
19
|
+
// Credentials written to HALO Feeds may be Presented to Peers Verifying ECHO Parties.
|
|
20
|
+
//
|
|
21
|
+
|
|
22
|
+
//
|
|
23
|
+
// **PartyGenesis** -
|
|
24
|
+
// First message written to initial Feed in a new Party.
|
|
25
|
+
//
|
|
26
|
+
|
|
27
|
+
message PartyGenesis {
|
|
28
|
+
dxos.keys.PublicKey party_key = 1; // Feeds belong to Parties.
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//
|
|
32
|
+
// **Claim** -
|
|
33
|
+
// Statement about a subject.
|
|
34
|
+
// Claims can be written directly to a feed or used within Credentials.
|
|
35
|
+
//
|
|
36
|
+
|
|
37
|
+
// Agent is authorized to access Party.
|
|
38
|
+
message PartyMember {
|
|
39
|
+
// TODO(burdon): Consider permissions (e.g., for Bots).
|
|
40
|
+
enum Role {
|
|
41
|
+
INVALID = 0;
|
|
42
|
+
/// Manage members.
|
|
43
|
+
ADMIN = 1;
|
|
44
|
+
/// Read and write.
|
|
45
|
+
MEMBER = 2;
|
|
46
|
+
/// Read-only.
|
|
47
|
+
READER = 3;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
dxos.keys.PublicKey party_key = 1;
|
|
51
|
+
Role role = 2;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Device is authorized to sign messages for a given Agent (Identity).
|
|
55
|
+
// NOTE: Devices are Admitted to Identities.
|
|
56
|
+
message AuthorizedDevice {
|
|
57
|
+
dxos.keys.PublicKey identity_key = 1;
|
|
58
|
+
dxos.keys.PublicKey device_key = 2; // Existing authorized device.
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Feed is admitted to the Party for replication.
|
|
62
|
+
// NOTE: Feeds are Admitted to Parties.
|
|
63
|
+
message AdmittedFeed {
|
|
64
|
+
enum Designation {
|
|
65
|
+
/// Classic general purpose feeds for both HALO and ECHO messages together. To be deprecated.
|
|
66
|
+
GENERAL = 0;
|
|
67
|
+
/// Contain system-level messages messages, such as credentials and epochs.
|
|
68
|
+
CONTROL = 1;
|
|
69
|
+
/// Database mutations.
|
|
70
|
+
DATA = 2;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
dxos.keys.PublicKey party_key = 1;
|
|
74
|
+
|
|
75
|
+
/// Owning identity.
|
|
76
|
+
dxos.keys.PublicKey identity_key = 2; // Could be derived.
|
|
77
|
+
/// Owning device.
|
|
78
|
+
dxos.keys.PublicKey device_key = 3;
|
|
79
|
+
|
|
80
|
+
/// Controls sets the feed designation. Feeds with different designations are consumed by separate pipelines.
|
|
81
|
+
Designation designation = 4;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/// Associtaes a space that will implement Agent's HALO with an Identity.
|
|
85
|
+
message HaloSpace {
|
|
86
|
+
dxos.keys.PublicKey identity_key = 1;
|
|
87
|
+
/// Space key.
|
|
88
|
+
dxos.keys.PublicKey halo_key = 2;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/// Grants recovery permissions to a recovery key.
|
|
92
|
+
message IdentityRecovery {
|
|
93
|
+
dxos.keys.PublicKey identity_key = 1;
|
|
94
|
+
/// Public key derrived from the recovery seedphrase.
|
|
95
|
+
dxos.keys.PublicKey recovery_key = 2;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/// Sets profile information.
|
|
99
|
+
message IdentityProfile {
|
|
100
|
+
message ProfileDocument {
|
|
101
|
+
optional string display_name = 1;
|
|
102
|
+
optional string avatar_cid = 2;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// TODO(dmaretskyi): This could also be a DXNS link or stored in user's public HALO (we could also index the public HALO in the DMG).
|
|
106
|
+
ProfileDocument profile = 1;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/// Metadata associated with a key.
|
|
110
|
+
/// Subject must be a key being referenced.
|
|
111
|
+
message KeyInfo {
|
|
112
|
+
optional string name = 1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/// Assertion for agents authenticating in the space swarm.
|
|
116
|
+
message Auth {
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
//
|
|
120
|
+
// **Claim** -
|
|
121
|
+
// Statement about a subject.
|
|
122
|
+
// Claims can be written directly to a feed or used within Credentials.
|
|
123
|
+
//
|
|
124
|
+
|
|
125
|
+
message Claim {
|
|
126
|
+
dxos.keys.PublicKey id = 1; // Subject of claim (e.g., Agent, Device, Feed).
|
|
127
|
+
google.protobuf.Any assertion = 2;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
//
|
|
131
|
+
// **Proof** -
|
|
132
|
+
// Signature that makes Credential tamper-evident.
|
|
133
|
+
// The proof is signed by the issuer of the Credential.
|
|
134
|
+
// Ref: https://www.w3.org/TR/vc-data-model/#proofs-signatures
|
|
135
|
+
//
|
|
136
|
+
|
|
137
|
+
message Proof {
|
|
138
|
+
string type = 1; // Type of proof (e.g., "Ed25519Signature2020").
|
|
139
|
+
google.protobuf.Timestamp creation_date = 2;
|
|
140
|
+
dxos.keys.PublicKey signer = 3; // Entity that created the proof (e.g., Agent, Device, Party).
|
|
141
|
+
optional bytes nonce = 4; // Used in Presentations to protect against replay attacks.
|
|
142
|
+
|
|
143
|
+
/// Signature (excluded from signed data).
|
|
144
|
+
bytes value = 5;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Must be present if signer is not credential issuer.
|
|
148
|
+
* Establishes the authority of the signer. Proves that the signer can issue such credentials.
|
|
149
|
+
* Excluded from signed data.
|
|
150
|
+
*/
|
|
151
|
+
optional Chain chain = 6;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* A chain of credentials that establishes the delegated authority to issue new credentials.
|
|
156
|
+
* Each key in the chain has an assotiated credential that establishes the authrity of that specific key.
|
|
157
|
+
*
|
|
158
|
+
* Example:
|
|
159
|
+
* Alice/Device-2 => Alice/Device-1 => Alice
|
|
160
|
+
*
|
|
161
|
+
* This chain would include 2 credentials:
|
|
162
|
+
* 1. Giving Alice/Device-2 the authority to issue credentials on behalf of Alice, signed by Alice/Device-1.
|
|
163
|
+
* 2. Giving Alice/Device-1 the authority to issue credentials on behalf of Alice, signed by Alice.
|
|
164
|
+
*/
|
|
165
|
+
message Chain {
|
|
166
|
+
/// Credential that authorizes the subject to issue new credentials (can be recursive).
|
|
167
|
+
Credential credential = 1;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
//
|
|
171
|
+
// **Credential** -
|
|
172
|
+
// Set of claims containing a proof signed by the issuer.
|
|
173
|
+
// Credentials may be stored in a Credential Repository (e.g., digital wallet.)
|
|
174
|
+
// Credentials may also be store within feeds (e.g., an agent's HALO).
|
|
175
|
+
//
|
|
176
|
+
|
|
177
|
+
message Credential {
|
|
178
|
+
optional dxos.keys.PublicKey id = 1; // Credential identifier (e.g., for storage indexing).
|
|
179
|
+
dxos.keys.PublicKey issuer = 2; // key = { Party (genesis) | Identity (genesis) | (authorized) Device }
|
|
180
|
+
google.protobuf.Timestamp issuance_date = 3;
|
|
181
|
+
optional google.protobuf.Timestamp expiration_date = 4;
|
|
182
|
+
optional bytes expiration_ref = 5; // Could reference blockchain or epoch number.
|
|
183
|
+
Claim subject = 10;
|
|
184
|
+
Proof proof = 11;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
//
|
|
188
|
+
// **Presentation** -
|
|
189
|
+
// Signed Credential(s) sent to a Verifier.
|
|
190
|
+
// Presentations are typically NOT stored any may include a challenge (e.g., nonce).
|
|
191
|
+
// Presentations may contain multiple Credentials (and require multiple proofs).
|
|
192
|
+
//
|
|
193
|
+
|
|
194
|
+
message Presentation {
|
|
195
|
+
repeated Credential credentials = 1;
|
|
196
|
+
repeated Proof proofs = 2;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
//
|
|
200
|
+
// **Metadata** -
|
|
201
|
+
// Persistant metadata stored outside of used to bootsrapt the stack.
|
|
202
|
+
//
|
|
203
|
+
|
|
204
|
+
/// Information needed to bootstrap a Space.
|
|
205
|
+
message SpaceRecord {
|
|
206
|
+
dxos.keys.PublicKey space_key = 1;
|
|
207
|
+
|
|
208
|
+
/// All feeds in the space must form a DAG (or a tree?). This is the root feed of that structure.
|
|
209
|
+
dxos.keys.PublicKey genesis_feed_key = 2;
|
|
210
|
+
|
|
211
|
+
/// Key of the writable feed for control messages. Keyring must have the asscoiated private key.
|
|
212
|
+
dxos.keys.PublicKey write_control_feed_key = 3;
|
|
213
|
+
|
|
214
|
+
/// Key of the writable feed for data messages. Keyring must have the asscoiated private key.
|
|
215
|
+
dxos.keys.PublicKey write_data_feed_key = 4;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/// Information needed to bootstrap an Identity.
|
|
219
|
+
message IdentityRecord {
|
|
220
|
+
dxos.keys.PublicKey identity_key = 1;
|
|
221
|
+
dxos.keys.PublicKey device_key = 2;
|
|
222
|
+
|
|
223
|
+
SpaceRecord halo_space = 3;
|
|
224
|
+
|
|
225
|
+
/// Public profile information.
|
|
226
|
+
/// Not yet implemented. Must be null.
|
|
227
|
+
optional SpaceRecord profile_space = 4;
|
|
228
|
+
|
|
229
|
+
/// Cached profile.
|
|
230
|
+
optional IdentityProfile.ProfileDocument profile = 5;
|
|
231
|
+
}
|
|
232
|
+
|