pub struct Wallets { /* private fields */ }Expand description
Linking a person’s own EVM or Solana wallet to their signed-in account.
Implementations§
Source§impl Wallets
impl Wallets
Sourcepub fn builder() -> WalletsBuilder
pub fn builder() -> WalletsBuilder
A builder with no domain and no entropy source — not a working
composition until .domain(..) and .random(..) are set;
Module::self_check names what is missing.
Sourcepub fn new() -> Self
pub fn new() -> Self
Short for Wallets::builder().build().
Trait Implementations§
Source§impl Module for Wallets
impl Module for Wallets
Source§fn requires(&self) -> &'static [Port]
fn requires(&self) -> &'static [Port]
Nonces and links live in the database, and every route answers only to a signed-in caller — a wallet signature proves ownership of an address, never of a session.
Source§fn optional(&self) -> &'static [Port]
fn optional(&self) -> &'static [Port]
The Clock decides “now” for nonce and message expiry. The IdGen
names each link; without one the handler falls back to a derived id.
Source§fn personal_data(&self) -> &'static [PersonalDataSet]
fn personal_data(&self) -> &'static [PersonalDataSet]
Two subject-owned datasets, one per table.
wallet_nonces is an attempt in flight: who asked for a nonce, for
which chain, and when it lapsed. It says nothing about a wallet —
the address arrives in the signed message, and the row is deleted
once it expires whether or not it was ever spent.
wallet_links is the durable one: the address a person proved they
control, the chain it lives on and when it was linked. It is
Erase, because a person who deletes their account expects the
wallet they linked to it to go with it — a wallet address is a
durable identifier, not a receipt.
Source§fn validate_config(&self, _cfg: &dyn Config) -> Result<(), ConfigError>
fn validate_config(&self, _cfg: &dyn Config) -> Result<(), ConfigError>
No configuration keys of its own: the composition is what a venture
decides, and self_check reports a composition that cannot verify a
single signature.
Source§fn surface(&self) -> Surface
fn surface(&self) -> Surface
The four routes, all Audience::Subject.
They are RoutePolicy::Open at the gateway and authenticate
themselves, deliberately: the proof here is not a signed link or a
CAPTCHA but a signature over a message the caller had to be signed
in to fetch, and a CAPTCHA on a POST from a wallet extension
would be a widget nobody can solve. The handlers refuse an
anonymous or unidentified caller before touching a byte of body,
and Port::Auth is required, so a deployment cannot mount these
without a way to identify callers at all.
Source§fn scheduled<'a>(
&'a self,
ctx: &'a ModuleContext,
cron: &'a str,
) -> BoxFuture<'a, Result<(), AnyError>>
fn scheduled<'a>( &'a self, ctx: &'a ModuleContext, cron: &'a str, ) -> BoxFuture<'a, Result<(), AnyError>>
The scheduled purge: nonces past their expiry are deleted, spent or not. A spent nonce is already useless, and a lapsed one is the only kind worth reclaiming — leaving them would let the table grow without bound and leave rows describing when each account was trying to connect a wallet. One statement, so it spends one unit of the invocation’s budget (ADR 0023).
Source§fn tables(&self) -> &'static [&'static str]
fn tables(&self) -> &'static [&'static str]
Source§fn migrations(&self) -> Migrations
fn migrations(&self) -> Migrations
Source§fn self_check(&self) -> Vec<String>
fn self_check(&self) -> Vec<String>
Source§fn router(&self, ctx: ModuleContext) -> Router
fn router(&self, ctx: ModuleContext) -> Router
/v1/<name>.Source§fn harness_api(&self) -> u32
fn harness_api(&self) -> u32
Harness::build.Source§fn depends_on(&self) -> &'static [&'static str]
fn depends_on(&self) -> &'static [&'static str]
Source§fn actor_kinds(&self) -> &'static [&'static str]
fn actor_kinds(&self) -> &'static [&'static str]
[a-z0-9_-]; duplicates across
modules are a build error, and so is a kind with no handler registered
through
HarnessBuilder::actor. Read moreSource§fn emits(&self) -> &'static [&'static str]
fn emits(&self) -> &'static [&'static str]
"<module>.<event>"), listed by
/__health.Source§fn public_writes(&self) -> bool
fn public_writes(&self) -> bool
Source§fn public_write_policy(&self) -> RoutePolicy
fn public_write_policy(&self) -> RoutePolicy
RoutePolicy on
(issue #143). Read moreSource§fn signature_verification(&self) -> SignatureVerification
fn signature_verification(&self) -> SignatureVerification
RoutePolicy::Signature
deliveries (issue #533): how a webhook handler checks a machine
signature before acting. Read moreSource§fn max_body_bytes(&self, _cfg: &dyn Config) -> usize
fn max_body_bytes(&self, _cfg: &dyn Config) -> usize
Source§fn streaming_routes(&self) -> &'static [StreamRoute]
fn streaming_routes(&self) -> &'static [StreamRoute]
StreamRoute::max_bytes ceiling. Opt-in: the default
is empty, and every existing route keeps the buffered behaviour it
always had. Read moreSource§fn max_blob_object_bytes(&self) -> u64
fn max_blob_object_bytes(&self) -> u64
ScopedBlob the harness hands the module on
put_stream, upload_part and complete_multipart. Read moreSource§fn well_known(&self) -> Option<Router>
fn well_known(&self) -> Option<Router>
/.well-known, for
spec-mandated discovery documents (OIDC openid-configuration,
jwks.json) that must live outside /v1 (issue #46). Paths are
relative to the prefix: register /jwks.json, not
/.well-known/jwks.json. Read more