Skip to content

API Changes #1

@h33p

Description

@h33p
  • FortNock -> Iris
  • Do not embed wasm files in repo (interfaces are fine)
  • vault: Can we store accounts encrypted?
  • deriveAddress: master key also needs to be accessible
  • API for notes
    • Lock structure, containing a list of SpendCondition
    • SpendCondition containing a list of spend conditions. Basically, mirror the hoon
    • getNote(Name) -> Note
    • lookupNotes(Lock) -> Name[]
    • knownLocks(PKH | null) -> KnownLocks { coinbase: Lock, simple: Lock, custom: index<string, Lock>, ...}. Here, we lookup locks by PKH, or, if null, for current account PKH. Custom locks are something user might be able to define (for custom timelocks, multisigs, etc.) or something we could pull from note-data - not yet clear, but it should exist.
  • Transaction builder with notes
    • When building transactions with input notes, we should extract Name from Note, and then lookup the actual Note that the extension stores (do not trust user input)
    • Builder::simple_spend(SimpleSpend) variant
    • Send whole builder from SDK to the extension, and process it there
    • When inputting a note, pass a (Note, Lock) pair. We can't spend a note without a (matching) lock. This might not be needed for simple spends, because we can check coinbase and simple locks fairly easily.
    • For SimpleSpend, we don't need to pass the Lock, because the wallet should go through all KnownLocks, and match by first-name of the note and the hash of the lock.

NOTE: I couldn't find actual handlers for say sign-message. If https://github.com/nockbox/wallet-frontend/blob/82dae8351fe52c8af4dea6195e421c6baabc1d58/extension/background/index.ts#L240 is not the place where everything is handled. Can we ensure we have a clear place where the UI responses are being handled as well?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions