Skip to content

[FEATURE] Decouple BaseWallet and Account #19448

@shiqicao

Description

@shiqicao

Problem Statement

We have a different account than Account, but unfortunately BaseWallet has a hard dependency on Account, which blocks us. BaseWallet can take a generic type parameter to specify a mini requirement of account, which generalize the BaseWallet implementation, for example,

interface Account {
    createTxExecutionRequest(..): ...;
    createAuthWit(...): ...;
}

class BaseWallet<A extends Account> {
    abstract getAccountFromAddress(addrss: AztecAddress): Promise<A>;
}

This change also makes user very clear what methods BaseWallet actually using.

Proposed Solution

see Problem statement

Example Use Case

No response

Alternative Solutions

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-feature-requestType: Adding a brand new feature (not to be confused with improving an existing feature).from-communityThis originated from the community :)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions