UNPKG

@privy-io/server-auth

Version:

Server-side client for the Privy API

29 lines (26 loc) 1.04 kB
import { ethers } from 'ethers'; import { PrivyClient } from './index.js'; import './public-COOxC-bb.js'; import '@solana/web3.js'; import 'redaxios'; import '@privy-io/public-api'; /** Inputs to get an ethers.js Signer instance for a wallet. */ type GetEthersSignerInputType = { /** ID for the wallet. */ walletId: string; /** Ethereum address for the wallet. */ address: string; /** Instance of the Privy client. */ privyClient: PrivyClient; /** Optional ethers Provider instance. */ provider?: ethers.Provider; }; /** * Given a wallet ID for an Ethereum wallet and an instance of the Privy client, returns an ethers.js v6 * `Signer` instance that can be used to sign messages and send transactions with the wallet. * * @param input {GetEthersSignerInputType} * @returns signer {ethers.AbstractSigner} ethers signer instance for the wallet */ declare const createEthersSigner: (input: GetEthersSignerInputType) => ethers.AbstractSigner; export { type GetEthersSignerInputType, createEthersSigner };