@minca/core 0.1.14 → 0.1.16
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/README.md +4 -4
- package/dist/elements/auth-styles.d.ts +1 -1
- package/dist/elements/auth-styles.d.ts.map +1 -1
- package/dist/elements/auth-styles.js +21 -4
- package/dist/elements/auth-styles.js.map +1 -1
- package/dist/elements/minca-auth.d.ts.map +1 -1
- package/dist/elements/minca-auth.js +151 -57
- package/dist/elements/minca-auth.js.map +1 -1
- package/dist/files/space-files.d.ts +15 -3
- package/dist/files/space-files.d.ts.map +1 -1
- package/dist/files/space-files.js +225 -37
- package/dist/files/space-files.js.map +1 -1
- package/dist/identity/abilities.d.ts +2 -0
- package/dist/identity/abilities.d.ts.map +1 -1
- package/dist/identity/abilities.js +2 -0
- package/dist/identity/abilities.js.map +1 -1
- package/dist/identity/account-vault.d.ts +15 -71
- package/dist/identity/account-vault.d.ts.map +1 -1
- package/dist/identity/account-vault.js +45 -104
- package/dist/identity/account-vault.js.map +1 -1
- package/dist/identity/channel.d.ts +3 -9
- package/dist/identity/channel.d.ts.map +1 -1
- package/dist/identity/channel.js +42 -42
- package/dist/identity/channel.js.map +1 -1
- package/dist/identity/contact-key.d.ts +14 -29
- package/dist/identity/contact-key.d.ts.map +1 -1
- package/dist/identity/contact-key.js +31 -51
- package/dist/identity/contact-key.js.map +1 -1
- package/dist/identity/crypto-p256.d.ts.map +1 -1
- package/dist/identity/crypto-p256.js +39 -53
- package/dist/identity/crypto-p256.js.map +1 -1
- package/dist/identity/hpke.d.ts.map +1 -1
- package/dist/identity/hpke.js +19 -19
- package/dist/identity/hpke.js.map +1 -1
- package/dist/identity/identity-manager.d.ts.map +1 -1
- package/dist/identity/identity-manager.js +1 -2
- package/dist/identity/identity-manager.js.map +1 -1
- package/dist/identity/policy.d.ts.map +1 -1
- package/dist/identity/policy.js +35 -61
- package/dist/identity/policy.js.map +1 -1
- package/dist/identity/recovery-code.d.ts +2 -8
- package/dist/identity/recovery-code.d.ts.map +1 -1
- package/dist/identity/recovery-code.js +4 -11
- package/dist/identity/recovery-code.js.map +1 -1
- package/dist/identity/root-signer.d.ts +1 -6
- package/dist/identity/root-signer.d.ts.map +1 -1
- package/dist/identity/root-signer.js +12 -15
- package/dist/identity/root-signer.js.map +1 -1
- package/dist/identity/ucan.d.ts.map +1 -1
- package/dist/identity/ucan.js +48 -39
- package/dist/identity/ucan.js.map +1 -1
- package/dist/identity/webauthn.d.ts +6 -11
- package/dist/identity/webauthn.d.ts.map +1 -1
- package/dist/identity/webauthn.js +18 -30
- package/dist/identity/webauthn.js.map +1 -1
- package/dist/inbox/inbox.d.ts.map +1 -1
- package/dist/inbox/inbox.js +40 -30
- package/dist/inbox/inbox.js.map +1 -1
- package/dist/inbox/index.d.ts +2 -0
- package/dist/inbox/index.d.ts.map +1 -1
- package/dist/inbox/index.js +1 -0
- package/dist/inbox/index.js.map +1 -1
- package/dist/inbox/names.d.ts +54 -0
- package/dist/inbox/names.d.ts.map +1 -0
- package/dist/inbox/names.js +299 -0
- package/dist/inbox/names.js.map +1 -0
- package/dist/index.d.ts +3 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -12
- package/dist/index.js.map +1 -1
- package/dist/network/mesh.d.ts +7 -20
- package/dist/network/mesh.d.ts.map +1 -1
- package/dist/network/mesh.js +267 -245
- package/dist/network/mesh.js.map +1 -1
- package/dist/network/relay-link.d.ts +31 -0
- package/dist/network/relay-link.d.ts.map +1 -0
- package/dist/network/relay-link.js +62 -0
- package/dist/network/relay-link.js.map +1 -0
- package/dist/network/relay-minca.d.ts +12 -1
- package/dist/network/relay-minca.d.ts.map +1 -1
- package/dist/network/relay-minca.js +25 -55
- package/dist/network/relay-minca.js.map +1 -1
- package/dist/network/relay-nostr.d.ts +14 -3
- package/dist/network/relay-nostr.d.ts.map +1 -1
- package/dist/network/relay-nostr.js +34 -72
- package/dist/network/relay-nostr.js.map +1 -1
- package/dist/network/relay-socket.d.ts +1 -1
- package/dist/network/relay-socket.d.ts.map +1 -1
- package/dist/network/relay-socket.js +3 -1
- package/dist/network/relay-socket.js.map +1 -1
- package/dist/network/relays.d.ts +26 -17
- package/dist/network/relays.d.ts.map +1 -1
- package/dist/network/relays.js +21 -28
- package/dist/network/relays.js.map +1 -1
- package/dist/network/rendezvous.d.ts +1 -1
- package/dist/network/rendezvous.d.ts.map +1 -1
- package/dist/network/rendezvous.js +2 -2
- package/dist/network/rendezvous.js.map +1 -1
- package/dist/node/actions.d.ts.map +1 -1
- package/dist/node/actions.js +56 -39
- package/dist/node/actions.js.map +1 -1
- package/dist/node/api.d.ts +6 -0
- package/dist/node/api.d.ts.map +1 -1
- package/dist/node/api.js +6 -0
- package/dist/node/api.js.map +1 -1
- package/dist/node/carrier.d.ts +5 -0
- package/dist/node/carrier.d.ts.map +1 -1
- package/dist/node/carrier.js +94 -73
- package/dist/node/carrier.js.map +1 -1
- package/dist/node/copy.d.ts +8 -7
- package/dist/node/copy.d.ts.map +1 -1
- package/dist/node/copy.js +54 -56
- package/dist/node/copy.js.map +1 -1
- package/dist/node/host.d.ts +39 -65
- package/dist/node/host.d.ts.map +1 -1
- package/dist/node/host.js +362 -379
- package/dist/node/host.js.map +1 -1
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/node-carriers.d.ts +35 -0
- package/dist/node/node-carriers.d.ts.map +1 -0
- package/dist/node/node-carriers.js +562 -0
- package/dist/node/node-carriers.js.map +1 -0
- package/dist/node/node-contacts.d.ts +11 -0
- package/dist/node/node-contacts.d.ts.map +1 -0
- package/dist/node/node-contacts.js +808 -0
- package/dist/node/node-contacts.js.map +1 -0
- package/dist/node/node-context.d.ts +76 -0
- package/dist/node/node-context.d.ts.map +1 -0
- package/dist/node/node-context.js +54 -0
- package/dist/node/node-context.js.map +1 -0
- package/dist/node/node-hosting.d.ts +20 -0
- package/dist/node/node-hosting.d.ts.map +1 -0
- package/dist/node/node-hosting.js +449 -0
- package/dist/node/node-hosting.js.map +1 -0
- package/dist/node/node-records.d.ts +18 -0
- package/dist/node/node-records.d.ts.map +1 -0
- package/dist/node/node-records.js +262 -0
- package/dist/node/node-records.js.map +1 -0
- package/dist/node/node.d.ts.map +1 -1
- package/dist/node/node.js +197 -1989
- package/dist/node/node.js.map +1 -1
- package/dist/node/remote.d.ts +5 -6
- package/dist/node/remote.d.ts.map +1 -1
- package/dist/node/remote.js +272 -260
- package/dist/node/remote.js.map +1 -1
- package/dist/node/space-catalog.d.ts +40 -0
- package/dist/node/space-catalog.d.ts.map +1 -0
- package/dist/node/space-catalog.js +158 -0
- package/dist/node/space-catalog.js.map +1 -0
- package/dist/node/space-checks.d.ts +25 -0
- package/dist/node/space-checks.d.ts.map +1 -0
- package/dist/node/space-checks.js +343 -0
- package/dist/node/space-checks.js.map +1 -0
- package/dist/node/space-history.d.ts +37 -0
- package/dist/node/space-history.d.ts.map +1 -0
- package/dist/node/space-history.js +350 -0
- package/dist/node/space-history.js.map +1 -0
- package/dist/node/space-holding.d.ts +49 -0
- package/dist/node/space-holding.d.ts.map +1 -0
- package/dist/node/space-holding.js +267 -0
- package/dist/node/space-holding.js.map +1 -0
- package/dist/node/space-index.d.ts +41 -0
- package/dist/node/space-index.d.ts.map +1 -0
- package/dist/node/space-index.js +217 -0
- package/dist/node/space-index.js.map +1 -0
- package/dist/node/space-keys.d.ts +34 -0
- package/dist/node/space-keys.d.ts.map +1 -0
- package/dist/node/space-keys.js +309 -0
- package/dist/node/space-keys.js.map +1 -0
- package/dist/node/space-lines.d.ts +33 -0
- package/dist/node/space-lines.d.ts.map +1 -0
- package/dist/node/space-lines.js +145 -0
- package/dist/node/space-lines.js.map +1 -0
- package/dist/node/space-membership.d.ts +69 -0
- package/dist/node/space-membership.d.ts.map +1 -0
- package/dist/node/space-membership.js +242 -0
- package/dist/node/space-membership.js.map +1 -0
- package/dist/node/space-mirrors.d.ts +43 -0
- package/dist/node/space-mirrors.d.ts.map +1 -0
- package/dist/node/space-mirrors.js +125 -0
- package/dist/node/space-mirrors.js.map +1 -0
- package/dist/node/space-peers.d.ts +104 -0
- package/dist/node/space-peers.d.ts.map +1 -0
- package/dist/node/space-peers.js +595 -0
- package/dist/node/space-peers.js.map +1 -0
- package/dist/node/space-profiles.d.ts +18 -0
- package/dist/node/space-profiles.d.ts.map +1 -0
- package/dist/node/space-profiles.js +105 -0
- package/dist/node/space-profiles.js.map +1 -0
- package/dist/node/space-rules.d.ts +29 -0
- package/dist/node/space-rules.d.ts.map +1 -0
- package/dist/node/space-rules.js +144 -0
- package/dist/node/space-rules.js.map +1 -0
- package/dist/node/space-runtime.d.ts +104 -143
- package/dist/node/space-runtime.d.ts.map +1 -1
- package/dist/node/space-runtime.js +293 -3954
- package/dist/node/space-runtime.js.map +1 -1
- package/dist/node/space-standing.d.ts +20 -0
- package/dist/node/space-standing.d.ts.map +1 -0
- package/dist/node/space-standing.js +317 -0
- package/dist/node/space-standing.js.map +1 -0
- package/dist/node/space-versions.d.ts +104 -0
- package/dist/node/space-versions.d.ts.map +1 -0
- package/dist/node/space-versions.js +153 -0
- package/dist/node/space-versions.js.map +1 -0
- package/dist/node/space-warrants.d.ts +25 -0
- package/dist/node/space-warrants.d.ts.map +1 -0
- package/dist/node/space-warrants.js +214 -0
- package/dist/node/space-warrants.js.map +1 -0
- package/dist/node/space-writing.d.ts +72 -0
- package/dist/node/space-writing.d.ts.map +1 -0
- package/dist/node/space-writing.js +440 -0
- package/dist/node/space-writing.js.map +1 -0
- package/dist/node/stores.d.ts +19 -50
- package/dist/node/stores.d.ts.map +1 -1
- package/dist/node/stores.js +14 -33
- package/dist/node/stores.js.map +1 -1
- package/dist/node/types.d.ts +225 -305
- package/dist/node/types.d.ts.map +1 -1
- package/dist/node/usage.d.ts +2 -24
- package/dist/node/usage.d.ts.map +1 -1
- package/dist/node/usage.js +118 -102
- package/dist/node/usage.js.map +1 -1
- package/dist/node/watch-notifications.d.ts.map +1 -1
- package/dist/node/watch-notifications.js +32 -29
- package/dist/node/watch-notifications.js.map +1 -1
- package/dist/node/worker.d.ts +5 -6
- package/dist/node/worker.d.ts.map +1 -1
- package/dist/node/worker.js +80 -72
- package/dist/node/worker.js.map +1 -1
- package/dist/node/writer-keys.d.ts +5 -6
- package/dist/node/writer-keys.d.ts.map +1 -1
- package/dist/node/writer-keys.js +66 -57
- package/dist/node/writer-keys.js.map +1 -1
- package/dist/node/writers.d.ts +12 -19
- package/dist/node/writers.d.ts.map +1 -1
- package/dist/node/writers.js +7 -15
- package/dist/node/writers.js.map +1 -1
- package/dist/privacy/direct.d.ts.map +1 -1
- package/dist/privacy/direct.js +31 -27
- package/dist/privacy/direct.js.map +1 -1
- package/dist/privacy/space-encryption.d.ts.map +1 -1
- package/dist/privacy/space-encryption.js +5 -9
- package/dist/privacy/space-encryption.js.map +1 -1
- package/dist/query/computed.d.ts.map +1 -1
- package/dist/query/computed.js +78 -77
- package/dist/query/computed.js.map +1 -1
- package/dist/query/engine.d.ts +3 -4
- package/dist/query/engine.d.ts.map +1 -1
- package/dist/query/engine.js +93 -86
- package/dist/query/engine.js.map +1 -1
- package/dist/query/filter.d.ts +8 -10
- package/dist/query/filter.d.ts.map +1 -1
- package/dist/query/filter.js +144 -161
- package/dist/query/filter.js.map +1 -1
- package/dist/records/cel-types.d.ts.map +1 -1
- package/dist/records/cel-types.js +13 -27
- package/dist/records/cel-types.js.map +1 -1
- package/dist/records/cel.d.ts.map +1 -1
- package/dist/records/cel.js +177 -242
- package/dist/records/cel.js.map +1 -1
- package/dist/records/rules.d.ts.map +1 -1
- package/dist/records/rules.js +46 -50
- package/dist/records/rules.js.map +1 -1
- package/dist/records/topics.d.ts.map +1 -1
- package/dist/records/topics.js +18 -22
- package/dist/records/topics.js.map +1 -1
- package/dist/schema/collection-def.d.ts.map +1 -1
- package/dist/schema/collection-def.js +16 -5
- package/dist/schema/collection-def.js.map +1 -1
- package/dist/schemas/automations.d.ts +16 -15
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/automations.js +203 -165
- package/dist/schemas/automations.js.map +1 -1
- package/dist/schemas/blueprints.d.ts.map +1 -1
- package/dist/schemas/blueprints.js +14 -13
- package/dist/schemas/blueprints.js.map +1 -1
- package/dist/schemas/connectors.d.ts +12 -0
- package/dist/schemas/connectors.d.ts.map +1 -1
- package/dist/schemas/connectors.js +16 -11
- package/dist/schemas/connectors.js.map +1 -1
- package/dist/schemas/contacts.d.ts +57 -0
- package/dist/schemas/contacts.d.ts.map +1 -1
- package/dist/schemas/contacts.js +32 -0
- package/dist/schemas/contacts.js.map +1 -1
- package/dist/schemas/cron.d.ts.map +1 -1
- package/dist/schemas/cron.js +27 -28
- package/dist/schemas/cron.js.map +1 -1
- package/dist/schemas/defined.d.ts +6 -0
- package/dist/schemas/defined.d.ts.map +1 -0
- package/dist/schemas/defined.js +7 -0
- package/dist/schemas/defined.js.map +1 -0
- package/dist/schemas/fragments.d.ts +22 -2
- package/dist/schemas/fragments.d.ts.map +1 -1
- package/dist/schemas/fragments.js +20 -12
- package/dist/schemas/fragments.js.map +1 -1
- package/dist/schemas/guides.d.ts +3 -1
- package/dist/schemas/guides.d.ts.map +1 -1
- package/dist/schemas/guides.js +13 -12
- package/dist/schemas/guides.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +18 -14
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/library/annotations.d.ts +30 -0
- package/dist/schemas/library/annotations.d.ts.map +1 -1
- package/dist/schemas/library/annotations.js +1 -0
- package/dist/schemas/library/annotations.js.map +1 -1
- package/dist/schemas/library/community.d.ts +28 -0
- package/dist/schemas/library/community.d.ts.map +1 -1
- package/dist/schemas/library/life.d.ts +62 -2
- package/dist/schemas/library/life.d.ts.map +1 -1
- package/dist/schemas/library/media.d.ts +36 -0
- package/dist/schemas/library/media.d.ts.map +1 -1
- package/dist/schemas/library/money.d.ts +74 -2
- package/dist/schemas/library/money.d.ts.map +1 -1
- package/dist/schemas/library/planning.d.ts +56 -0
- package/dist/schemas/library/planning.d.ts.map +1 -1
- package/dist/schemas/library/publishing.d.ts +80 -4
- package/dist/schemas/library/publishing.d.ts.map +1 -1
- package/dist/schemas/library/social.d.ts +44 -0
- package/dist/schemas/library/social.d.ts.map +1 -1
- package/dist/session/account-hint.d.ts.map +1 -1
- package/dist/session/account-hint.js +8 -5
- package/dist/session/account-hint.js.map +1 -1
- package/dist/session/auth.d.ts +36 -2
- package/dist/session/auth.d.ts.map +1 -1
- package/dist/session/auth.js +95 -2
- package/dist/session/auth.js.map +1 -1
- package/dist/session/connect.d.ts +1 -0
- package/dist/session/connect.d.ts.map +1 -1
- package/dist/session/connect.js +3 -1
- package/dist/session/connect.js.map +1 -1
- package/dist/session/credentials.d.ts +8 -26
- package/dist/session/credentials.d.ts.map +1 -1
- package/dist/session/credentials.js +14 -32
- package/dist/session/credentials.js.map +1 -1
- package/dist/session/index.d.ts +1 -0
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +1 -0
- package/dist/session/index.js.map +1 -1
- package/dist/session/pairing.d.ts.map +1 -1
- package/dist/session/pairing.js +92 -88
- package/dist/session/pairing.js.map +1 -1
- package/dist/session/password-strength.d.ts.map +1 -1
- package/dist/session/password-strength.js +37 -37
- package/dist/session/password-strength.js.map +1 -1
- package/dist/session/places.d.ts.map +1 -1
- package/dist/session/places.js +18 -13
- package/dist/session/places.js.map +1 -1
- package/dist/session/popup.d.ts +13 -0
- package/dist/session/popup.d.ts.map +1 -0
- package/dist/session/popup.js +23 -0
- package/dist/session/popup.js.map +1 -0
- package/dist/space/constitution.d.ts.map +1 -1
- package/dist/space/constitution.js +22 -29
- package/dist/space/constitution.js.map +1 -1
- package/dist/space/grants.d.ts.map +1 -1
- package/dist/space/grants.js +37 -39
- package/dist/space/grants.js.map +1 -1
- package/dist/space/invite-link.d.ts.map +1 -1
- package/dist/space/invite-link.js +33 -33
- package/dist/space/invite-link.js.map +1 -1
- package/dist/space/own-automations.d.ts +13 -24
- package/dist/space/own-automations.d.ts.map +1 -1
- package/dist/space/own-automations.js +47 -37
- package/dist/space/own-automations.js.map +1 -1
- package/dist/space/roles.d.ts +56 -80
- package/dist/space/roles.d.ts.map +1 -1
- package/dist/space/roles.js +448 -441
- package/dist/space/roles.js.map +1 -1
- package/dist/space/space-access.d.ts +3 -4
- package/dist/space/space-access.d.ts.map +1 -1
- package/dist/space/space-access.js +3 -8
- package/dist/space/space-access.js.map +1 -1
- package/dist/storage/blob/directory.d.ts.map +1 -1
- package/dist/storage/blob/directory.js +39 -32
- package/dist/storage/blob/directory.js.map +1 -1
- package/dist/storage/blob/s3.d.ts.map +1 -1
- package/dist/storage/blob/s3.js +21 -19
- package/dist/storage/blob/s3.js.map +1 -1
- package/dist/storage/blob-store.d.ts +0 -9
- package/dist/storage/blob-store.d.ts.map +1 -1
- package/dist/storage/directory-access.d.ts +8 -32
- package/dist/storage/directory-access.d.ts.map +1 -1
- package/dist/storage/directory-access.js +11 -36
- package/dist/storage/directory-access.js.map +1 -1
- package/dist/storage/encrypted-adapter.d.ts +12 -32
- package/dist/storage/encrypted-adapter.d.ts.map +1 -1
- package/dist/storage/encrypted-adapter.js +31 -54
- package/dist/storage/encrypted-adapter.js.map +1 -1
- package/dist/storage/folder-adapter.d.ts +12 -26
- package/dist/storage/folder-adapter.d.ts.map +1 -1
- package/dist/storage/folder-adapter.js +37 -54
- package/dist/storage/folder-adapter.js.map +1 -1
- package/dist/storage/folder-reconcile.d.ts +12 -26
- package/dist/storage/folder-reconcile.d.ts.map +1 -1
- package/dist/storage/folder-reconcile.js +39 -48
- package/dist/storage/folder-reconcile.js.map +1 -1
- package/dist/storage/indexeddb-adapter.d.ts +2 -6
- package/dist/storage/indexeddb-adapter.d.ts.map +1 -1
- package/dist/storage/indexeddb-adapter.js +60 -114
- package/dist/storage/indexeddb-adapter.js.map +1 -1
- package/dist/storage/mirror.d.ts +0 -29
- package/dist/storage/mirror.d.ts.map +1 -1
- package/dist/storage/mirror.js +153 -110
- package/dist/storage/mirror.js.map +1 -1
- package/dist/storage/segment.d.ts.map +1 -1
- package/dist/storage/segment.js +3 -7
- package/dist/storage/segment.js.map +1 -1
- package/dist/storage/storage-provider.d.ts +6 -11
- package/dist/storage/storage-provider.d.ts.map +1 -1
- package/dist/storage/storage-provider.js +112 -116
- package/dist/storage/storage-provider.js.map +1 -1
- package/dist/sync/sync-engine.d.ts +10 -44
- package/dist/sync/sync-engine.d.ts.map +1 -1
- package/dist/sync/sync-engine.js +245 -247
- package/dist/sync/sync-engine.js.map +1 -1
- package/dist/sync/sync-messages.d.ts +1 -1
- package/dist/sync/sync-messages.d.ts.map +1 -1
- package/dist/sync/sync-messages.js +1 -1
- package/dist/sync/sync-messages.js.map +1 -1
- package/dist/utils/guards.d.ts +1 -0
- package/dist/utils/guards.d.ts.map +1 -1
- package/dist/utils/guards.js +1 -0
- package/dist/utils/guards.js.map +1 -1
- package/dist/utils/hmac.d.ts +5 -0
- package/dist/utils/hmac.d.ts.map +1 -0
- package/dist/utils/hmac.js +20 -0
- package/dist/utils/hmac.js.map +1 -0
- package/dist/utils/map.d.ts +10 -0
- package/dist/utils/map.d.ts.map +1 -0
- package/dist/utils/map.js +30 -0
- package/dist/utils/map.js.map +1 -0
- package/dist/utils/serial.d.ts +2 -0
- package/dist/utils/serial.d.ts.map +1 -1
- package/dist/utils/serial.js +9 -0
- package/dist/utils/serial.js.map +1 -1
- package/dist/validation/capability-gate.d.ts +7 -15
- package/dist/validation/capability-gate.d.ts.map +1 -1
- package/dist/validation/capability-gate.js +32 -36
- package/dist/validation/capability-gate.js.map +1 -1
- package/dist/validation/crypto-gate.d.ts.map +1 -1
- package/dist/validation/crypto-gate.js +12 -21
- package/dist/validation/crypto-gate.js.map +1 -1
- package/docs/README.md +3 -2
- package/docs/actions.md +47 -20
- package/docs/automations.md +1 -1
- package/docs/blueprints-and-guides.md +57 -13
- package/docs/building-an-app.md +11 -8
- package/docs/collections.md +33 -5
- package/docs/contacts.md +34 -1
- package/docs/contracts.md +1 -1
- package/docs/direct-messages.md +1 -1
- package/docs/inbox.md +5 -11
- package/docs/node.md +36 -26
- package/docs/records-and-queries.md +1 -1
- package/docs/sign-in.md +54 -26
- package/docs/spaces.md +6 -6
- package/docs/standard-library.md +33 -31
- package/docs/storage.md +37 -15
- package/docs/usernames.md +161 -0
- package/docs/warrants.md +1 -1
- package/package.json +2 -21
- package/dist/calls/calls.d.ts +0 -140
- package/dist/calls/calls.d.ts.map +0 -1
- package/dist/calls/calls.js +0 -861
- package/dist/calls/calls.js.map +0 -1
- package/dist/calls/index.d.ts +0 -4
- package/dist/calls/index.d.ts.map +0 -1
- package/dist/calls/index.js +0 -3
- package/dist/calls/index.js.map +0 -1
- package/dist/react/context.d.ts +0 -81
- package/dist/react/context.d.ts.map +0 -1
- package/dist/react/context.js +0 -97
- package/dist/react/context.js.map +0 -1
- package/dist/react/follow.d.ts +0 -11
- package/dist/react/follow.d.ts.map +0 -1
- package/dist/react/follow.js +0 -7
- package/dist/react/follow.js.map +0 -1
- package/dist/react/index.d.ts +0 -44
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.js +0 -40
- package/dist/react/index.js.map +0 -1
- package/dist/react/minca-auth.d.ts +0 -19
- package/dist/react/minca-auth.d.ts.map +0 -1
- package/dist/react/minca-auth.js +0 -36
- package/dist/react/minca-auth.js.map +0 -1
- package/dist/react/use-calls.d.ts +0 -21
- package/dist/react/use-calls.d.ts.map +0 -1
- package/dist/react/use-calls.js +0 -39
- package/dist/react/use-calls.js.map +0 -1
- package/dist/react/use-invite-link.d.ts +0 -24
- package/dist/react/use-invite-link.d.ts.map +0 -1
- package/dist/react/use-invite-link.js +0 -62
- package/dist/react/use-invite-link.js.map +0 -1
- package/dist/react/use-live.d.ts +0 -16
- package/dist/react/use-live.d.ts.map +0 -1
- package/dist/react/use-live.js +0 -56
- package/dist/react/use-live.js.map +0 -1
- package/dist/react/use-my-name.d.ts +0 -12
- package/dist/react/use-my-name.d.ts.map +0 -1
- package/dist/react/use-my-name.js +0 -38
- package/dist/react/use-my-name.js.map +0 -1
- package/dist/react/use-names.d.ts +0 -7
- package/dist/react/use-names.d.ts.map +0 -1
- package/dist/react/use-names.js +0 -13
- package/dist/react/use-names.js.map +0 -1
- package/dist/react/use-network.d.ts +0 -9
- package/dist/react/use-network.d.ts.map +0 -1
- package/dist/react/use-network.js +0 -33
- package/dist/react/use-network.js.map +0 -1
- package/dist/react/use-query.d.ts +0 -14
- package/dist/react/use-query.d.ts.map +0 -1
- package/dist/react/use-query.js +0 -26
- package/dist/react/use-query.js.map +0 -1
- package/dist/react/use-space.d.ts +0 -29
- package/dist/react/use-space.d.ts.map +0 -1
- package/dist/react/use-space.js +0 -57
- package/dist/react/use-space.js.map +0 -1
- package/dist/react/use-spaces.d.ts +0 -29
- package/dist/react/use-spaces.d.ts.map +0 -1
- package/dist/react/use-spaces.js +0 -78
- package/dist/react/use-spaces.js.map +0 -1
- package/docs/calls.md +0 -189
package/dist/node/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node/types
|
|
3
|
-
* The shape of a node. Everything a method returns is JSON-serialisable
|
|
4
|
-
*
|
|
3
|
+
* The shape of a node. Everything a method returns is JSON-serialisable: the
|
|
4
|
+
* same calls cross a port, and are actions for a CLI, MCP and WebMCP.
|
|
5
5
|
*/
|
|
6
6
|
import type { MailboxClient } from '../network/relays.js';
|
|
7
7
|
import type { BodyOf, CollectionRef, IncludeMap, Query, ResultFor } from '../query/types.js';
|
|
@@ -21,66 +21,66 @@ import type { StoreFactory } from './stores.js';
|
|
|
21
21
|
import type { JsonSchema, SchemaIssue } from '../schema/collection-def.js';
|
|
22
22
|
import type { Keeper } from '../space/roles.js';
|
|
23
23
|
import type { Automation } from '../schemas/automations.js';
|
|
24
|
+
import type { FundOffer, FundPayment, HostConnectorOffer, HostStatus, HostedBot, OverSpace, PayAnswer } from '../session/hosting.js';
|
|
24
25
|
export interface NodeNetworkConfig {
|
|
25
26
|
/** Relays for WebRTC, browsers only. Each space meets in the room named after its id. */
|
|
26
27
|
readonly relays?: ReadonlyArray<string>;
|
|
27
|
-
/** Always-on nodes to hold a socket to, `wss://host/peer
|
|
28
|
+
/** Always-on nodes to hold a socket to, `wss://host/peer#<DID>` (spec 04 §5.2); the space id is appended */
|
|
28
29
|
readonly nodes?: ReadonlyArray<string>;
|
|
29
|
-
/** Hosts to look for the account registry at,
|
|
30
|
+
/** Hosts to look for the account registry at, so a new device with only the recovery code finds its spaces */
|
|
30
31
|
readonly hosts?: ReadonlyArray<string>;
|
|
31
32
|
readonly iceServers?: ReadonlyArray<RTCIceServer>;
|
|
32
|
-
/** How WebRTC connections are made; a node in a worker passes `remoteTransport
|
|
33
|
+
/** How WebRTC connections are made; a node in a worker passes `remoteTransport` */
|
|
33
34
|
readonly createTransport?: (iceServers: () => ReadonlyArray<RTCIceServer>) => SignalledTransport;
|
|
34
|
-
/** Extra transports per space, given this node's session DID
|
|
35
|
+
/** Extra transports per space, given this node's session DID: for a node serving sockets, or a test */
|
|
35
36
|
readonly transports?: (spaceId: string, sessionDid: string) => ReadonlyArray<PeerTransport>;
|
|
36
37
|
}
|
|
37
38
|
export interface NodeConfig {
|
|
38
|
-
/** Who this node acts for. The root key only
|
|
39
|
+
/** Who this node acts for. The root key only signs session delegations. */
|
|
39
40
|
readonly signer: RootSigner;
|
|
40
|
-
/** The account key (`deriveAccountKey(seed)`):
|
|
41
|
+
/** The account key (`deriveAccountKey(seed)`): the node then follows the account registry */
|
|
41
42
|
readonly accountKey?: Uint8Array;
|
|
42
|
-
/** The account's contact key (`deriveContactKeyBytes(seed)`),
|
|
43
|
+
/** The account's contact key (`deriveContactKeyBytes(seed)`), to open contact requests and knocks */
|
|
43
44
|
readonly contactKey?: Uint8Array;
|
|
44
45
|
/** The account's contacts space, for a node given it without the account key */
|
|
45
46
|
readonly contactsSpace?: string;
|
|
46
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* The account's name as a grant gives it: what knocks and a new inbox say
|
|
49
|
+
* until the account's profile reaches this node from its registry
|
|
50
|
+
*/
|
|
51
|
+
readonly accountName?: string;
|
|
52
|
+
/** How the inbox and short links reach mailboxes. Default: `createMailboxClient` */
|
|
47
53
|
readonly mailbox?: MailboxClient;
|
|
48
54
|
/** Where the registry and each space's store live */
|
|
49
55
|
readonly stores: StoreFactory;
|
|
50
56
|
readonly provider?: CryptoProvider;
|
|
51
|
-
/**
|
|
57
|
+
/** Collection shapes to use where a space has none: checked on write, flagged (`conforms`) on read, never refused */
|
|
52
58
|
readonly collections?: ReadonlyArray<CollectionDef>;
|
|
53
59
|
/** Omit to stay offline */
|
|
54
60
|
readonly network?: NodeNetworkConfig;
|
|
55
|
-
/**
|
|
61
|
+
/** Seconds each session delegation lasts; renewed before it runs out. Default 3600. */
|
|
56
62
|
readonly sessionTtlSeconds?: number;
|
|
57
|
-
/** The key
|
|
63
|
+
/** The key to sign with, when the signer already named it. Default: one claimed from `writerKey`, else a fresh one */
|
|
58
64
|
readonly sessionKey?: CryptoKeyPair;
|
|
59
|
-
/**
|
|
60
|
-
* Where to keep a signing key across runs, so this device keeps one log in
|
|
61
|
-
* each space (`browserWriterKeys`; the CLI keeps them on disk). Ignored with
|
|
62
|
-
* `sessionKey`. Without it, or when no key can be claimed, the node makes a
|
|
63
|
-
* key for this run alone.
|
|
64
|
-
*/
|
|
65
|
+
/** Where to keep a signing key across runs (`browserWriterKeys`). Without one, each run makes a new key. */
|
|
65
66
|
readonly writerKey?: WriterKeySource;
|
|
66
|
-
/** How often to look for
|
|
67
|
+
/** How often to look for another process's writes to a folder store, ms. 0 disables. Default 2000. */
|
|
67
68
|
readonly watchIntervalMs?: number;
|
|
68
69
|
/**
|
|
69
|
-
* Fetch every file
|
|
70
|
-
*
|
|
71
|
-
* fetched when it is read (spec 05 §16.6).
|
|
70
|
+
* Fetch and keep every file of any size, as a keeper does. Default: others'
|
|
71
|
+
* files up to 5 MiB, dropping the least used past 256 MiB a space (spec 05 §16.6).
|
|
72
72
|
*/
|
|
73
73
|
readonly fetchFiles?: 'all';
|
|
74
74
|
/** Hold only the collections this node uses, once a space names a keeper to hold the rest */
|
|
75
75
|
readonly cache?: CacheConfig;
|
|
76
76
|
}
|
|
77
|
-
/** How a node holds part of a space: its own choice
|
|
77
|
+
/** How a node holds part of a space: its own choice */
|
|
78
78
|
export interface CacheConfig {
|
|
79
79
|
/** Collections this app uses: held from the start, and dropped last */
|
|
80
80
|
readonly collections?: ReadonlyArray<string>;
|
|
81
|
-
/** Drop a collection no query
|
|
81
|
+
/** Drop a collection no query touched for this many days, unless it holds unsent writes. Default 30. */
|
|
82
82
|
readonly unusedAfterDays?: number;
|
|
83
|
-
/** How many keepers a write must reach before it can be dropped; only
|
|
83
|
+
/** How many keepers a write must reach before it can be dropped; only raises the space's `copies` (default 2) */
|
|
84
84
|
readonly copies?: number;
|
|
85
85
|
}
|
|
86
86
|
/** A space, as the node describes it. Never carries the key. */
|
|
@@ -88,37 +88,33 @@ export interface SpaceSummary {
|
|
|
88
88
|
readonly id: string;
|
|
89
89
|
readonly name: string;
|
|
90
90
|
readonly visibility: SpaceVisibility;
|
|
91
|
-
/** Its founders, as its constitution names them
|
|
91
|
+
/** Its founders, as its constitution names them; some may have stepped down since (`access`) */
|
|
92
92
|
readonly founders: ReadonlyArray<string>;
|
|
93
|
-
/** The space it succeeds, as its constitution says
|
|
93
|
+
/** The space it succeeds, as its constitution says */
|
|
94
94
|
readonly succeeds?: string;
|
|
95
95
|
readonly createdAt: string;
|
|
96
|
-
/** Whether this node can read the space:
|
|
96
|
+
/** Whether this node can read the space: public, or private with the key */
|
|
97
97
|
readonly readable: boolean;
|
|
98
|
-
/** Whether this account holds a role here, and so may write
|
|
98
|
+
/** Whether this account holds a role here, and so may write */
|
|
99
99
|
readonly writable: boolean;
|
|
100
100
|
/** What this account is here: `founder`, a role it holds by name, or null when it holds none */
|
|
101
101
|
readonly role: string | null;
|
|
102
|
-
/** Whether an invite is waiting to be used
|
|
102
|
+
/** Whether an invite is waiting to be used: its record has not arrived yet */
|
|
103
103
|
readonly joining: boolean;
|
|
104
104
|
}
|
|
105
105
|
export interface NewSpace {
|
|
106
106
|
readonly name: string;
|
|
107
107
|
/** `private` encrypts every body with the space key */
|
|
108
108
|
readonly visibility: SpaceVisibility;
|
|
109
|
-
/** The roles it is founded with
|
|
109
|
+
/** The roles it is founded with (`rolePresets` has some). Default: none */
|
|
110
110
|
readonly roles?: ReadonlyArray<SpaceRole>;
|
|
111
|
-
/**
|
|
112
|
-
* `founders` (the default): you, and any `cofounders`, hold every command
|
|
113
|
-
* and no one else can remove you. `none`: no one is above the roles, and
|
|
114
|
-
* you hold only `creatorRoles`
|
|
115
|
-
*/
|
|
111
|
+
/** `founders` (default): you and any `cofounders` hold every command. `none`: you hold only `creatorRoles` */
|
|
116
112
|
readonly top?: 'founders' | 'none';
|
|
117
113
|
/** Under `top: founders`, accounts that found it with you */
|
|
118
114
|
readonly cofounders?: ReadonlyArray<string>;
|
|
119
115
|
/** Roles the constitution gives you. Under `top: none` you need one */
|
|
120
116
|
readonly creatorRoles?: ReadonlyArray<string>;
|
|
121
|
-
/** The space this one succeeds
|
|
117
|
+
/** The space this one succeeds; name it there too, with `spaces.succeed` */
|
|
122
118
|
readonly succeeds?: string;
|
|
123
119
|
}
|
|
124
120
|
export interface InvitePreview {
|
|
@@ -126,30 +122,26 @@ export interface InvitePreview {
|
|
|
126
122
|
readonly invitedBy: string;
|
|
127
123
|
/** Whether the invite carries the key to a private space */
|
|
128
124
|
readonly carriesKey: boolean;
|
|
129
|
-
/** Whether the invite
|
|
125
|
+
/** Whether the invite gives a role: false for a view-only one */
|
|
130
126
|
readonly carriesWrite: boolean;
|
|
131
|
-
/** The role it is for, as the link says
|
|
127
|
+
/** The role it is for, as the link says; the space's invite record is what counts */
|
|
132
128
|
readonly role: string | null;
|
|
133
|
-
/** For a short link: when its inviter stops sharing it, ms
|
|
129
|
+
/** For a short link: when its inviter stops sharing it, ms */
|
|
134
130
|
readonly until?: number;
|
|
135
131
|
}
|
|
136
132
|
export interface InviteOptions {
|
|
137
|
-
/** The role
|
|
133
|
+
/** The role it gives. Default: the lowest below yours, or view-only */
|
|
138
134
|
readonly role?: string;
|
|
139
|
-
/** False for a view-only invite: the key
|
|
135
|
+
/** False for a view-only invite: the key, and no role */
|
|
140
136
|
readonly write?: boolean;
|
|
141
|
-
/**
|
|
142
|
-
* A short link (spec 03 §7.7): about 85 characters, the rest of the invite
|
|
143
|
-
* kept sealed in mailboxes. Falls back to the long form when no mailbox
|
|
144
|
-
* takes it, or the space is too large for one.
|
|
145
|
-
*/
|
|
137
|
+
/** A short link, the rest sealed in mailboxes (spec 03 §7.7); the long form when no mailbox takes it */
|
|
146
138
|
readonly short?: boolean;
|
|
147
|
-
/** For a short link: when to stop sharing it, ms. Closing the invite is what ends it */
|
|
139
|
+
/** For a short link: when to stop sharing it, ms. Closing the invite is what ends it. */
|
|
148
140
|
readonly until?: number;
|
|
149
141
|
}
|
|
150
142
|
/** Who holds what in a space, now */
|
|
151
143
|
export interface SpaceAccess {
|
|
152
|
-
/** The space's roles,
|
|
144
|
+
/** The space's roles, each with its current definitions (rivals hold what they share) */
|
|
153
145
|
readonly roles: ReadonlyArray<SpaceRoleView>;
|
|
154
146
|
/** Everyone with a place: the founders, and every account assigned a role */
|
|
155
147
|
readonly members: ReadonlyArray<{
|
|
@@ -163,54 +155,39 @@ export interface SpaceAccess {
|
|
|
163
155
|
readonly role: string;
|
|
164
156
|
readonly open: boolean;
|
|
165
157
|
}>;
|
|
166
|
-
/** Whether this account is a founder
|
|
158
|
+
/** Whether this account is a founder that has not stepped down */
|
|
167
159
|
readonly founder: boolean;
|
|
168
160
|
/** `founders` or `none`, as the constitution says */
|
|
169
161
|
readonly top: 'founders' | 'none';
|
|
170
|
-
/**
|
|
171
|
-
* No founder is left, and no member may change roles: nobody can run the
|
|
172
|
-
* space any more, so a successor is the way on (`spaces.succeed`)
|
|
173
|
-
*/
|
|
162
|
+
/** No founder is left and no member may change roles: only a successor helps (`spaces.succeed`) */
|
|
174
163
|
readonly headless: boolean;
|
|
175
|
-
/**
|
|
176
|
-
* Spaces named as this one's successors, each with the accounts that named
|
|
177
|
-
* it. In no order: which to follow is each member's choice, and an app
|
|
178
|
-
* must not pick one for them
|
|
179
|
-
*/
|
|
164
|
+
/** Spaces named as successors, and who named each. In no order: which to follow is each member's choice. */
|
|
180
165
|
readonly successors: ReadonlyArray<{
|
|
181
166
|
readonly space: string;
|
|
182
167
|
readonly by: ReadonlyArray<string>;
|
|
183
168
|
}>;
|
|
184
169
|
/** The roles assigned to this account, by name */
|
|
185
170
|
readonly mine: ReadonlyArray<string>;
|
|
186
|
-
/** The latest access changes held
|
|
171
|
+
/** The latest access changes held: what a record written now names as `seen` */
|
|
187
172
|
readonly heads: ReadonlyArray<string>;
|
|
188
|
-
/** A private space's key: how often it changed, and whether this device holds the current one
|
|
173
|
+
/** A private space's key: how often it changed, and whether this device holds the current one */
|
|
189
174
|
readonly key: {
|
|
190
175
|
readonly changes: number;
|
|
191
176
|
readonly held: boolean;
|
|
192
177
|
} | null;
|
|
193
|
-
/** Where
|
|
178
|
+
/** Where members meet: the relays it names, else the ones its invite did */
|
|
194
179
|
readonly relays: ReadonlyArray<string>;
|
|
195
|
-
/** The nodes that keep the space whole: a host, an extension
|
|
180
|
+
/** The nodes that keep the space whole: a host, an extension */
|
|
196
181
|
readonly keepers: ReadonlyArray<Keeper>;
|
|
197
|
-
/** How many keepers a write should reach before
|
|
182
|
+
/** How many keepers a write should reach before it may be dropped; null for the default */
|
|
198
183
|
readonly copies: number | null;
|
|
199
|
-
/**
|
|
200
|
-
* Keys proven to have signed two versions at one place in their line for a
|
|
201
|
-
* collection here: stolen, or copied where they shouldn't be. What they
|
|
202
|
-
* signed in that collection from `from` on no longer counts (spec 02 §4.10).
|
|
203
|
-
*/
|
|
184
|
+
/** Keys proven to have forked their line in a collection; what they signed from `from` on no longer counts (spec 02 §4.10) */
|
|
204
185
|
readonly forks: ReadonlyArray<{
|
|
205
186
|
readonly writer: string;
|
|
206
187
|
readonly collection: string;
|
|
207
188
|
readonly from: number;
|
|
208
189
|
}>;
|
|
209
|
-
/**
|
|
210
|
-
* Accounts proven, by a warrant every peer checked, to have signed something
|
|
211
|
-
* the protocol refuses and no honest writer could have (spec 03 §6.6). For
|
|
212
|
-
* whoever manages the space to see; nothing is done about it by itself.
|
|
213
|
-
*/
|
|
190
|
+
/** Accounts a checked warrant proves signed what no honest writer could (spec 03 §6.6), for managers to see */
|
|
214
191
|
readonly flagged: ReadonlyArray<FlaggedAccount>;
|
|
215
192
|
}
|
|
216
193
|
/** A role as the history has it now */
|
|
@@ -238,47 +215,39 @@ export interface FlaggedAccount {
|
|
|
238
215
|
/** The id of the offending version */
|
|
239
216
|
readonly offence: string;
|
|
240
217
|
}
|
|
241
|
-
/** A record, opened and checked
|
|
218
|
+
/** A record, opened and checked: its current version, unless listed as history */
|
|
242
219
|
export interface NodeRecord<T = unknown> {
|
|
243
|
-
/** The record's identity
|
|
220
|
+
/** The record's identity, the same across edits; links point here */
|
|
244
221
|
readonly key: string;
|
|
245
|
-
/** This version's id
|
|
222
|
+
/** This version's id: a content hash */
|
|
246
223
|
readonly version: string;
|
|
247
224
|
/** 0 for the first version, one more for each edit */
|
|
248
225
|
readonly seq: number;
|
|
249
226
|
readonly space: string;
|
|
250
227
|
readonly collection: string;
|
|
251
|
-
/** The key that signed this version
|
|
228
|
+
/** The key that signed this version, usually a session key */
|
|
252
229
|
readonly author: string;
|
|
253
230
|
/** The identity that key was acting for, when its delegation checks out */
|
|
254
231
|
readonly root: string | null;
|
|
255
232
|
/** The identity that created the record, when its first version is held */
|
|
256
233
|
readonly createdBy: string | null;
|
|
257
|
-
/** When
|
|
234
|
+
/** When it was created, by its creator's clock: for display only */
|
|
258
235
|
readonly createdAt: string;
|
|
259
|
-
/** When this version was written
|
|
236
|
+
/** When this version was written: for display only */
|
|
260
237
|
readonly updatedAt: string;
|
|
261
238
|
/** The content, or null when it is encrypted and this node has no key */
|
|
262
239
|
readonly body: T | null;
|
|
263
|
-
/** What this record points at
|
|
240
|
+
/** What this record points at; empty when it can't be opened */
|
|
264
241
|
readonly links: ReadonlyArray<Link>;
|
|
265
242
|
readonly encrypted: boolean;
|
|
266
243
|
/** Signature, delegation and shape all check out */
|
|
267
244
|
readonly verified: boolean;
|
|
268
|
-
/**
|
|
269
|
-
* True when the note this version was signed under grants writing records
|
|
270
|
-
* and no more: it could not have defined a collection here. An app that
|
|
271
|
-
* runs what a record holds, as code, trusts only versions without it.
|
|
272
|
-
*/
|
|
245
|
+
/** Signed under a note that grants writing records and no more: an app running records as code trusts only versions without it */
|
|
273
246
|
readonly recordsOnly?: true;
|
|
274
247
|
readonly reason?: string;
|
|
275
|
-
/**
|
|
248
|
+
/** This version deletes the record (listed only with `includeDeleted`) */
|
|
276
249
|
readonly deleted?: true;
|
|
277
|
-
/**
|
|
278
|
-
* Whether the body fits its collection's schema; null when there is none or
|
|
279
|
-
* it could not be opened. A misfit is still kept and synced: refusing it
|
|
280
|
-
* would leave peers that saw different definitions disagreeing forever.
|
|
281
|
-
*/
|
|
250
|
+
/** Whether the body fits its collection's schema; null when there is none or it can't be opened. A misfit still syncs. */
|
|
282
251
|
readonly conforms: boolean | null;
|
|
283
252
|
readonly issues?: ReadonlyArray<SchemaIssue>;
|
|
284
253
|
}
|
|
@@ -290,19 +259,19 @@ export interface NodeCollection {
|
|
|
290
259
|
/** Null when records exist but the space has no definition for them */
|
|
291
260
|
readonly schema: JsonSchema | null;
|
|
292
261
|
readonly version: number | null;
|
|
293
|
-
/** Whether edits keep old versions: `all
|
|
262
|
+
/** Whether edits keep old versions: `all`, or `latest` (the default) */
|
|
294
263
|
readonly history: 'latest' | 'all';
|
|
295
|
-
/** The link roles its records carry, and what each may point at
|
|
264
|
+
/** The link roles its records carry, and what each may point at */
|
|
296
265
|
readonly links: Readonly<Record<string, LinkDeclaration>>;
|
|
297
|
-
/** The identity that first defined it
|
|
266
|
+
/** The identity that first defined it */
|
|
298
267
|
readonly definedBy: string | null;
|
|
299
|
-
/** What must be unique, which fields are fixed
|
|
268
|
+
/** What must be unique, which fields are fixed */
|
|
300
269
|
readonly rules: CollectionRules;
|
|
301
270
|
/** What a version must be to count, judged by readers; absent when it has none */
|
|
302
271
|
readonly contract?: CollectionContract;
|
|
303
272
|
/** Values derived from what links to its records; absent when it has none */
|
|
304
273
|
readonly computed?: ComputedFields;
|
|
305
|
-
/** Fields whose values are
|
|
274
|
+
/** Fields whose values are tagged on each record's outside, so keepers can match them unread */
|
|
306
275
|
readonly topics: ReadonlyArray<string>;
|
|
307
276
|
readonly records: number;
|
|
308
277
|
}
|
|
@@ -310,31 +279,24 @@ export interface DefineCollection {
|
|
|
310
279
|
readonly name: string;
|
|
311
280
|
readonly title?: string;
|
|
312
281
|
readonly description?: string;
|
|
313
|
-
/** JSON Schema in the supported subset, or a
|
|
282
|
+
/** JSON Schema in the supported subset, or a Standard JSON Schema validator */
|
|
314
283
|
readonly schema: JsonSchema | StandardJSONSchemaV1;
|
|
315
284
|
/** Default: one past the current version, or 1 */
|
|
316
285
|
readonly version?: number;
|
|
317
|
-
/** Keep every version
|
|
286
|
+
/** Keep every version (`all`), or only the current one (`latest`, the default) */
|
|
318
287
|
readonly history?: 'latest' | 'all';
|
|
319
288
|
/** The link roles its records may carry, and what each may point at */
|
|
320
289
|
readonly links?: Readonly<Record<string, LinkDeclaration>>;
|
|
321
|
-
/** What must be unique, which fields are fixed, whether records are written once:
|
|
290
|
+
/** What must be unique, which fields are fixed, whether records are written once: every peer checks */
|
|
322
291
|
readonly rules?: CollectionRules;
|
|
323
|
-
/** Fields whose values are topics
|
|
292
|
+
/** Fields whose values are topics, like `channel`, so a keeper can match them unread */
|
|
324
293
|
readonly topics?: ReadonlyArray<string>;
|
|
325
|
-
/**
|
|
326
|
-
* What a version must be to count, judged by readers: `check`, conditions in CEL or built
|
|
327
|
-
* in TypeScript, and `line`, one line per account at `lineKey(account, name)`
|
|
328
|
-
* (packages/core/docs/contracts.md)
|
|
329
|
-
*/
|
|
294
|
+
/** What a version must be to count, judged by readers: `check` conditions and a `line` (packages/core/docs/contracts.md) */
|
|
330
295
|
readonly contract?: CollectionContract | {
|
|
331
296
|
readonly check?: ReadonlyArray<Contract> | ((scope: never) => Readonly<Record<string, unknown>>);
|
|
332
297
|
readonly line?: Line;
|
|
333
298
|
};
|
|
334
|
-
/**
|
|
335
|
-
* Values every app derives the same way from what links to its records, in CEL or built in
|
|
336
|
-
* TypeScript (packages/core/docs/computed.md)
|
|
337
|
-
*/
|
|
299
|
+
/** Values derived from what links to its records (packages/core/docs/computed.md) */
|
|
338
300
|
readonly computed?: ComputedFields | ((scope: never) => ComputedResult);
|
|
339
301
|
}
|
|
340
302
|
export interface NodeCollections {
|
|
@@ -344,7 +306,7 @@ export interface NodeCollections {
|
|
|
344
306
|
define(spaceId: string, definition: DefineCollection): Promise<NodeCollection>;
|
|
345
307
|
/** Takes a definition out of the space; refused while the collection still has records */
|
|
346
308
|
delete(spaceId: string, name: string): Promise<void>;
|
|
347
|
-
/** The topic tag a record with this value carries
|
|
309
|
+
/** The topic tag a record with this value carries; keyed in a private space, so only members can work it out */
|
|
348
310
|
tag(spaceId: string, collection: string, field: string, value: string | number | boolean): Promise<string>;
|
|
349
311
|
}
|
|
350
312
|
/** A version under its collection's contract: `passes` null when it has none, or this node can't judge it */
|
|
@@ -355,7 +317,7 @@ export interface RecordContracts {
|
|
|
355
317
|
readonly reason?: string;
|
|
356
318
|
/** A version it cites, or the one before it, hasn't arrived yet */
|
|
357
319
|
readonly pending?: true;
|
|
358
|
-
/** Its collection declares something this library doesn't know
|
|
320
|
+
/** Its collection declares something this library doesn't know, so it is neither counted nor failed */
|
|
359
321
|
readonly unjudged?: true;
|
|
360
322
|
}
|
|
361
323
|
export interface ListOptions {
|
|
@@ -378,32 +340,28 @@ export interface SpaceStatus {
|
|
|
378
340
|
readonly connection: ConnectionState;
|
|
379
341
|
/** Peers currently connected in this space */
|
|
380
342
|
readonly peers: ReadonlyArray<string>;
|
|
381
|
-
/** Of `peers`, this account's own other devices and apps
|
|
343
|
+
/** Of `peers`, this account's own other devices and apps */
|
|
382
344
|
readonly own: ReadonlyArray<string>;
|
|
383
|
-
/** Of `peers`, carriers the account uses
|
|
345
|
+
/** Of `peers`, carriers the account uses */
|
|
384
346
|
readonly carriers: ReadonlyArray<string>;
|
|
385
|
-
/** The account each peer showed it acts for, by
|
|
347
|
+
/** The account each peer showed it acts for, by session DID */
|
|
386
348
|
readonly accounts: Readonly<Record<string, string>>;
|
|
387
|
-
/** A fingerprint of every version
|
|
349
|
+
/** A fingerprint of every version kept here: equal on two nodes means identical data */
|
|
388
350
|
readonly fingerprint: string;
|
|
389
351
|
/** Records peers sent that failed validation */
|
|
390
352
|
readonly rejected: number;
|
|
391
|
-
/** What this node holds of the space: `all`, or the collections it uses
|
|
353
|
+
/** What this node holds of the space: `all`, or the collections it uses */
|
|
392
354
|
readonly holds: 'all' | ReadonlyArray<string>;
|
|
393
|
-
/** Writes of this node's that haven't reached enough keepers yet
|
|
355
|
+
/** Writes of this node's that haven't reached enough keepers yet */
|
|
394
356
|
readonly pending: number;
|
|
395
357
|
}
|
|
396
358
|
/** A live message as it arrives: what was sent, and who sent it */
|
|
397
359
|
export interface LiveMessage {
|
|
398
|
-
/** The account
|
|
360
|
+
/** The sender's account, proven by its note; null for a peer that showed none */
|
|
399
361
|
readonly from: string | null;
|
|
400
|
-
/** The sending device
|
|
362
|
+
/** The sending device's session DID, where a reply to it goes */
|
|
401
363
|
readonly peer: string;
|
|
402
|
-
/**
|
|
403
|
-
* Whether the sender's note writes records in some space but can't define
|
|
404
|
-
* collections in this one, judged on the whole note so a key for another
|
|
405
|
-
* space is caught too. False for a note that only reads, which writes nothing.
|
|
406
|
-
*/
|
|
364
|
+
/** Whether the sender's note writes records but can't define collections here (false for a read-only note) */
|
|
407
365
|
readonly recordsOnly: boolean;
|
|
408
366
|
readonly message: unknown;
|
|
409
367
|
}
|
|
@@ -436,7 +394,7 @@ export type NodeEvent =
|
|
|
436
394
|
readonly type: 'message';
|
|
437
395
|
readonly space: string;
|
|
438
396
|
} & LiveMessage)
|
|
439
|
-
/** The note this node writes under was revoked in a space
|
|
397
|
+
/** The note this node writes under was revoked in a space */
|
|
440
398
|
| {
|
|
441
399
|
readonly type: 'revoked';
|
|
442
400
|
readonly space: string;
|
|
@@ -449,16 +407,16 @@ export type NodeEvent =
|
|
|
449
407
|
export interface NodeNetwork {
|
|
450
408
|
/** Where each relay and connection stands. No relays when none are configured. */
|
|
451
409
|
status(): MeshStatus;
|
|
452
|
-
/** Tries every relay
|
|
410
|
+
/** Tries every relay waiting to reconnect, now */
|
|
453
411
|
reconnect(): void;
|
|
454
412
|
}
|
|
455
413
|
/** Who someone is in a space: the name they gave there, by their identity */
|
|
456
414
|
export interface SpaceProfile {
|
|
457
|
-
/** Their identity
|
|
415
|
+
/** Their identity, as `root` and `createdBy` on a record name it */
|
|
458
416
|
readonly did: string;
|
|
459
417
|
readonly name: string;
|
|
460
418
|
readonly updatedAt: string;
|
|
461
|
-
/**
|
|
419
|
+
/** Their contact key's public half, which a contact request is sealed to */
|
|
462
420
|
readonly contactKey?: string;
|
|
463
421
|
/** Their picture, a file in this space: read it with `records.readFile` */
|
|
464
422
|
readonly avatar?: FileRef;
|
|
@@ -467,85 +425,66 @@ export interface NodeSpaces {
|
|
|
467
425
|
list(): Promise<ReadonlyArray<SpaceSummary>>;
|
|
468
426
|
get(spaceId: string): Promise<SpaceSummary | null>;
|
|
469
427
|
create(params: NewSpace): Promise<SpaceSummary>;
|
|
470
|
-
/** An invite string
|
|
428
|
+
/** An invite string. For a private space it carries the key: treat it as a secret */
|
|
471
429
|
invite(spaceId: string, options?: InviteOptions): Promise<string>;
|
|
472
430
|
/** What an invite or link is for; a short link is fetched from its mailboxes first */
|
|
473
431
|
preview(invite: string): Promise<InvitePreview>;
|
|
474
|
-
/** Joins a space from an invite. `memberKey
|
|
432
|
+
/** Joins a space from an invite. `memberKey` lets a node without the account key receive new space keys */
|
|
475
433
|
join(invite: string, options?: {
|
|
476
434
|
readonly memberKey?: Uint8Array;
|
|
477
435
|
}): Promise<SpaceSummary>;
|
|
478
|
-
/** Gives up the account's place in a space
|
|
436
|
+
/** Gives up the account's place in a space, then forgets it and its key here */
|
|
479
437
|
leave(spaceId: string): Promise<void>;
|
|
480
438
|
/** Roles, members and invites, as the space's access history says now */
|
|
481
439
|
access(spaceId: string): Promise<SpaceAccess>;
|
|
482
440
|
/** Whether this account, or `account`, may invoke a command with these arguments in a space now (spec 03 §2) */
|
|
483
441
|
may(spaceId: string, cmd: string, args?: Readonly<Record<string, unknown>>, account?: string): Promise<boolean>;
|
|
484
|
-
/**
|
|
485
|
-
* Whether this account, or `account`, holds every grant a role gives, each as
|
|
486
|
-
* wide or wider: what it may hand to a bot or an agent without handing on
|
|
487
|
-
* more than it holds. Compares the policies' words, so it may say no where
|
|
488
|
-
* they would allow, never yes where they wouldn't.
|
|
489
|
-
*/
|
|
442
|
+
/** Whether this account, or `account`, holds every grant of a role at least as wide; may say no wrongly, never yes */
|
|
490
443
|
holdsRole(spaceId: string, role: string, account?: string): Promise<boolean>;
|
|
491
|
-
/** Writes a role's definition, replacing the ones
|
|
444
|
+
/** Writes a role's definition, replacing the ones held. Needs `/role/define` */
|
|
492
445
|
defineRole(spaceId: string, role: SpaceRole): Promise<void>;
|
|
493
446
|
/** Assigns a role to an account. Needs `/role/assign` */
|
|
494
447
|
assign(spaceId: string, did: string, role: string): Promise<void>;
|
|
495
|
-
/** Takes a role from an account
|
|
448
|
+
/** Takes a role from an account. Needs `/role/unassign`, unless it is your own */
|
|
496
449
|
unassign(spaceId: string, did: string, role: string): Promise<void>;
|
|
497
|
-
/** Removes an account and
|
|
450
|
+
/** Removes an account and its roles. Needs `/member/remove`, unless it is you */
|
|
498
451
|
removeMember(spaceId: string, did: string): Promise<void>;
|
|
499
|
-
/**
|
|
500
|
-
* Stops being a founder and stays, with the roles you hold: given `keep`,
|
|
501
|
-
* you take that role first. To go altogether, `leave`. Only a founder steps
|
|
502
|
-
* down, and only itself
|
|
503
|
-
*/
|
|
452
|
+
/** Stops being a founder but stays, taking role `keep` first when given */
|
|
504
453
|
stepDown(spaceId: string, options?: {
|
|
505
454
|
readonly keep?: string;
|
|
506
455
|
}): Promise<void>;
|
|
507
|
-
/**
|
|
508
|
-
* Names a space that succeeds this one (its constitution's `succeeds`
|
|
509
|
-
* naming this one). It changes nothing here. Needs `/space/succeed`, or,
|
|
510
|
-
* where no member holds it, a place here
|
|
511
|
-
*/
|
|
456
|
+
/** Names a space that succeeds this one. Needs `/space/succeed`, or a place here when no one holds it */
|
|
512
457
|
succeed(spaceId: string, successor: string): Promise<void>;
|
|
513
|
-
/** Closes an invite
|
|
458
|
+
/** Closes an invite, by link or by its key from `access().invites`. Who joined with it stays. */
|
|
514
459
|
closeInvite(spaceId: string, keyOrLink: string): Promise<void>;
|
|
515
|
-
/** Gives a private space a new key,
|
|
460
|
+
/** Gives a private space a new key, for a lost device. Needs `/key/change` */
|
|
516
461
|
changeKey(spaceId: string): Promise<void>;
|
|
517
|
-
/** Names the relays (wss://, at most 8) the space's members meet on
|
|
462
|
+
/** Names the relays (wss://, at most 8) the space's members meet on. Needs `/space/relays` */
|
|
518
463
|
setRelays(spaceId: string, relays: ReadonlyArray<string>): Promise<void>;
|
|
519
464
|
/** Names the nodes that keep the space whole (at most 16), and how many a write should reach. Needs `/space/keepers` */
|
|
520
465
|
setKeepers(spaceId: string, keepers: ReadonlyArray<Keeper>, copies?: number | null): Promise<void>;
|
|
521
466
|
/**
|
|
522
|
-
* Revokes one of this account's keys
|
|
523
|
-
* With `waitMs`, waits
|
|
467
|
+
* Revokes one of this account's keys, by DID: nothing it writes counts from then on.
|
|
468
|
+
* With `waitMs`, waits that long for a peer to take it in: true when one did, or with no wait.
|
|
524
469
|
*/
|
|
525
470
|
revoke(spaceId: string, key: string, options?: RevokeOptions): Promise<boolean>;
|
|
526
471
|
/** Keeps a space syncing until the function it returns is called; it stops once nothing holds it */
|
|
527
472
|
hold(spaceId: string): Promise<() => Promise<void>>;
|
|
528
|
-
/** A live message to
|
|
473
|
+
/** A live message (at most 64 KB) to peers connected now, `to` an account or a session DID; kept nowhere */
|
|
529
474
|
send(spaceId: string, message: unknown, to?: string): Promise<void>;
|
|
530
475
|
status(spaceId: string): Promise<SpaceStatus>;
|
|
531
|
-
/**
|
|
532
|
-
* Waits up to `waitMs` (default 3 s) for one of the account's carriers that
|
|
533
|
-
* is connected now to hold everything this node does of a space, so an
|
|
534
|
-
* invite to it works with every device of the account away. False at once
|
|
535
|
-
* when no carrier is connected, and false when it didn't catch up in time.
|
|
536
|
-
*/
|
|
476
|
+
/** Waits up to `waitMs` (default 3 s) for a connected carrier to hold all this node does of a space */
|
|
537
477
|
carried(spaceId: string, options?: {
|
|
538
478
|
readonly waitMs?: number;
|
|
539
479
|
}): Promise<boolean>;
|
|
480
|
+
/** Waits up to `waitMs` (at most a minute) for one peer, by its key, to hold all this node does of a space; for a node about to close */
|
|
481
|
+
reached(spaceId: string, peer: string, waitMs: number): Promise<boolean>;
|
|
540
482
|
/** How a node serving this space checks connecting peers and signs its welcome; null for a space it does not hold */
|
|
541
483
|
authenticator(spaceId: string): Promise<ServerAuth | null>;
|
|
542
|
-
/** The name each person gave in this space
|
|
484
|
+
/** The name each person gave in this space; yours is published from the account's name */
|
|
543
485
|
profiles(spaceId: string): Promise<ReadonlyArray<SpaceProfile>>;
|
|
544
486
|
}
|
|
545
|
-
/**
|
|
546
|
-
* A file a body refers to, as `records.addFile` gives it: what names it on a
|
|
547
|
-
* version (`hash`, `size`), what opens it (`key`, `salt`), and what it is.
|
|
548
|
-
*/
|
|
487
|
+
/** A file a body refers to, as `records.addFile` gives it */
|
|
549
488
|
export interface FileRef {
|
|
550
489
|
readonly hash: string;
|
|
551
490
|
readonly size: number;
|
|
@@ -559,63 +498,43 @@ export interface NodeRecords {
|
|
|
559
498
|
list<T = unknown>(spaceId: string, options?: ListOptions): Promise<ReadonlyArray<NodeRecord<T>>>;
|
|
560
499
|
/** A record's current version, or null when there is none or it was deleted */
|
|
561
500
|
get<T = unknown>(spaceId: string, key: string): Promise<NodeRecord<T> | null>;
|
|
562
|
-
/**
|
|
563
|
-
* How a record's newest version that stands fares under its collection's
|
|
564
|
-
* contract, or the version named. A version that fails is kept and synced
|
|
565
|
-
* by every peer, but `get`, `list` and queries count only versions that
|
|
566
|
-
* pass (packages/core/docs/contracts.md).
|
|
567
|
-
*/
|
|
501
|
+
/** How a record's newest standing version, or the one named, fares under its collection's contract */
|
|
568
502
|
contracts(spaceId: string, key: string, version?: string): Promise<RecordContracts | null>;
|
|
569
|
-
/**
|
|
570
|
-
* The key `name` has in an account's namespace (this one's unless another
|
|
571
|
-
* is named): where `put(…, { key: name })` writes. Keys belong to the
|
|
572
|
-
* account that creates them (packages/core/docs/records-and-queries.md#keys).
|
|
573
|
-
*/
|
|
503
|
+
/** The key `name` has in an account's namespace (this one's by default): where `put(…, { key: name })` writes */
|
|
574
504
|
keyFor(spaceId: string, name: string, account?: string): Promise<string>;
|
|
575
|
-
/**
|
|
576
|
-
* The key a record with this body and links has under its collection's
|
|
577
|
-
* `onePer`, written by `account` (this one unless named): null when the
|
|
578
|
-
* collection has no `onePer`, or the body lacks a part it names.
|
|
579
|
-
*/
|
|
505
|
+
/** The key a record with this body has under its collection's `onePer`; null when there is none */
|
|
580
506
|
onePerKey(spaceId: string, collection: string, body: unknown, options?: {
|
|
581
507
|
links?: ReadonlyArray<Link>;
|
|
582
508
|
account?: string;
|
|
583
509
|
}): Promise<string | null>;
|
|
584
|
-
/**
|
|
585
|
-
* Creates a record, under a fresh key of this account's, or the name given
|
|
586
|
-
* as `key` in its namespace. Writing a deleted key brings it back
|
|
587
|
-
*/
|
|
510
|
+
/** Creates a record under a fresh key, or `key` in this account's namespace. Writing a deleted key brings it back. */
|
|
588
511
|
put<T = unknown>(spaceId: string, collection: string, body: T, options?: {
|
|
589
512
|
key?: string;
|
|
590
513
|
links?: ReadonlyArray<Link>;
|
|
591
514
|
}): Promise<NodeRecord<T>>;
|
|
592
|
-
/** The same,
|
|
515
|
+
/** The same, typed by the collection's definition */
|
|
593
516
|
put<C extends {
|
|
594
517
|
readonly name: string;
|
|
595
518
|
}>(spaceId: string, collection: C, body: BodyOf<C>, options?: {
|
|
596
519
|
key?: string;
|
|
597
520
|
links?: ReadonlyArray<Link>;
|
|
598
521
|
}): Promise<NodeRecord<BodyOf<C>>>;
|
|
599
|
-
/** Writes the record's next version
|
|
522
|
+
/** Writes the record's next version; links carry over unless given */
|
|
600
523
|
update<T = unknown>(spaceId: string, key: string, body: T, options?: {
|
|
601
524
|
links?: ReadonlyArray<Link>;
|
|
602
525
|
}): Promise<NodeRecord<T>>;
|
|
603
|
-
/** The records whose current version points at this one
|
|
526
|
+
/** The records whose current version points at this one, optionally by role or collection */
|
|
604
527
|
linked<T = unknown>(spaceId: string, key: string, options?: {
|
|
605
528
|
rel?: string;
|
|
606
529
|
collection?: string;
|
|
607
530
|
}): Promise<ReadonlyArray<NodeRecord<T>>>;
|
|
608
531
|
/** Deletes a record everywhere, by writing a version marked deleted */
|
|
609
532
|
delete(spaceId: string, key: string): Promise<void>;
|
|
610
|
-
/** The versions of a record kept here, newest first
|
|
533
|
+
/** The versions of a record kept here, newest first */
|
|
611
534
|
history<T = unknown>(spaceId: string, key: string): Promise<ReadonlyArray<NodeRecord<T>>>;
|
|
612
|
-
/** Whether this account may `create` in a collection
|
|
535
|
+
/** Whether this account may `create` in a collection, or `edit` / `delete` a record; `target` names it */
|
|
613
536
|
can(spaceId: string, action: 'create' | 'edit' | 'delete', target: string): Promise<boolean>;
|
|
614
|
-
/**
|
|
615
|
-
* Seals a file under a key of its own, keeps it, and gives back the
|
|
616
|
-
* reference to put in a body: a version whose body holds it names the file
|
|
617
|
-
* on its outside, so peers fetch and keep it (spec 05 §16.6).
|
|
618
|
-
*/
|
|
537
|
+
/** Seals and keeps a file, giving the reference to put in a body (spec 05 §16.6) */
|
|
619
538
|
addFile(spaceId: string, bytes: Uint8Array, about: {
|
|
620
539
|
mime: string;
|
|
621
540
|
name?: string;
|
|
@@ -632,7 +551,7 @@ export interface NodeRecords {
|
|
|
632
551
|
}
|
|
633
552
|
export interface AccountProfileView {
|
|
634
553
|
readonly name: string;
|
|
635
|
-
/** The account's picture, a file in its registry
|
|
554
|
+
/** The account's picture, a file in its registry */
|
|
636
555
|
readonly avatar?: FileRef;
|
|
637
556
|
/** When it was set, on whichever device set it */
|
|
638
557
|
readonly updatedAt: string;
|
|
@@ -649,11 +568,7 @@ export interface CarrierSummary {
|
|
|
649
568
|
/** Nodes that keep the account's spaces online without reading them (`space/pass.ts`). Needs the account key */
|
|
650
569
|
export interface NodeCarriers {
|
|
651
570
|
list(): Promise<ReadonlyArray<CarrierSummary>>;
|
|
652
|
-
/**
|
|
653
|
-
* Starts using a carrier: a carry space with a pass for every space, kept
|
|
654
|
-
* current by every device. Its invite is the carrier's. The same carrier
|
|
655
|
-
* again, by DID, gets the carry space it has.
|
|
656
|
-
*/
|
|
571
|
+
/** Starts using a carrier: a carry space with a pass for every space, and the invite to give it */
|
|
657
572
|
add(carrier: {
|
|
658
573
|
readonly did: string;
|
|
659
574
|
readonly name: string;
|
|
@@ -661,20 +576,9 @@ export interface NodeCarriers {
|
|
|
661
576
|
readonly space: string;
|
|
662
577
|
readonly invite: string;
|
|
663
578
|
}>;
|
|
664
|
-
/**
|
|
665
|
-
* Waits up to `waitMs` for the carrier to hold what this node wrote for it:
|
|
666
|
-
* level with it in its carry space, then in the account registry. A node
|
|
667
|
-
* about to close — the home's window, once it has answered — waits for this,
|
|
668
|
-
* or nobody may hand the carrier its passes until the home opens again.
|
|
669
|
-
*/
|
|
579
|
+
/** Waits up to `waitMs` for the carrier to hold what this node wrote for it; for a node about to close */
|
|
670
580
|
reached(space: string, waitMs: number): Promise<boolean>;
|
|
671
|
-
/**
|
|
672
|
-
* Waits up to `waitMs` for every carrier's carry space to hold the passes
|
|
673
|
-
* and wakes as they are now, written here, and says whether it does. They
|
|
674
|
-
* are written in the background: adding a carrier or an automation doesn't
|
|
675
|
-
* wait, so a node about to close waits on this. It covers a refill already
|
|
676
|
-
* started, or asked for, and is true at once when there is none.
|
|
677
|
-
*/
|
|
581
|
+
/** Waits up to `waitMs` for the passes and wakes written in the background to be done; for a node about to close */
|
|
678
582
|
settled(waitMs: number): Promise<boolean>;
|
|
679
583
|
/** Stops using a carrier: its passes go, and it is told to forget what it held */
|
|
680
584
|
remove(space: string): Promise<void>;
|
|
@@ -684,11 +588,7 @@ export interface OwnAutomationView extends Automation {
|
|
|
684
588
|
/** Its record key in the registry */
|
|
685
589
|
readonly id: string;
|
|
686
590
|
}
|
|
687
|
-
/**
|
|
688
|
-
* "Let me know when…": the account's own automations, across its spaces,
|
|
689
|
-
* noticed by its carriers, which get each value as a topic tag. Needs the
|
|
690
|
-
* account key.
|
|
691
|
-
*/
|
|
591
|
+
/** "Let me know when…": the account's own automations, noticed by its carriers. Needs the account key. */
|
|
692
592
|
export interface NodeAutomations {
|
|
693
593
|
list(): Promise<ReadonlyArray<OwnAutomationView>>;
|
|
694
594
|
/** Starts one: `when.query` is a collection and a `where` over each new record, `$me` the account */
|
|
@@ -717,66 +617,55 @@ export interface HostingView {
|
|
|
717
617
|
/** The subscription — the key the account made for this host */
|
|
718
618
|
readonly subscription: string;
|
|
719
619
|
readonly since: string;
|
|
720
|
-
/** How the subscription stands, as the host signed it: now when `live`, else
|
|
721
|
-
readonly status:
|
|
620
|
+
/** How the subscription stands, as the host signed it: now when `live`, else last heard */
|
|
621
|
+
readonly status: HostStatus | null;
|
|
722
622
|
/** Whether `status` is what the host said just now */
|
|
723
623
|
readonly live: boolean;
|
|
724
624
|
/** Why it could not be reached */
|
|
725
625
|
readonly error?: string;
|
|
726
|
-
/** How the account's balance there is added to
|
|
727
|
-
readonly fund:
|
|
626
|
+
/** How the account's balance there is added to; null when it takes no payments or can't be reached */
|
|
627
|
+
readonly fund: FundOffer | null;
|
|
728
628
|
/** Whether it sends reminders by email (`remind`) */
|
|
729
629
|
readonly reminds: boolean;
|
|
730
630
|
}
|
|
731
|
-
/**
|
|
732
|
-
* Hosts: carriers the account pays for, online when every device is off. A
|
|
733
|
-
* device never handles a payment (spec/06-nodes-and-sessions.md, Hosts).
|
|
734
|
-
*/
|
|
631
|
+
/** Hosts: carriers the account pays for (spec/06-nodes-and-sessions.md, Hosts) */
|
|
735
632
|
export interface NodeHosting {
|
|
736
|
-
/** The hosts the account uses, each asked how it stands
|
|
633
|
+
/** The hosts the account uses, each asked how it stands; a host paid since gets the spaces */
|
|
737
634
|
list(): Promise<ReadonlyArray<HostingView>>;
|
|
738
635
|
/** Starts using a host: a subscription key every device signs as, and the spaces once it is paid */
|
|
739
636
|
use(url: string): Promise<HostingView>;
|
|
740
|
-
/** Adds to the account's balance at a host: a `checkout` page to open
|
|
741
|
-
pay(url: string, payment:
|
|
742
|
-
/** Asks a host for reminders by email before paid time runs out
|
|
637
|
+
/** Adds to the account's balance at a host: a `checkout` page to open, or a `request` for a wallet */
|
|
638
|
+
pay(url: string, payment: FundPayment): Promise<PayAnswer>;
|
|
639
|
+
/** Asks a host for reminders by email before paid time runs out */
|
|
743
640
|
remind(url: string, email: string): Promise<void>;
|
|
744
|
-
/** Stops using a host: it forgets the spaces
|
|
641
|
+
/** Stops using a host: it forgets the spaces. Cancel a renewing card first (`manage`). */
|
|
745
642
|
stop(url: string): Promise<void>;
|
|
746
|
-
/** The hosts a space pays (`std.host`), each asked how
|
|
643
|
+
/** The hosts a space pays (`std.host`), each asked how it stands; one paid gets the pass */
|
|
747
644
|
space(spaceId: string): Promise<ReadonlyArray<SpaceHostingView>>;
|
|
748
|
-
/**
|
|
749
|
-
* The account's hosts that last said a space is over their free line
|
|
750
|
-
* (spec 08 §1.1), from the statuses they signed: what a member is told
|
|
751
|
-
* before those hosts stop carrying it for members. Asks no host.
|
|
752
|
-
*/
|
|
645
|
+
/** The account's hosts that last said a space is over their free line (spec 08 §1.1). Asks no host. */
|
|
753
646
|
over(spaceId: string): Promise<ReadonlyArray<{
|
|
754
647
|
readonly url: string;
|
|
755
648
|
readonly name: string;
|
|
756
|
-
readonly over:
|
|
649
|
+
readonly over: OverSpace;
|
|
757
650
|
}>>;
|
|
758
|
-
/**
|
|
759
|
-
payForSpace(spaceId: string, url: string, payment:
|
|
651
|
+
/** Adds to a space's fund at a host it names, once or monthly. Anyone in it may. */
|
|
652
|
+
payForSpace(spaceId: string, url: string, payment: FundPayment): Promise<PayAnswer>;
|
|
760
653
|
/** Asks a host a space names for reminders by email before the space's paid time runs out */
|
|
761
654
|
remindForSpace(spaceId: string, url: string, email: string): Promise<void>;
|
|
762
|
-
/**
|
|
763
|
-
* Stops a space using a host: its `std.host` record goes, and with `manage`
|
|
764
|
-
* its bots are removed and a private space gets a new key. Nothing is asked
|
|
765
|
-
* of the host.
|
|
766
|
-
*/
|
|
655
|
+
/** Stops a space using a host: its `std.host` record goes, and with `manage` its bots and key */
|
|
767
656
|
stopForSpace(spaceId: string, url: string): Promise<{
|
|
768
657
|
/** The bots removed from the space, by DID */
|
|
769
658
|
readonly bots: ReadonlyArray<string>;
|
|
770
659
|
/** Whether the space's key changes because of it */
|
|
771
660
|
readonly newKey: boolean;
|
|
772
661
|
}>;
|
|
773
|
-
/** Asks a host the space names to run a bot there
|
|
662
|
+
/** Asks a host the space names to run a bot there with `role`; removing the bot stops it */
|
|
774
663
|
startBot(spaceId: string, url: string, bot: {
|
|
775
664
|
readonly name: string;
|
|
776
665
|
readonly role?: string;
|
|
777
666
|
}): Promise<{
|
|
778
667
|
readonly bot: string;
|
|
779
|
-
readonly status:
|
|
668
|
+
readonly status: HostStatus;
|
|
780
669
|
}>;
|
|
781
670
|
}
|
|
782
671
|
/** A host a space pays for itself, as `hosting.space` sees it */
|
|
@@ -787,33 +676,30 @@ export interface SpaceHostingView {
|
|
|
787
676
|
/** The host's key; null when it could not be reached */
|
|
788
677
|
readonly host: string | null;
|
|
789
678
|
/** How the space's subscription stands there, signed by the host; null when it could not be asked */
|
|
790
|
-
readonly status:
|
|
679
|
+
readonly status: HostStatus | null;
|
|
791
680
|
/** Whether it keeps spaces for nothing: every subscription counts as paid there */
|
|
792
681
|
readonly free: boolean;
|
|
793
|
-
/** How the space's fund is added to there
|
|
794
|
-
readonly fund:
|
|
682
|
+
/** How the space's fund is added to there; null on a free host, or one that takes no communities */
|
|
683
|
+
readonly fund: FundOffer | null;
|
|
795
684
|
/** Whether it sends reminders by email (`remindForSpace`) */
|
|
796
685
|
readonly reminds: boolean;
|
|
797
686
|
/** Whether it runs bots for the spaces it carries (`startBot`) */
|
|
798
687
|
readonly runsBots: boolean;
|
|
799
|
-
/** The bots it runs in this space,
|
|
800
|
-
readonly bots: ReadonlyArray<
|
|
688
|
+
/** The bots it runs in this space, as its signed status says */
|
|
689
|
+
readonly bots: ReadonlyArray<HostedBot>;
|
|
801
690
|
/** The services its bots can be connected to (spec 08 §3.1) */
|
|
802
|
-
readonly connectors: ReadonlyArray<
|
|
691
|
+
readonly connectors: ReadonlyArray<HostConnectorOffer>;
|
|
803
692
|
/** Why it could not be asked, when it couldn't */
|
|
804
693
|
readonly error?: string;
|
|
805
694
|
}
|
|
806
695
|
export interface NodeAccount {
|
|
807
|
-
/** The account's profile
|
|
696
|
+
/** The account's profile; null without an account key, or before one is set */
|
|
808
697
|
profile(): Promise<AccountProfileView | null>;
|
|
809
|
-
/** Renames the account
|
|
698
|
+
/** Renames the account everywhere. Needs an account key. */
|
|
810
699
|
setName(name: string): Promise<AccountProfileView>;
|
|
811
700
|
/**
|
|
812
|
-
* Sets the account's picture
|
|
813
|
-
*
|
|
814
|
-
* takes it away. `name` is the account's name as the app knows it, kept
|
|
815
|
-
* with the picture when the registry has none yet (an app just connected,
|
|
816
|
-
* before the registry has synced). Needs an account key.
|
|
701
|
+
* Sets the account's picture everywhere, already resized; `null` removes it.
|
|
702
|
+
* `name` is kept with it when the registry has no name yet. Needs an account key.
|
|
817
703
|
*/
|
|
818
704
|
setAvatar(image: {
|
|
819
705
|
bytes: Uint8Array;
|
|
@@ -826,27 +712,43 @@ export interface NodeAccount {
|
|
|
826
712
|
bytes: Uint8Array;
|
|
827
713
|
mime: string;
|
|
828
714
|
} | null>;
|
|
829
|
-
/** Revokes one of this account's keys
|
|
715
|
+
/** Revokes one of this account's keys in the account registry. Needs an account key. */
|
|
830
716
|
revoke(key: string, options?: RevokeOptions): Promise<boolean>;
|
|
831
717
|
}
|
|
832
718
|
/** Someone in the account's contact list */
|
|
833
719
|
export interface ContactView {
|
|
834
720
|
/** Their account */
|
|
835
721
|
readonly did: string;
|
|
836
|
-
/** What you call them
|
|
722
|
+
/** What you call them; they never see it */
|
|
837
723
|
readonly name: string;
|
|
838
|
-
/**
|
|
724
|
+
/** Your space for two with them, or null */
|
|
839
725
|
readonly space: string | null;
|
|
840
726
|
readonly note?: string;
|
|
841
727
|
/** Their knocks are hidden, in every space and in your inbox */
|
|
842
728
|
readonly blocked: boolean;
|
|
729
|
+
/** Their username, when you found them by it */
|
|
730
|
+
readonly username?: string;
|
|
843
731
|
readonly updatedAt: string;
|
|
844
732
|
}
|
|
733
|
+
/** An invite to a space a contact left for you in your space for two */
|
|
734
|
+
export interface SpaceInviteView {
|
|
735
|
+
/** Who left it */
|
|
736
|
+
readonly from: string;
|
|
737
|
+
/** The space it invites you to, and what it is called */
|
|
738
|
+
readonly space: string;
|
|
739
|
+
readonly name: string;
|
|
740
|
+
/** What `spaces.join` takes */
|
|
741
|
+
readonly invite: string;
|
|
742
|
+
/** The space for two it was left in, and its record there: what `join` takes */
|
|
743
|
+
readonly pairSpace: string;
|
|
744
|
+
readonly key: string;
|
|
745
|
+
readonly createdAt: string;
|
|
746
|
+
}
|
|
845
747
|
/** A knock left for this account in a space both belong to, opened */
|
|
846
748
|
export interface ContactRequest {
|
|
847
749
|
/** The space it was left in */
|
|
848
750
|
readonly space: string;
|
|
849
|
-
/** Its record there
|
|
751
|
+
/** Its record there: what `accept` takes */
|
|
850
752
|
readonly key: string;
|
|
851
753
|
/** The account asking */
|
|
852
754
|
readonly from: string;
|
|
@@ -857,9 +759,9 @@ export interface ContactRequest {
|
|
|
857
759
|
readonly pairSpace: string;
|
|
858
760
|
readonly createdAt: string;
|
|
859
761
|
}
|
|
860
|
-
/** The account's contacts: each a private space for two, listed in the
|
|
762
|
+
/** The account's contacts: each a private space for two, listed in the contacts space */
|
|
861
763
|
export interface NodeContacts {
|
|
862
|
-
/** The contacts space's id
|
|
764
|
+
/** The contacts space's id, or null for a node not given it */
|
|
863
765
|
space(): Promise<string | null>;
|
|
864
766
|
/** Everyone in the list, blocked people too, by name */
|
|
865
767
|
list(): Promise<ReadonlyArray<ContactView>>;
|
|
@@ -876,11 +778,8 @@ export interface NodeContacts {
|
|
|
876
778
|
/** Leaves your space for two, and hides their knocks from now on */
|
|
877
779
|
block(did: string): Promise<void>;
|
|
878
780
|
/**
|
|
879
|
-
* Asks someone in a space
|
|
880
|
-
*
|
|
881
|
-
* a `std.contact-request`. `carried` is whether a carrier held the space for two before
|
|
882
|
-
* it went out (`spaces.carried`): when false, they can join only while one
|
|
883
|
-
* of your devices is online.
|
|
781
|
+
* Asks someone in a shared space to add you: a space for two, its invite sealed
|
|
782
|
+
* to them as a `std.contact-request`. `carried`: whether a carrier held it first.
|
|
884
783
|
*/
|
|
885
784
|
ask(spaceId: string, did: string, options?: {
|
|
886
785
|
readonly note?: string;
|
|
@@ -889,12 +788,27 @@ export interface NodeContacts {
|
|
|
889
788
|
readonly request: string;
|
|
890
789
|
readonly carried: boolean;
|
|
891
790
|
}>;
|
|
892
|
-
/** Knocks left for this account in a space,
|
|
791
|
+
/** Knocks left for this account in a space, except blocked and accepted ones */
|
|
893
792
|
requests(spaceId: string): Promise<ReadonlyArray<ContactRequest>>;
|
|
894
793
|
/** Joins the space for two a knock invites you to, and puts whoever asked on your list */
|
|
895
794
|
accept(spaceId: string, requestKey: string): Promise<ContactView>;
|
|
896
|
-
/** Accounts in your space for two besides the two of you
|
|
795
|
+
/** Accounts in your space for two besides the two of you */
|
|
897
796
|
others(did: string): Promise<ReadonlyArray<string>>;
|
|
797
|
+
/**
|
|
798
|
+
* Invites a contact into one of your spaces: an invite for `role` (as
|
|
799
|
+
* `spaces.invite` makes one), left in your space for two with them. Only a
|
|
800
|
+
* contact who has joined that space can be invited.
|
|
801
|
+
*/
|
|
802
|
+
invite(did: string, spaceId: string, options?: {
|
|
803
|
+
readonly role?: string;
|
|
804
|
+
}): Promise<void>;
|
|
805
|
+
/**
|
|
806
|
+
* Invites your contacts left for you, to spaces you don't hold yet, newest
|
|
807
|
+
* first. Also closes invites of yours a contact has used, and deletes them.
|
|
808
|
+
*/
|
|
809
|
+
invites(): Promise<ReadonlyArray<SpaceInviteView>>;
|
|
810
|
+
/** Joins the space an invite from a contact is for; its maker closes the invite once they see you there */
|
|
811
|
+
join(pairSpace: string, key: string): Promise<SpaceSummary>;
|
|
898
812
|
}
|
|
899
813
|
/** A direct message, opened (`node.direct`) */
|
|
900
814
|
export interface DirectMessage {
|
|
@@ -904,7 +818,7 @@ export interface DirectMessage {
|
|
|
904
818
|
readonly from: string;
|
|
905
819
|
/** Who it is for, sorted, not counting `from` */
|
|
906
820
|
readonly to: ReadonlyArray<string>;
|
|
907
|
-
/** Null when this node can't open it
|
|
821
|
+
/** Null when this node can't open it */
|
|
908
822
|
readonly text: string | null;
|
|
909
823
|
readonly createdAt: string;
|
|
910
824
|
/** Written under a note that grants records only here, as `NodeRecord.recordsOnly` */
|
|
@@ -912,9 +826,9 @@ export interface DirectMessage {
|
|
|
912
826
|
}
|
|
913
827
|
/** Direct messages: text sealed to some members' member keys, in a private space (`docs/direct-messages.md`) */
|
|
914
828
|
export interface NodeDirect {
|
|
915
|
-
/**
|
|
829
|
+
/** Members who published a member key, besides you */
|
|
916
830
|
reachable(spaceId: string): Promise<ReadonlyArray<string>>;
|
|
917
|
-
/** Seals text for these members and you, and writes it
|
|
831
|
+
/** Seals text for these members and you, and writes it, defining `std.direct` when needed */
|
|
918
832
|
send(spaceId: string, to: ReadonlyArray<string>, text: string): Promise<DirectMessage>;
|
|
919
833
|
/** Every direct message in the space written by or to this account, oldest first */
|
|
920
834
|
list(spaceId: string): Promise<ReadonlyArray<DirectMessage>>;
|
|
@@ -927,19 +841,22 @@ export interface InboxView {
|
|
|
927
841
|
readonly name?: string;
|
|
928
842
|
/** The inbox key's public half: knocks are sealed to it */
|
|
929
843
|
readonly key: string;
|
|
930
|
-
/** Its signing key's public half
|
|
844
|
+
/** Its signing key's public half, which signs the code */
|
|
931
845
|
readonly sign: string;
|
|
932
846
|
/** Mailboxes that hold its knocks */
|
|
933
847
|
readonly places: ReadonlyArray<string>;
|
|
934
|
-
/** The inbox code to hand out
|
|
848
|
+
/** The inbox code to hand out, in a link (`#inbox=…`) or a QR code */
|
|
935
849
|
readonly code: string;
|
|
850
|
+
/** The username that leads to it, and when it lapses unless claimed again (ms) */
|
|
851
|
+
readonly username?: string;
|
|
852
|
+
readonly usernameUntil?: number;
|
|
936
853
|
readonly updatedAt: string;
|
|
937
854
|
}
|
|
938
855
|
/** Someone knocking on your inbox, checked and opened */
|
|
939
856
|
export interface KnockView {
|
|
940
857
|
/** The knock's id, the same on every relay: what `accept` takes */
|
|
941
858
|
readonly id: string;
|
|
942
|
-
/** Their account
|
|
859
|
+
/** Their account, proven by signature and note */
|
|
943
860
|
readonly from: string;
|
|
944
861
|
/** The name they give; nothing vouches for it */
|
|
945
862
|
readonly name: string;
|
|
@@ -955,25 +872,35 @@ export interface SentKnockView {
|
|
|
955
872
|
readonly space: string;
|
|
956
873
|
/** The name their inbox code gave */
|
|
957
874
|
readonly name: string;
|
|
875
|
+
/** The username you knocked on, when it was one */
|
|
876
|
+
readonly username?: string;
|
|
958
877
|
readonly at: string;
|
|
959
878
|
}
|
|
960
|
-
/** The inbox: how people you share no space with ask to become your contact
|
|
879
|
+
/** The inbox: how people you share no space with ask to become your contact (`spec/07-inbox.md`) */
|
|
961
880
|
export interface NodeInbox {
|
|
962
881
|
/** Your inbox, or null until it is opened */
|
|
963
882
|
get(): Promise<InboxView | null>;
|
|
964
|
-
/** Opens your inbox, or changes
|
|
883
|
+
/** Opens your inbox, or changes its mailboxes (1–3) and the name its code gives */
|
|
965
884
|
open(options?: {
|
|
966
885
|
readonly places?: ReadonlyArray<string>;
|
|
967
886
|
readonly name?: string;
|
|
968
887
|
}): Promise<InboxView>;
|
|
969
|
-
/** Replaces your inbox
|
|
888
|
+
/** Replaces your inbox: codes for the old one lead nowhere */
|
|
970
889
|
rotate(): Promise<InboxView>;
|
|
971
|
-
/** Clears every knock waiting in your inbox
|
|
890
|
+
/** Clears every knock waiting in your inbox, and keeps it open */
|
|
972
891
|
clear(): Promise<void>;
|
|
973
892
|
/**
|
|
974
|
-
*
|
|
975
|
-
*
|
|
976
|
-
*
|
|
893
|
+
* Claims a username (`leif@minca.social`) for your inbox on its domain's
|
|
894
|
+
* name service, opening the inbox first if need be. The name follows the
|
|
895
|
+
* inbox: replacing it, or changing its name or mailboxes, points the name at
|
|
896
|
+
* the new code, and it is renewed before it lapses.
|
|
897
|
+
*/
|
|
898
|
+
claim(username: string): Promise<InboxView>;
|
|
899
|
+
/** Gives your username up: it leads nowhere, and anyone may claim it */
|
|
900
|
+
release(): Promise<InboxView>;
|
|
901
|
+
/**
|
|
902
|
+
* Knocks on someone's inbox, by its code, a link, or a username, with a
|
|
903
|
+
* space for two; `carried` as for `contacts.ask`
|
|
977
904
|
*/
|
|
978
905
|
knock(code: string, options?: {
|
|
979
906
|
readonly note?: string;
|
|
@@ -981,13 +908,13 @@ export interface NodeInbox {
|
|
|
981
908
|
readonly space: string;
|
|
982
909
|
readonly carried: boolean;
|
|
983
910
|
}>;
|
|
984
|
-
/** Knocks waiting in your inbox
|
|
911
|
+
/** Knocks waiting in your inbox; also turns your knocks someone joined into contacts */
|
|
985
912
|
knocks(): Promise<ReadonlyArray<KnockView>>;
|
|
986
913
|
/** Knocks you left that nobody has joined yet */
|
|
987
914
|
sent(): Promise<ReadonlyArray<SentKnockView>>;
|
|
988
915
|
/** Joins the space for two a knock invites you to, and puts whoever knocked on your list */
|
|
989
916
|
accept(id: string): Promise<ContactView>;
|
|
990
|
-
/** Lets a knock go without blocking whoever knocked
|
|
917
|
+
/** Lets a knock go without blocking whoever knocked */
|
|
991
918
|
dismiss(id: string): Promise<void>;
|
|
992
919
|
}
|
|
993
920
|
export interface P2PNode {
|
|
@@ -1014,13 +941,12 @@ export interface P2PNode {
|
|
|
1014
941
|
readonly inbox: NodeInbox;
|
|
1015
942
|
/** The delegation the session key currently writes under (root → session) */
|
|
1016
943
|
delegation(): Delegation;
|
|
1017
|
-
/** ICE servers for the app's own WebRTC
|
|
944
|
+
/** ICE servers for the app's own WebRTC: the configured ones, and a relay's TURN servers */
|
|
1018
945
|
iceServers(): Promise<ReadonlyArray<RTCIceServer>>;
|
|
1019
946
|
/** Relays and connections, for showing why a peer is or is not there */
|
|
1020
947
|
readonly network: NodeNetwork;
|
|
1021
948
|
/**
|
|
1022
|
-
* The same node acting as an agent
|
|
1023
|
-
* its note names, refusing what needs a person (`node/api.ts`).
|
|
949
|
+
* The same node acting as an agent, only in the spaces its note names (`node/api.ts`).
|
|
1024
950
|
* @throws When the note is not an agent's, has run out, or is not made out to `keys`
|
|
1025
951
|
*/
|
|
1026
952
|
asAgent(agent: {
|
|
@@ -1029,19 +955,13 @@ export interface P2PNode {
|
|
|
1029
955
|
}): Promise<P2PNode>;
|
|
1030
956
|
subscribe(listener: (event: NodeEvent) => void): () => void;
|
|
1031
957
|
/**
|
|
1032
|
-
* Revokes a key of this account
|
|
1033
|
-
*
|
|
1034
|
-
* space it lists, its carry spaces, its contacts space and its registry.
|
|
1035
|
-
* True once a peer has taken each in, or at once without `waitMs`.
|
|
958
|
+
* Revokes a key of this account in `spaces`, or everywhere the account writes.
|
|
959
|
+
* True once a peer took each in, or at once without `waitMs`.
|
|
1036
960
|
*/
|
|
1037
961
|
revokeKey(key: string, options?: RevokeOptions & {
|
|
1038
962
|
readonly spaces?: ReadonlyArray<string>;
|
|
1039
963
|
}): Promise<boolean>;
|
|
1040
|
-
/**
|
|
1041
|
-
* Revokes this node's own session key everywhere (`revokeKey`); a lasting
|
|
1042
|
-
* key is forgotten at once, so the next session signs with a new one. For
|
|
1043
|
-
* signing out.
|
|
1044
|
-
*/
|
|
964
|
+
/** Revokes this node's own key everywhere and forgets a lasting one: for signing out */
|
|
1045
965
|
revokeSelf(options?: RevokeOptions): Promise<void>;
|
|
1046
966
|
close(): Promise<void>;
|
|
1047
967
|
}
|