features/wallet/wallet_config
library
Extensions
-
WalletConfigBirthday
on WalletConfig
-
Copy this config with a different restore birthdayHeight (the SDK's
WalletConfig is FRB-generated and carries no copyWith). This is the ONE
place a config field is overridden after buildWalletConfig, so the field
list lives in a single file (DRY). Every other field is carried: the config
test copies a config with EVERY field set and compares it with the generated
==, so a field added to WalletConfig and missed here fails that test.
Constants
-
referenceBroadcastJitterMaxMs
→ const int
-
Broadcast-timing decorrelation window: a uniform random delay in
0..=10s
before each tx broadcast, so a send doesn't timestamp-correlate with other
host-app traffic (privacy posture; the SDK's documented default window). No
send path ships in this slice, but the policy is wallet-wide so it is set at
config time.
-
referenceMainnetEndpoint
→ const String
-
The example-app wallet host-policy (spec §3.2g iii-B-2-b; ADR-0526). Builds
the one WalletConfig this example wallet runs under — the endpoint,
network, transport, and seed-persistence decisions live HERE, in the host, so
the SDK stays policy-free (it validates the config; it does not choose it).
-
referenceTestnetEndpoint
→ const String
-
The TESTNET lightwalletd endpoint — the same operator's testnet rail. Used
only under the
ZEC_NETWORK=testnet build (the v-5c device proof: the
textest1… TEX HRP is testnet-only).
-
referenceTorPolicy
→ const TorPolicy
-
Tor policy for the example app: OFF / direct — the example matches Zashi's
direct default. NOTE this is an EXAMPLE-app choice; a production host would
typically route the wallet through the host's own Tor infrastructure.
-
zecEndpointDefine
→ const String
-
Optional endpoint override for either network:
--dart-define=ZEC_ENDPOINT=https://… (e.g. a local lightwalletd). Empty ⇒
the network's reference endpoint.
-
zecNetworkDefine
→ const String
-
Build-time network switch:
flutter build/run --dart-define=ZEC_NETWORK= testnet runs the example wallet on testnet; the default (unset or
mainnet) is mainnet. Any OTHER value fails LOUD at provisioning via
networkForDefine — a typo'd define silently running MAINNET would point a
money proof at real funds.
Properties
-
kZcashSaplingActivationDate
→ DateTime
-
Zcash Sapling activation (2018-10-22) — the earliest USEFUL wallet birthday:
the SDK floors any earlier date to it, so it is the
firstDate bound on every
"how far back to scan" date picker (restore birthday + rescan recovery). One
source of truth for the floor (DRY) so the two pickers can never drift; pinned
by a boundary test (gate 7 — no magic numbers).
final