Interface for SmartWallet plugin

interface SmartWalletPluginInterface {
    addGuardian(
        walletAddress: string,
        guardian: string,
    ): Promise<ExecutionResult>;
    addSigner(walletAddress: string, signer: string): Promise<ExecutionResult>;
    approveProposal(
        walletAddress: string,
        proposalId: number,
    ): Promise<ExecutionResult>;
    approveRecovery(walletAddress: string): Promise<ExecutionResult>;
    connectWallet(): Promise<void>;
    createWallet(
        owner: string,
        requiredSignatures?: number,
        requiredGuardians?: number,
    ): Promise<WalletCreateResult>;
    createWalletWithGuardians(
        owner: string,
        guardians: string[],
        requiredSignatures?: number,
        requiredGuardians?: number,
    ): Promise<WalletCreateResult>;
    executeBatch(
        walletAddress: string,
        targets: string[],
        dataArray: string[],
        values: string[],
    ): Promise<ExecutionResult>;
    executeRecovery(walletAddress: string): Promise<ExecutionResult>;
    executeTransaction(
        walletAddress: string,
        target: string,
        data: string,
        value?: string,
    ): Promise<ExecutionResult>;
    getOwnerWallets(ownerAddress: string): Promise<string[]>;
    getProposalInfo(
        walletAddress: string,
        proposalId: number,
    ): Promise<null | ProposalInfo>;
    getRecoveryRequest(walletAddress: string): Promise<null | RecoveryRequest>;
    getWalletInfo(walletAddress: string): Promise<null | WalletInfo>;
    initiateRecovery(
        walletAddress: string,
        newOwner: string,
    ): Promise<ExecutionResult>;
    proposeExecution(
        walletAddress: string,
        target: string,
        data: string,
    ): Promise<ExecutionResult>;
    removeGuardian(
        walletAddress: string,
        guardian: string,
    ): Promise<ExecutionResult>;
    removeSigner(
        walletAddress: string,
        signer: string,
    ): Promise<ExecutionResult>;
    setRequiredSignatures(
        walletAddress: string,
        required: number,
    ): Promise<ExecutionResult>;
    setSigner(privateKey: string): Promise<void>;
}

Implemented by

Methods

  • Parameters

    • walletAddress: string
    • guardian: string

    Returns Promise<ExecutionResult>

  • Parameters

    • walletAddress: string
    • signer: string

    Returns Promise<ExecutionResult>

  • Parameters

    • walletAddress: string
    • proposalId: number

    Returns Promise<ExecutionResult>

  • Returns Promise<void>

  • Parameters

    • owner: string
    • OptionalrequiredSignatures: number
    • OptionalrequiredGuardians: number

    Returns Promise<WalletCreateResult>

  • Parameters

    • owner: string
    • guardians: string[]
    • OptionalrequiredSignatures: number
    • OptionalrequiredGuardians: number

    Returns Promise<WalletCreateResult>

  • Parameters

    • walletAddress: string
    • targets: string[]
    • dataArray: string[]
    • values: string[]

    Returns Promise<ExecutionResult>

  • Parameters

    • walletAddress: string
    • target: string
    • data: string
    • Optionalvalue: string

    Returns Promise<ExecutionResult>

  • Parameters

    • ownerAddress: string

    Returns Promise<string[]>

  • Parameters

    • walletAddress: string
    • proposalId: number

    Returns Promise<null | ProposalInfo>

  • Parameters

    • walletAddress: string

    Returns Promise<null | WalletInfo>

  • Parameters

    • walletAddress: string
    • newOwner: string

    Returns Promise<ExecutionResult>

  • Parameters

    • walletAddress: string
    • target: string
    • data: string

    Returns Promise<ExecutionResult>

  • Parameters

    • walletAddress: string
    • guardian: string

    Returns Promise<ExecutionResult>

  • Parameters

    • walletAddress: string
    • signer: string

    Returns Promise<ExecutionResult>

  • Parameters

    • walletAddress: string
    • required: number

    Returns Promise<ExecutionResult>

  • Parameters

    • privateKey: string

    Returns Promise<void>