UNPKG

@shogun-sdk/accounts

Version:

Shogun with Turnkey: configs, encryption, authentication with Telegram/Turnkey OIDC, etc.

46 lines (41 loc) 1.21 kB
import { Session, TurnkeyApiTypes } from '@turnkey/sdk-browser'; export type Email = `${string}@${string}.${string}`; export type User = { userId: string; organization: { organizationId: string; organizationName: string; }; email?: Email; readOnlySession?: Session; username: string; apiKeys: TurnkeyApiTypes['v1User']['apiKeys']; }; export type OidcTokenParam = { oidcToken: string }; export type EmailParam = { email: Email }; export type UserNameParam = { userName: string }; export type PublicKeyParam = { publicKey: string }; export type Attestation = TurnkeyApiTypes['v1Attestation']; export type OauthProviderParams = TurnkeyApiTypes['v1OauthProviderParams']; export type Wallet = TurnkeyApiTypes['v1GetWalletsResponse']['wallets'][number] & { accounts: Account[]; }; export type Account = Omit< TurnkeyApiTypes['v1GetWalletAccountsResponse']['accounts'][number], 'address' | 'addressFormat' > & { addressFormat?: string; address: string; }; export type DefaultWallet = { userId: string; walletId: string; }; export interface TelegramUser { id: number; first_name: string; last_name?: string; username?: string; auth_date: number; hash: string; }