EOA

Authenticate FunWallet Transactions with an EOA

Overview

EOA allows FunWallets to authenticate Transactions with an Externally Owned Account (EOA). Currently, EOA authentication can be used with:

  • With a private key
  • With an ethers provider
  • With an ethers signer


Constructor


const eoaAuth = new Eoa(input)

Parameters

input
object
Required

One of the following fields is required.

input properties
privateKey
string
provider
ethers.Provider
More info
signer
ethers.Signer
More info

Methods


sendTx

Sends a Transaction from the EOA
const receipt = eoaAuth.sendTx(tx)
// or
const receipt = eoaAuth.sendTx(actionFunc(parameters))

Parameters

tx
object || function
Required

Transaction

Returns

ethers.Receipt
object

Receipt of a Transaction execution/deployment


getUniqueId

Get the authentication id needed for calculating wallet address

const uniqueId = eoaAuth.getUniqueId()

Returns


uniqueId
string

Unique Id used as a salt to deterministically compute a wallet address


getSigner

Get the ethers.Signer assiciated with the EOA
const signer = eoaAuth.getSigner()

Returns


signer
ethers.Signer

An ethers signer that can sign transcations.


getOwnerAddr

Get's the list of uniqueId's of the signers in the Auth
const addr = eoaAuth.getOwnerAddr()

Returns


ownerAddrs
[address]

List containing the public address of the FunWallet's Eoa Auth