Created
July 19, 2021 18:05
-
-
Save jordaaash/f57b2fcb819c1d479b8ca16c621f9512 to your computer and use it in GitHub Desktop.
Wallet Adapter interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { PublicKey, Transaction } from '@solana/web3.js'; | |
import EventEmitter from 'eventemitter3'; | |
export interface WalletAdapterEvents { | |
ready: () => void; | |
connect: () => void; | |
disconnect: () => void; | |
error: (error: Error) => void; | |
} | |
export interface WalletAdapter extends EventEmitter<WalletAdapterEvents> { | |
publicKey: PublicKey | null; | |
ready: boolean; | |
connecting: boolean; | |
connected: boolean; | |
autoApprove: boolean; | |
connect: () => Promise<void>; | |
disconnect: () => Promise<void>; | |
signTransaction: (transaction: Transaction) => Promise<Transaction>; | |
signAllTransactions: (transaction: Transaction[]) => Promise<Transaction[]>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment