UNPKG

@cranberry-money/shared-types

Version:

Shared TypeScript type definitions for Blueberry platform

73 lines 2.67 kB
import type { BaseEntity } from '../common'; import type { BaseQueryParams } from '../api'; export type WalletType = 'hardware' | 'software'; export interface Wallet extends BaseEntity { userAccount: string; name?: string; address: string; chain: string; walletType?: WalletType; verificationStatus: 'PENDING' | 'VERIFIED'; verificationChallenge?: string; verificationSignature?: string; verifiedAt?: string; nativeBalance: string; marketValue: string; lastSyncedAt?: string; /** Full derivation path to this address (e.g., "m/44'/60'/0'/0/0") */ derivationPath?: string; /** Master fingerprint identifying the hardware wallet (8-char hex) */ masterFingerprint?: string; /** Index of this address in the derivation sequence (0, 1, 2, ...) */ addressIndex?: number; /** Public key at external chain level for deriving more addresses (33-byte compressed, hex) */ parentPublicKey?: string; /** Chain code at external chain level for deriving more addresses (32-byte, hex) */ parentChainCode?: string; /** Derivation path of the parent key (e.g., "m/44'/60'/0'/0") */ parentDerivationPath?: string; } /** * Query parameters for wallet endpoints. * Extends BaseQueryParams for page-based pagination. * * NAMING CONVENTION: Query params use snake_case following REST API URL standards. */ export interface WalletQueryParams extends BaseQueryParams { user_account?: string; chain?: string; verification_status?: 'PENDING' | 'VERIFIED'; } export type CreateWallet = { userAccount: string; name?: string; address: string; chain: string; walletType?: WalletType; /** Full derivation path to this address (e.g., "m/44'/60'/0'/0/0") */ derivationPath?: string; /** Master fingerprint identifying the hardware wallet (8-char hex) */ masterFingerprint?: string; /** Index of this address in the derivation sequence (0, 1, 2, ...) */ addressIndex?: number; /** Public key at external chain level for deriving more addresses (33-byte compressed, hex) */ parentPublicKey?: string; /** Chain code at external chain level for deriving more addresses (32-byte, hex) */ parentChainCode?: string; /** Derivation path of the parent key (e.g., "m/44'/60'/0'/0") */ parentDerivationPath?: string; }; export interface SyncBalanceResponse { success: boolean; balance?: string; chain?: string; lastSyncedAt?: string; message?: string; } export interface SyncWalletResponse { success: boolean; message: string; taskId: string; wallet: Wallet; } //# sourceMappingURL=wallet.d.ts.map