Add account object interface.

Add new vcard parser.
This commit is contained in:
Spencer Ofwiti
2021-03-02 10:29:14 +03:00
parent 2491dc54a0
commit 0d7f4aae13
9 changed files with 81 additions and 48 deletions

View File

@@ -0,0 +1,7 @@
import { Account } from './account';
describe('Account', () => {
it('should create an instance', () => {
expect(new Account()).toBeTruthy();
});
});

View 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;
}

View File

@@ -1,3 +1,4 @@
export * from '@app/_models/transaction';
export * from '@app/_models/settings';
export * from '@app/_models/user';
export * from '@app/_models/account';