UNPKG

accounts

Version:

Tempo Accounts SDK

37 lines (33 loc) 977 B
import * as CoreProvider from '../core/Provider.js' import { reactNative } from './adapter.js' /** Creates a provider for React Native apps using system browser authentication. */ export function create(options: create.Options): create.ReturnType { const { // TODO: use the new host // host = 'https://wallet-next.tempo.xyz', host = 'https://wallet.tempo.xyz', redirectUri, open, secureStorage, ...rest } = options return CoreProvider.create({ ...rest, adapter: reactNative({ host, redirectUri, ...(open ? { open } : {}), ...(secureStorage ? { secureStorage } : {}), }), }) } export declare namespace create { export type Options = Omit< CoreProvider.create.Options & reactNative.Options, 'adapter' | 'host' > & { /** Host URL for the mobile auth page. @default "https://wallet.tempo.xyz" */ host?: string | undefined } export type ReturnType = CoreProvider.create.ReturnType }