File

src/app/_models/account.ts

Description

Account data interface

Index

Properties

Properties

age
age: string
Type : string
Optional
balance
balance: number
Type : number
Optional
category
category: string
Type : string
Optional
date_registered
date_registered: number
Type : number
gender
gender: string
Type : string
identities
identities: literal type
Type : literal type
location
location: literal type
Type : literal type
products
products: string[]
Type : string[]
type
type: string
Type : string
Optional
vcard
vcard: literal type
Type : literal type
interface AccountDetails {
  date_registered: number;
  gender: string;
  age?: string;
  type?: string;
  balance?: number;
  identities: {
    evm: {
      'bloxberg:8996': string[];
      'oldchain:1': string[];
    };
    latitude: number;
    longitude: number;
  };
  location: {
    area?: string;
    area_name: string;
    area_type?: string;
  };
  products: string[];
  category?: string;
  vcard: {
    email: [
      {
        value: string;
      }
    ];
    fn: [
      {
        value: string;
      }
    ];
    n: [
      {
        value: string[];
      }
    ];
    tel: [
      {
        meta: {
          TYP: string[];
        };
        value: string;
      }
    ];
    version: [
      {
        value: string;
      }
    ];
  };
}

/** Meta signature interface */
interface Signature {
  algo: string;
  data: string;
  digest: string;
  engine: string;
}

/** Meta object interface */
interface Meta {
  data: AccountDetails;
  id: string;
  signature: Signature;
}

/** Meta response interface */
interface MetaResponse {
  id: string;
  m: Meta;
}

/** Default account data object */
const defaultAccount: AccountDetails = {
  date_registered: Date.now(),
  gender: 'other',
  identities: {
    evm: {
      'bloxberg:8996': [''],
      'oldchain:1': [''],
    },
    latitude: 0,
    longitude: 0,
  },
  location: {
    area_name: 'Kilifi',
  },
  products: [],
  vcard: {
    email: [
      {
        value: '',
      },
    ],
    fn: [
      {
        value: 'Sarafu Contract',
      },
    ],
    n: [
      {
        value: ['Sarafu', 'Contract'],
      },
    ],
    tel: [
      {
        meta: {
          TYP: [],
        },
        value: '',
      },
    ],
    version: [
      {
        value: '3.0',
      },
    ],
  },
};

/** @exports */
export { AccountDetails, Meta, MetaResponse, Signature, defaultAccount };

result-matching ""

    No results matching ""