TypeAlias.Account
type Account = {
address: string;
application: string;
createdAt: string;
explorerUrl?: string;
id: string;
loyalty: {
fixedRewardTier?: string | null;
optimisticBalance: string;
rewardTier?: | {
application: string;
bgImageUrl?: string | null;
createdAt: string;
currencyToPointRatio: number;
id: string;
name: string;
requiredVisits: number;
updatedAt: string;
}
| null;
visits: number;
zelty: {
customerId?: number | null;
};
};
network: | "EthereumAnvil"
| "PolygonAmoy"
| "StarknetDevnet"
| "StarknetSepolia"
| "StarknetMainnet"
| "StellarQuickstart"
| "StellarTestnet"
| "StellarMainnet";
updatedAt: string;
user: {
birthDate?: string | null;
createdAt: string;
email: string;
emailVerified: boolean;
id: string;
image?: string | null;
name: string;
phoneNumber?: string | null;
phoneNumberVerified?: boolean | null;
updatedAt: string;
};
};
Complete on-chain account information returned by the Keyban API.
Represents a customer account with blockchain address, loyalty program data, and user profile information. Each account is tied to a specific application and deployed on a blockchain network.
Type Declaration
Example
const account: Account = {
id: "550e8400-e29b-41d4-a716-446655440000",
application: "app_123",
network: Network.PolygonAmoy,
address: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
user: { email: "user@example.com", name: "John Doe", ... },
loyalty: { optimisticBalance: "1000", visits: 5, ... },
createdAt: "2024-01-01T00:00:00Z",
updatedAt: "2024-01-01T00:00:00Z"
};