UNPKG

@river-build/react-sdk

Version:
29 lines 1.4 kB
import { type SignerContext, SyncAgent, type SyncAgentConfig } from '@river-build/sdk'; import { ethers } from 'ethers'; /** * Sign and connect to River using a Signer and a random delegate wallet every time * @param signer - The signer to use * @param config - The configuration for the sync agent * @returns The sync agent */ export declare const signAndConnect: (signer: ethers.Signer, config: Omit<SyncAgentConfig, 'context'>) => Promise<SyncAgent>; /** * Connect to River using a SignerContext * * Useful for server side code: you can persist the signer context and use it to auth with River later * @param signerContext - The signer context to use * @param config - The configuration for the sync agent * @returns The sync agent */ export declare const connectRiver: (signerContext: SignerContext, config: Omit<SyncAgentConfig, 'context'>) => Promise<SyncAgent>; /** * Connect to River using a Bearer Token * River clients can use this to connect to River on behalf of a user * * Useful for server side code: you can persist the bearer token and use it to auth with River later * @param token - The bearer token to use * @param config - The configuration for the sync agent * @returns The sync agent */ export declare const connectRiverWithBearerToken: (token: string, config: Omit<SyncAgentConfig, 'context'>) => Promise<SyncAgent>; //# sourceMappingURL=connectRiver.d.ts.map