UNPKG

streambird

Version:
64 lines (63 loc) 1.83 kB
import { AxiosInstance } from "axios"; import { Resource } from "../Resource"; import { Session } from "../shared/Session"; export declare type WalletRegistrationRequest = { walletType: string; publicAddress: string; userId?: string | null; }; export declare type WalletRegistrationResponse = { id: string; appId: string; userId: string; publicAddress: string; walletType: string; challenge: string; updatedAt: number; createdAt: number; }; export declare type WalletVerifyRequest = { walletType: string; publicAddress: string; signature: string; sessionExpiresIn?: number; sessionToken?: string; sessionJwt?: string; }; export declare type WalletVerifyResponse = { id: string; appId: string; userId: string; publicAddress: string; walletType: string; isDefault: boolean; isReadyOnly: boolean; isImported: boolean; updatedAt: number; createdAt: number; sessionToken: string; sessionJwt: string; session: Session; }; export declare type WalletCreateRequest = { walletType: string; userId: string; }; export declare type WalletCreateResponse = { id: string; appId: string; userId: string; publicAddress: string; walletType: string; isDefault: boolean; isReadyOnly: boolean; isImported: boolean; updatedAt: number; createdAt: number; }; export declare class Wallets extends Resource<never> { constructor(axiosInstance: AxiosInstance); beginRegistration(registrationRequest: WalletRegistrationRequest): Promise<WalletRegistrationResponse>; verify(verifyRequest: WalletVerifyRequest): Promise<WalletVerifyResponse>; create(createRequest: WalletCreateRequest): Promise<WalletCreateResponse>; }