Add account object interface.
Add new vcard parser.
This commit is contained in:
7
src/app/_models/account.spec.ts
Normal file
7
src/app/_models/account.spec.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Account } from './account';
|
||||
|
||||
describe('Account', () => {
|
||||
it('should create an instance', () => {
|
||||
expect(new Account()).toBeTruthy();
|
||||
});
|
||||
});
|
||||
52
src/app/_models/account.ts
Normal file
52
src/app/_models/account.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
export interface AccountDetails {
|
||||
date_registered: number;
|
||||
gender: string;
|
||||
identities: {
|
||||
evm: {
|
||||
'bloxberg:8996': string[];
|
||||
'oldchain:1': string[];
|
||||
}
|
||||
};
|
||||
location: {
|
||||
area_name: string;
|
||||
};
|
||||
products: string[];
|
||||
vcard: {
|
||||
email: [{
|
||||
value: string;
|
||||
}];
|
||||
fn: [{
|
||||
value: string;
|
||||
}];
|
||||
n: [{
|
||||
value: string[];
|
||||
}];
|
||||
tel: [{
|
||||
meta: {
|
||||
TYP: string[];
|
||||
},
|
||||
value: string;
|
||||
}],
|
||||
version: [{
|
||||
value: string;
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
||||
export interface Signature {
|
||||
algo: string;
|
||||
data: string;
|
||||
digest: string;
|
||||
engine: string;
|
||||
}
|
||||
|
||||
export interface Meta {
|
||||
data: AccountDetails;
|
||||
id: string;
|
||||
signature: Signature;
|
||||
}
|
||||
|
||||
export interface MetaResponse {
|
||||
id: string;
|
||||
m: Meta;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from '@app/_models/transaction';
|
||||
export * from '@app/_models/settings';
|
||||
export * from '@app/_models/user';
|
||||
export * from '@app/_models/account';
|
||||
|
||||
Reference in New Issue
Block a user