wallet
Canonical Import
fennel
(local wallet (require :wallet))Source Files
assets/lua/wallet.fnl
What It Provides
wallet is a higher-level Fennel facade over wallet-core for mnemonic validation/generation, Arbitrum Nova wallet creation, and signing Arbitrum Nova transfer payloads.
API Summary
validate-mnemonic(mnemonic)returns whether the mnemonic is accepted bywallet-core.generate-mnemonic([opts])returns a generated mnemonic. Options includestrength(default128) andpassphrase(default empty string).create-arbitrumnova([opts])returns{ :mnemonic mnemonic :address address }. Options may providemnemonic,passphrase, andstrength; when no mnemonic is supplied, one is generated.sign-arbitrumnova-transfer(opts)signs a transfer with an active wallet table. Required wallet fields aremnemonicandaddress; required transaction fields include recipient (toorto-address), amount (amount-ethoramount),nonce/nonce-hex,gas-price/gas-price-hex, andgas-limit/gas-limit-hex. Optionaldata/data-hexis included when non-empty.
Examples
fennel
(local wallet (require :wallet))
(local account (wallet.create-arbitrumnova {:strength 128}))
(assert (wallet.validate-mnemonic account.mnemonic))
(print account.address)Errors and Platform Notes
This facade currently targets Arbitrum Nova helpers. It uses wallet-core.HDWallet internally and drops native wallet handles after deriving addresses or signing. sign-arbitrumnova-transfer asserts when required wallet or transaction fields are missing. Amount and hex/base64 transaction conversions are delegated to wallet-tx-utils before signing JSON through wallet-core.
Related Modules
wallet-corefor lower-level Trust Wallet Core bindings.jsonfor JSON serialization used by signing.
Aliases and Search Terms
Search terms: wallet, mnemonic, Arbitrum Nova, transfer, sign transaction, HD wallet, Trust Wallet.
