wormhole/sdk/js/src/solana/utils/connection.ts

13 lines
277 B
TypeScript

import { Provider } from "@project-serum/anchor";
import { Connection } from "@solana/web3.js";
export function createReadOnlyProvider(
connection?: Connection
): Provider | undefined {
if (connection === undefined) {
return undefined;
}
return { connection };
}