Type alias SolanaProvider
SolanaProvider: {
connect: ((opts?) => Promise<{
publicKey: PublicKey;
}>);
isConnected: boolean | null;
on: ((event, handler) => void);
publicKey: PublicKey | null;
request: ((method, params) => Promise<unknown>);
signAllTransactions: ((transactions) => Promise<Transaction[]>);
signMessage: ((message, display?) => Promise<unknown>);
signTransaction: ((transaction) => Promise<Transaction>);
signAndSendTransaction(transaction, options?) => Promise<{
signature: TransactionSignature;
}>;
}
Type declaration
-
connect: ((opts?) => Promise<{
publicKey: PublicKey;
}>)
-
- (opts?): Promise<{
publicKey: PublicKey;
}>
-
Parameters
-
Optional
opts: Partial<ConnectOpts>
Returns Promise<{
publicKey: PublicKey;
}>
-
isConnected: boolean | null
-
on: ((event, handler) => void)
-
- (event, handler): void
-
Parameters
-
event: PhantomEvent
-
handler: ((args) => void)
-
- (args): void
-
Returns void
Returns void
-
publicKey: PublicKey | null
-
request: ((method, params) => Promise<unknown>)
-
- (method, params): Promise<unknown>
-
Parameters
-
method: PhantomRequestMethod
-
params: any
Returns Promise<unknown>
-
signAllTransactions: ((transactions) => Promise<Transaction[]>)
-
- (transactions): Promise<Transaction[]>
-
Parameters
-
transactions: Transaction[]
Returns Promise<Transaction[]>
-
signMessage: ((message, display?) => Promise<unknown>)
-
- (message, display?): Promise<unknown>
-
Parameters
-
message: Uint8Array | string
-
Optional
display: DisplayEncoding
Returns Promise<unknown>
-
signTransaction: ((transaction) => Promise<Transaction>)
-
- (transaction): Promise<Transaction>
-
Returns Promise<Transaction>
-
signAndSendTransaction:function
- signAndSendTransaction(transaction, options?): Promise<{
signature: TransactionSignature;
}>
-
Parameters
-
transaction: Transaction
-
Optional
options: SendOptions
Returns Promise<{
signature: TransactionSignature;
}>