@ordao/privy-react-orclient
Version:
"Helpers for using orclient with privy and react"
20 lines • 1.62 kB
TypeScript
import { DeploymentSpec, CreateOrclientConfig } from "@ordao/orclient/createOrclient.js";
import { ORClient } from "@ordao/orclient";
import { ConnectedWallet } from "@privy-io/react-auth";
import { ORClientReader } from "@ordao/orclient/orclientReader.js";
export declare function create(deployment: DeploymentSpec, wallet: ConnectedWallet, orclientCfg?: CreateOrclientConfig): Promise<ORClient>;
export declare function createReader(deployment: DeploymentSpec, providerUrl: string, orclientCfg?: CreateOrclientConfig): Promise<ORClientReader>;
export declare function useOrclient(deployment?: DeploymentSpec, wallet?: ConnectedWallet, orclientConfig?: CreateOrclientConfig): ORClient | undefined;
/**
* Returns an ORClientReader that is created only if the full
* ORClient returned by useOrclient is undefined. Otherwise returns full ORClient
*
* @param {string} backupProviderURL The provider URL for the ORClientReader
* @param {DeploymentSpec} [deployment] The deployment specification
* @param {ConnectedWallet} [wallet] The connected wallet
* @param {CreateOrclientConfig} [orclientConfig] The configuration for the ORClient
* @param {number} [timeout] The timeout in milliseconds for when to create the backup. This is useful to give some time for wallet connections to happen needed for the full orclient
* @returns {ORClientReader | undefined}
*/
export declare function useOrclientWithBackup(backupProviderURL: string, deployment?: DeploymentSpec, wallet?: ConnectedWallet, orclientConfig?: CreateOrclientConfig, timeout?: number): ORClientReader | undefined;
//# sourceMappingURL=useOrclient.d.ts.map