@beraji/wallet-sdk
Version:
Beraji: Distributed Secret Sharing.
59 lines (58 loc) • 1.31 kB
TypeScript
type IPermissions = {
avatar: boolean;
name: boolean;
platform: boolean;
address: boolean;
pubkey: boolean;
shared_key: boolean;
};
export type IApplication = {
domain: string;
token: string;
permissions: IPermissions;
} & Timestamp & IAppInfo;
export type ISession = {
id: string;
devicePub: string;
appId: string;
userId: string;
status: ObjectStatus;
} & Timestamp;
type Timestamp = {
created_at: Date;
updated_at: Date;
};
export type UserWallet = {
pubkey: string;
address: string;
shared_key: string;
};
export type IUser = {
id: string;
avatar: string;
fullname: string;
address: string;
status: ObjectStatus;
shared_key: string;
} & Timestamp;
export type PlatformUser = {
platform_uid: string;
username: string;
fullname: string;
avatar: string;
};
export type IPlatform = {
id: string;
userId: string;
platformType: PlatformType;
} & Timestamp & PlatformUser;
type ObjectStatus = 'active' | 'inactive';
export type LinkedStatus = 'linked' | 'unlinked' | 'pending' | 'revoked' | 'expired';
type PlatformType = 'telegram' | 'google' | 'discord';
export type IAppInfo = {
id: string;
name: string;
icon: string;
};
export type BHex = String | Uint8Array;
export {};