MultiAuthEoa

Authenticate FunWallet Transactions with EOAs and/or Social Logins

Overview

MultiAuthEoa allows FunWallets to authenticate Transactions with a mix of Externally Owned Accounts (EOAs) and Social Logins.

Currently, EOA authentication can be used with the parameters outlined in the Eoa auth overview. The FunWallet SDK supports all the social authentication types (e.g Twitter, Apple, Discord, etc) offered by social authentication providers, such as Magic Link & Web3Auth. We suggest using the Magic Link provider as it allows for transferring tokens to Twitter handles.

Constructor


const multiAuthEoa = new MultiAuthEoa(input)

Parameters

input
object
Required
input properties
provider
ethers.Provider
Required
authIds
[string, address][]
Required

AuthIds have the form : [platform]###[username]. Supported platorms: twitter, google, discord, apple

[["twitter###elonmusk", "0x38e9....83F4"],["google###elonmusk1972", "0x45b1....96D2"]]

Methods


sendTx

Sends a Transaction from the EOA
const receipt = multiAuthEoa.sendTx(tx)
// or
const receipt = multiAuthEoa.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 = multiAuthEoa.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 = multiAuthEoa.getSigner()

Returns


signer
ethers.Signer

ethers.Signer


getOwnerAddr

Get's the public addresses of the FunWallet's Authenticators in an Array

const addr = await multiAuthEoa.getOwnerAddr()

Returns


ownerAddr
object

List containing the public addresses of the FunWallet's Authenticators, EOAs or Social Authenticators


signHash

Get's the public addresses of the FunWallet's Authenticators in an Array

const signedHash = await multiAuthEoa.signHash(hash)

Parameters

hash
String
Required

Hash/message to sign with the Social Authenticator's MPC private key

Returns


signedHash
String

Signed hash/message by the Social Authenticator's MPC private key