Refactor order of item to follow alphabetical order.

This commit is contained in:
Spencer Ofwiti 2021-05-13 10:13:51 +03:00
parent 948554563d
commit b68404eade
51 changed files with 1718 additions and 1718 deletions

View File

@ -216,8 +216,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="408"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:408</a></div>
<div class="io-line">Defined in <a href="" data-line="167"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:167</a></div>
</td>
</tr>
@ -257,8 +257,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="250"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:250</a></div>
<div class="io-line">Defined in <a href="" data-line="178"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:178</a></div>
</td>
</tr>
@ -304,8 +304,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="302"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:302</a></div>
<div class="io-line">Defined in <a href="" data-line="186"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:186</a></div>
</td>
</tr>
@ -351,8 +351,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="317"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:317</a></div>
<div class="io-line">Defined in <a href="" data-line="201"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:201</a></div>
</td>
</tr>
@ -431,8 +431,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="339"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:339</a></div>
<div class="io-line">Defined in <a href="" data-line="210"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:210</a></div>
</td>
</tr>
@ -511,8 +511,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="266"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:266</a></div>
<div class="io-line">Defined in <a href="" data-line="218"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:218</a></div>
</td>
</tr>
@ -558,8 +558,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="357"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:357</a></div>
<div class="io-line">Defined in <a href="" data-line="227"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:227</a></div>
</td>
</tr>
@ -634,8 +634,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="325"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:325</a></div>
<div class="io-line">Defined in <a href="" data-line="235"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:235</a></div>
</td>
</tr>
@ -681,8 +681,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="258"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:258</a></div>
<div class="io-line">Defined in <a href="" data-line="248"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:248</a></div>
</td>
</tr>
@ -728,8 +728,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="348"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:348</a></div>
<div class="io-line">Defined in <a href="" data-line="257"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:257</a></div>
</td>
</tr>
@ -804,8 +804,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="366"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:366</a></div>
<div class="io-line">Defined in <a href="" data-line="266"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:266</a></div>
</td>
</tr>
@ -880,8 +880,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="223"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:223</a></div>
<div class="io-line">Defined in <a href="" data-line="274"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:274</a></div>
</td>
</tr>
@ -927,8 +927,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="375"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:375</a></div>
<div class="io-line">Defined in <a href="" data-line="283"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:283</a></div>
</td>
</tr>
@ -1003,8 +1003,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="239"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:239</a></div>
<div class="io-line">Defined in <a href="" data-line="291"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:291</a></div>
</td>
</tr>
@ -1050,8 +1050,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="231"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:231</a></div>
<div class="io-line">Defined in <a href="" data-line="299"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:299</a></div>
</td>
</tr>
@ -1099,8 +1099,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="182"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:182</a></div>
<div class="io-line">Defined in <a href="" data-line="310"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:310</a></div>
</td>
</tr>
@ -1198,8 +1198,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="211"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:211</a></div>
<div class="io-line">Defined in <a href="" data-line="325"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:325</a></div>
</td>
</tr>
@ -1279,8 +1279,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="197"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:197</a></div>
<div class="io-line">Defined in <a href="" data-line="339"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:339</a></div>
</td>
</tr>
@ -1360,8 +1360,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="288"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:288</a></div>
<div class="io-line">Defined in <a href="" data-line="353"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:353</a></div>
</td>
</tr>
@ -1442,8 +1442,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="276"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:276</a></div>
<div class="io-line">Defined in <a href="" data-line="369"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:369</a></div>
</td>
</tr>
@ -1520,8 +1520,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="170"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:170</a></div>
<div class="io-line">Defined in <a href="" data-line="379"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:379</a></div>
</td>
</tr>
@ -1561,8 +1561,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="384"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:384</a></div>
<div class="io-line">Defined in <a href="" data-line="389"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:389</a></div>
</td>
</tr>
@ -1637,8 +1637,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="402"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:402</a></div>
<div class="io-line">Defined in <a href="" data-line="398"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:398</a></div>
</td>
</tr>
@ -1717,8 +1717,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="393"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:393</a></div>
<div class="io-line">Defined in <a href="" data-line="408"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:408</a></div>
</td>
</tr>
@ -1872,48 +1872,8 @@ const keyring &#x3D; new openpgp.Keyring();
* @extends KeyStore
*/
interface MutableKeyStore extends KeyStore {
/**
* Instantiate the keyring in the keystore.
* @async
*/
loadKeyring(): void;
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importKeyPair(publicKey: any, privateKey: any): Promise&lt;void&gt;;
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
importPublicKey(publicKey: any): Promise&lt;void&gt;;
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importPrivateKey(privateKey: any): Promise&lt;void&gt;;
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array&lt;any&gt;;
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array&lt;any&gt;;
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array&lt;any&gt;;
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void;
/**
* Get all the encryption keys.
* @returns An array of encryption keys.
@ -1922,30 +1882,6 @@ interface MutableKeyStore extends KeyStore {
* This is included to appease the implemented Keystore interface.
*/
getEncryptKeys(): Array&lt;any&gt;;
/**
* Get all private keys.
* @returns An array of all private keys.
*/
getPrivateKeys(): Array&lt;any&gt;;
/**
* Get the first private key.
* @returns The first private key.
*/
getPrivateKey(): any;
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
isValidKey(key: any): Promise&lt;boolean&gt;;
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
isEncryptedPrivateKey(privateKey: any): Promise&lt;boolean&gt;;
/**
* Get the first private key&#x27;s fingerprint.
* @returns The first private key&#x27;s fingerprint.
@ -1957,11 +1893,6 @@ interface MutableKeyStore extends KeyStore {
* @returns The key&#x27;s keyId.
*/
getKeyId(key: any): string;
/**
* Get the first private key&#x27;s keyID.
* @returns The first private key&#x27;s keyId.
*/
getPrivateKeyId(): string;
/**
* Get keys from the keyring using their keyId.
* @param keyId - The keyId of the keys to be fetched from the keyring.
@ -1969,49 +1900,118 @@ interface MutableKeyStore extends KeyStore {
*/
getKeysForId(keyId: string): Array&lt;any&gt;;
/**
* Get a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be fetched from the keyring.
* @returns The public key with that keyId.
* Get the first private key.
* @returns The first private key.
*/
getPublicKeyForId(keyId: string): any;
getPrivateKey(): any;
/**
* Get a private key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the private key to be fetched from the keyring.
* @returns The private key with that keyId.
*/
getPrivateKeyForId(keyId: string): any;
/**
* Get the first private key&#x27;s keyID.
* @returns The first private key&#x27;s keyId.
*/
getPrivateKeyId(): string;
/**
* Get all private keys.
* @returns An array of all private keys.
*/
getPrivateKeys(): Array&lt;any&gt;;
/**
* Get a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be fetched from the keyring.
* @returns The public key with that keyId.
*/
getPublicKeyForId(keyId: string): any;
/**
* Get a public key from the keyring using it&#x27;s subkeyId.
* @param subkeyId - The subkeyId of the public key to be fetched from the keyring.
* @returns The public key with that subkeyId.
*/
getPublicKeyForSubkeyId(subkeyId: string): any;
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array&lt;any&gt;;
/**
* Get public keys from the keyring using their address.
* @param address - The address of the public keys to be fetched from the keyring.
* @returns An array of the public keys with that address.
*/
getPublicKeysForAddress(address: string): Array&lt;any&gt;;
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array&lt;any&gt;;
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array&lt;any&gt;;
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importKeyPair(publicKey: any, privateKey: any): Promise&lt;void&gt;;
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importPrivateKey(privateKey: any): Promise&lt;void&gt;;
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
importPublicKey(publicKey: any): Promise&lt;void&gt;;
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
isEncryptedPrivateKey(privateKey: any): Promise&lt;boolean&gt;;
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
isValidKey(key: any): Promise&lt;boolean&gt;;
/**
* Instantiate the keyring in the keystore.
* @async
*/
loadKeyring(): void;
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the keys to be removed from the keyring.
* @returns An array of the removed keys.
*/
removeKeysForId(keyId: string): Array&lt;any&gt;;
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId: string): any;
/**
* Remove a public key from the keyring.
* @param publicKey - The public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKey(publicKey: any): any;
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void;
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId: string): any;
/**
* Sign message using private key.
* @async
@ -2023,81 +2023,9 @@ interface MutableKeyStore extends KeyStore {
/** Provides a keyring for pgp keys. */
class MutablePgpKeyStore implements MutableKeyStore {
/**
* Instantiate the keyring in the keystore.
* @async
*/
async loadKeyring(): Promise&lt;void&gt; {
await keyring.load();
await keyring.store();
}
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importKeyPair(publicKey: any, privateKey: any): Promise&lt;void&gt; {
try {
await keyring.publicKeys.importKey(publicKey);
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
async importPublicKey(publicKey: any): Promise&lt;void&gt; {
try {
await keyring.publicKeys.importKey(publicKey);
} catch (error) {
throw error;
}
}
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importPrivateKey(privateKey: any): Promise&lt;void&gt; {
try {
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
}
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
}
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void {
keyring.clear();
}
/**
@ -2111,50 +2039,6 @@ class MutablePgpKeyStore implements MutableKeyStore {
return [];
}
/**
* Get all private keys.
* @returns An array of all private keys.
*/
getPrivateKeys(): Array&lt;any&gt; {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.keys;
}
/**
* Get the first private key.
* @returns The first private key.
*/
getPrivateKey(): any {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.keys[0];
}
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
async isValidKey(key): Promise&lt;boolean&gt; {
// There is supposed to be an openpgp.readKey() method but I can&#x27;t find it?
const testKey &#x3D; await openpgp.key.readArmored(key);
return !testKey.err;
}
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
async isEncryptedPrivateKey(privateKey: any): Promise&lt;boolean&gt; {
const imported &#x3D; await openpgp.key.readArmored(privateKey);
for (const key of imported.keys) {
if (key.isDecrypted()) {
return false;
}
}
return true;
}
/**
* Get the first private key&#x27;s fingerprint.
* @returns The first private key&#x27;s fingerprint.
@ -2178,6 +2062,32 @@ class MutablePgpKeyStore implements MutableKeyStore {
return key.getKeyId().toHex();
}
/**
* Get keys from the keyring using their keyId.
* @param keyId - The keyId of the keys to be fetched from the keyring.
* @returns An array of the keys with that keyId.
*/
getKeysForId(keyId: string): Array&lt;any&gt; {
return keyring.getKeysForId(keyId);
}
/**
* Get the first private key.
* @returns The first private key.
*/
getPrivateKey(): any {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.keys[0];
}
/**
* Get a private key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the private key to be fetched from the keyring.
* @returns The private key with that keyId.
*/
getPrivateKeyForId(keyId): any {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.getForId(keyId);
}
/**
* Get the first private key&#x27;s keyID.
* @returns The first private key&#x27;s keyId.
@ -2192,12 +2102,11 @@ class MutablePgpKeyStore implements MutableKeyStore {
}
/**
* Get keys from the keyring using their keyId.
* @param keyId - The keyId of the keys to be fetched from the keyring.
* @returns An array of the keys with that keyId.
* Get all private keys.
* @returns An array of all private keys.
*/
getKeysForId(keyId: string): Array&lt;any&gt; {
return keyring.getKeysForId(keyId);
getPrivateKeys(): Array&lt;any&gt; {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.keys;
}
/**
@ -2209,15 +2118,6 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.getForId(keyId);
}
/**
* Get a private key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the private key to be fetched from the keyring.
* @returns The private key with that keyId.
*/
getPrivateKeyForId(keyId): any {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.getForId(keyId);
}
/**
* Get a public key from the keyring using it&#x27;s subkeyId.
* @param subkeyId - The subkeyId of the public key to be fetched from the keyring.
@ -2227,6 +2127,14 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.getForId(subkeyId, true);
}
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
}
/**
* Get public keys from the keyring using their address.
* @param address - The address of the public keys to be fetched from the keyring.
@ -2236,6 +2144,103 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.getForAddress(address);
}
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
}
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
}
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importKeyPair(publicKey: any, privateKey: any): Promise&lt;void&gt; {
try {
await keyring.publicKeys.importKey(publicKey);
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importPrivateKey(privateKey: any): Promise&lt;void&gt; {
try {
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
async importPublicKey(publicKey: any): Promise&lt;void&gt; {
try {
await keyring.publicKeys.importKey(publicKey);
} catch (error) {
throw error;
}
}
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
async isEncryptedPrivateKey(privateKey: any): Promise&lt;boolean&gt; {
const imported &#x3D; await openpgp.key.readArmored(privateKey);
for (const key of imported.keys) {
if (key.isDecrypted()) {
return false;
}
}
return true;
}
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
async isValidKey(key): Promise&lt;boolean&gt; {
// There is supposed to be an openpgp.readKey() method but I can&#x27;t find it?
const testKey &#x3D; await openpgp.key.readArmored(key);
return !testKey.err;
}
/**
* Instantiate the keyring in the keystore.
* @async
*/
async loadKeyring(): Promise&lt;void&gt; {
await keyring.load();
await keyring.store();
}
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the keys to be removed from the keyring.
@ -2245,15 +2250,6 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.removeKeysForId(keyId);
}
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId): any {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.removeForId(keyId);
}
/**
* Remove a public key from the keyring.
* @param publicKey - The public key to be removed from the keyring.
@ -2264,9 +2260,13 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.removeForId(keyId);
}
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void {
keyring.clear();
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId): any {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.removeForId(keyId);
}
/**
@ -2292,7 +2292,7 @@ class MutablePgpKeyStore implements MutableKeyStore {
}
/** @exports */
export { MutablePgpKeyStore, MutableKeyStore };
export { MutableKeyStore, MutablePgpKeyStore };
</code></pre>
</div>
</div>

View File

@ -245,7 +245,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="62" class="link-to-prism">src/app/_pgp/pgp-signer.ts:62</a></div>
<div class="io-line">Defined in <a href="" data-line="60" class="link-to-prism">src/app/_pgp/pgp-signer.ts:60</a></div>
</td>
</tr>
@ -278,7 +278,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="64" class="link-to-prism">src/app/_pgp/pgp-signer.ts:64</a></div>
<div class="io-line">Defined in <a href="" data-line="62" class="link-to-prism">src/app/_pgp/pgp-signer.ts:62</a></div>
</td>
</tr>
@ -316,7 +316,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="60" class="link-to-prism">src/app/_pgp/pgp-signer.ts:60</a></div>
<div class="io-line">Defined in <a href="" data-line="64" class="link-to-prism">src/app/_pgp/pgp-signer.ts:64</a></div>
</td>
</tr>
@ -349,7 +349,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="68" class="link-to-prism">src/app/_pgp/pgp-signer.ts:68</a></div>
<div class="io-line">Defined in <a href="" data-line="66" class="link-to-prism">src/app/_pgp/pgp-signer.ts:66</a></div>
</td>
</tr>
@ -382,7 +382,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="74" class="link-to-prism">src/app/_pgp/pgp-signer.ts:74</a></div>
<div class="io-line">Defined in <a href="" data-line="68" class="link-to-prism">src/app/_pgp/pgp-signer.ts:68</a></div>
</td>
</tr>
@ -481,7 +481,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="66" class="link-to-prism">src/app/_pgp/pgp-signer.ts:66</a></div>
<div class="io-line">Defined in <a href="" data-line="74" class="link-to-prism">src/app/_pgp/pgp-signer.ts:74</a></div>
</td>
</tr>
@ -657,8 +657,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="146"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:146</a></div>
<div class="io-line">Defined in <a href="" data-line="109"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:109</a></div>
</td>
</tr>
@ -738,8 +738,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="109"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:109</a></div>
<div class="io-line">Defined in <a href="" data-line="144"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:144</a></div>
</td>
</tr>
@ -837,65 +837,65 @@ interface Signable {
/** Signature object interface */
interface Signature {
/** Encryption engine used. */
engine: string;
/** Encryption algorithm used */
algo: string;
/** Data to be signed. */
data: string;
/** Message digest */
digest: string;
/** Encryption engine used. */
engine: string;
}
/** Signer interface */
interface Signer {
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
fingerprint(): string;
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
prepare(material: Signable): boolean;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
sign(digest: string): Promise&lt;void&gt;;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
}
/** Provides functionality for signing and verifying signed messages. */
class PGPSigner implements Signer {
/** Encryption engine used. */
engine &#x3D; &#x27;pgp&#x27;;
/** Encryption algorithm used */
algo &#x3D; &#x27;sha256&#x27;;
/** Message digest */
dgst: string;
/** Generated signature */
signature: Signature;
/** Encryption engine used. */
engine &#x3D; &#x27;pgp&#x27;;
/** A keystore holding pgp keys. */
keyStore: MutableKeyStore;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/** Event triggered on successful signing of message. */
onsign: (signature: Signature) &#x3D;&gt; void;
/** Event triggered on successful verification of a signature. */
onverify: (flag: boolean) &#x3D;&gt; void;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/** Generated signature */
signature: Signature;
/**
* Initializing the Signer.
@ -925,6 +925,41 @@ class PGPSigner implements Signer {
return true;
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password &#x3D; window.prompt(&#x27;password&#x27;);
await pk.decrypt(password);
}
const opts &#x3D; {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) &#x3D;&gt; {
this.signature &#x3D; {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
@ -961,45 +996,10 @@ class PGPSigner implements Signer {
this.onverify(false);
});
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password &#x3D; window.prompt(&#x27;password&#x27;);
await pk.decrypt(password);
}
const opts &#x3D; {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) &#x3D;&gt; {
this.signature &#x3D; {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
}
/** @exports */
export { Signable, Signature, Signer, PGPSigner };
export { PGPSigner, Signable, Signature, Signer };
</code></pre>
</div>
</div>

View File

@ -194,7 +194,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="11" class="link-to-prism">src/app/_models/settings.ts:11</a></div>
<div class="io-line">Defined in <a href="" data-line="4" class="link-to-prism">src/app/_models/settings.ts:4</a></div>
</td>
</tr>
@ -227,7 +227,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="9" class="link-to-prism">src/app/_models/settings.ts:9</a></div>
<div class="io-line">Defined in <a href="" data-line="6" class="link-to-prism">src/app/_models/settings.ts:6</a></div>
</td>
</tr>
@ -260,7 +260,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="13" class="link-to-prism">src/app/_models/settings.ts:13</a></div>
<div class="io-line">Defined in <a href="" data-line="8" class="link-to-prism">src/app/_models/settings.ts:8</a></div>
</td>
</tr>
@ -301,7 +301,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="4" class="link-to-prism">src/app/_models/settings.ts:4</a></div>
<div class="io-line">Defined in <a href="" data-line="10" class="link-to-prism">src/app/_models/settings.ts:10</a></div>
</td>
</tr>
@ -327,17 +327,17 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">class Settings {
/** CIC Registry instance */
registry: any;
/** A resource for searching through blocks on the blockchain network. */
scanFilter: any;
/** Transaction Helper instance */
txHelper: any;
/** Web3 Object */
w3: W3 &#x3D; {
engine: undefined,
provider: undefined,
};
/** A resource for searching through blocks on the blockchain network. */
scanFilter: any;
/** CIC Registry instance */
registry: any;
/** Transaction Helper instance */
txHelper: any;
/**
* Initialize the settings.

View File

@ -506,16 +506,16 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface AccountDetails {
/** Age of user */
age?: string;
/** Token balance on account */
balance?: number;
/** Business category of user. */
category?: string;
/** Account registration day */
date_registered: number;
/** User&#x27;s gender */
gender: string;
/** Age of user */
age?: string;
/** Type of account */
type?: string;
/** Token balance on account */
balance?: number;
/** Account identifiers */
identities: {
evm: {
@ -533,8 +533,8 @@
};
/** Products or services provided by user. */
products: string[];
/** Business category of user. */
category?: string;
/** Type of account */
type?: string;
/** Personal identifying information of user */
vcard: {
email: [

View File

@ -292,32 +292,32 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface Action {
/** Action ID */
id: number;
/** Admin who initialized the action. */
user: string;
/** Admin&#x27;s role in the system */
role: string;
/** Action performed */
action: string;
/** Action approval status. */
approval: boolean;
/** Action ID */
id: number;
/** Admin&#x27;s role in the system */
role: string;
/** Admin who initialized the action. */
user: string;
}
/** Area name object interface */
interface AreaName {
/** Name of area */
name: string;
/** Locations that map to that area name. */
locations: Array&lt;string&gt;;
/** Name of area */
name: string;
}
/** Area type object interface */
interface AreaType {
/** Type of area */
name: string;
/** Areas that map to that area type. */
area: Array&lt;string&gt;;
/** Type of area */
name: string;
}
/** Category object interface */

View File

@ -178,32 +178,32 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface Action {
/** Action ID */
id: number;
/** Admin who initialized the action. */
user: string;
/** Admin&#x27;s role in the system */
role: string;
/** Action performed */
action: string;
/** Action approval status. */
approval: boolean;
/** Action ID */
id: number;
/** Admin&#x27;s role in the system */
role: string;
/** Admin who initialized the action. */
user: string;
}
/** Area name object interface */
interface AreaName {
/** Name of area */
name: string;
/** Locations that map to that area name. */
locations: Array&lt;string&gt;;
/** Name of area */
name: string;
}
/** Area type object interface */
interface AreaType {
/** Type of area */
name: string;
/** Areas that map to that area type. */
area: Array&lt;string&gt;;
/** Type of area */
name: string;
}
/** Category object interface */

View File

@ -178,32 +178,32 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface Action {
/** Action ID */
id: number;
/** Admin who initialized the action. */
user: string;
/** Admin&#x27;s role in the system */
role: string;
/** Action performed */
action: string;
/** Action approval status. */
approval: boolean;
/** Action ID */
id: number;
/** Admin&#x27;s role in the system */
role: string;
/** Admin who initialized the action. */
user: string;
}
/** Area name object interface */
interface AreaName {
/** Name of area */
name: string;
/** Locations that map to that area name. */
locations: Array&lt;string&gt;;
/** Name of area */
name: string;
}
/** Area type object interface */
interface AreaType {
/** Type of area */
name: string;
/** Areas that map to that area type. */
area: Array&lt;string&gt;;
/** Type of area */
name: string;
}
/** Category object interface */

View File

@ -178,32 +178,32 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface Action {
/** Action ID */
id: number;
/** Admin who initialized the action. */
user: string;
/** Admin&#x27;s role in the system */
role: string;
/** Action performed */
action: string;
/** Action approval status. */
approval: boolean;
/** Action ID */
id: number;
/** Admin&#x27;s role in the system */
role: string;
/** Admin who initialized the action. */
user: string;
}
/** Area name object interface */
interface AreaName {
/** Name of area */
name: string;
/** Locations that map to that area name. */
locations: Array&lt;string&gt;;
/** Name of area */
name: string;
}
/** Area type object interface */
interface AreaType {
/** Type of area */
name: string;
/** Areas that map to that area type. */
area: Array&lt;string&gt;;
/** Type of area */
name: string;
}
/** Category object interface */

View File

@ -381,30 +381,30 @@ interface Conversion {
toValue: number;
/** Address of the initiator of the conversion. */
trader: string;
/** Account information of the initiator of the conversion. */
user: AccountDetails;
/** Conversion mining information. */
tx: Tx;
/** Account information of the initiator of the conversion. */
user: AccountDetails;
}
/** Transaction object interface */
interface Transaction {
/** Address of the transaction sender. */
from: string;
/** Account information of the transaction recipient. */
recipient: AccountDetails;
/** Account information of the transaction sender. */
sender: AccountDetails;
/** Address of the transaction recipient. */
to: string;
/** Account information of the transaction recipient. */
recipient: AccountDetails;
/** Transaction token information. */
token: TxToken;
/** Transaction mining information. */
tx: Tx;
/** Amount of tokens transacted. */
value: number;
/** Type of transaction. */
type?: string;
/** Amount of tokens transacted. */
value: number;
}
/** Transaction data interface */

View File

@ -216,16 +216,16 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface AccountDetails {
/** Age of user */
age?: string;
/** Token balance on account */
balance?: number;
/** Business category of user. */
category?: string;
/** Account registration day */
date_registered: number;
/** User&#x27;s gender */
gender: string;
/** Age of user */
age?: string;
/** Type of account */
type?: string;
/** Token balance on account */
balance?: number;
/** Account identifiers */
identities: {
evm: {
@ -243,8 +243,8 @@
};
/** Products or services provided by user. */
products: string[];
/** Business category of user. */
category?: string;
/** Type of account */
type?: string;
/** Personal identifying information of user */
vcard: {
email: [

View File

@ -178,16 +178,16 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface AccountDetails {
/** Age of user */
age?: string;
/** Token balance on account */
balance?: number;
/** Business category of user. */
category?: string;
/** Account registration day */
date_registered: number;
/** User&#x27;s gender */
gender: string;
/** Age of user */
age?: string;
/** Type of account */
type?: string;
/** Token balance on account */
balance?: number;
/** Account identifiers */
identities: {
evm: {
@ -205,8 +205,8 @@
};
/** Products or services provided by user. */
products: string[];
/** Business category of user. */
category?: string;
/** Type of account */
type?: string;
/** Personal identifying information of user */
vcard: {
email: [

View File

@ -200,8 +200,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="154"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:154</a></div>
<div class="io-line">Defined in <a href="" data-line="16"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:16</a></div>
</td>
</tr>
@ -241,8 +241,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="64"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:64</a></div>
<div class="io-line">Defined in <a href="" data-line="24"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:24</a></div>
</td>
</tr>
@ -288,8 +288,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="93"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:93</a></div>
<div class="io-line">Defined in <a href="" data-line="29"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:29</a></div>
</td>
</tr>
@ -335,8 +335,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="99"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:99</a></div>
<div class="io-line">Defined in <a href="" data-line="35"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:35</a></div>
</td>
</tr>
@ -415,8 +415,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="110"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:110</a></div>
<div class="io-line">Defined in <a href="" data-line="41"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:41</a></div>
</td>
</tr>
@ -495,8 +495,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="74"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:74</a></div>
<div class="io-line">Defined in <a href="" data-line="46"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:46</a></div>
</td>
</tr>
@ -542,8 +542,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="122"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:122</a></div>
<div class="io-line">Defined in <a href="" data-line="52"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:52</a></div>
</td>
</tr>
@ -622,8 +622,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="104"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:104</a></div>
<div class="io-line">Defined in <a href="" data-line="57"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:57</a></div>
</td>
</tr>
@ -669,8 +669,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="69"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:69</a></div>
<div class="io-line">Defined in <a href="" data-line="62"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:62</a></div>
</td>
</tr>
@ -716,8 +716,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="116"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:116</a></div>
<div class="io-line">Defined in <a href="" data-line="68"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:68</a></div>
</td>
</tr>
@ -796,8 +796,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="128"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:128</a></div>
<div class="io-line">Defined in <a href="" data-line="74"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:74</a></div>
</td>
</tr>
@ -876,8 +876,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="46"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:46</a></div>
<div class="io-line">Defined in <a href="" data-line="79"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:79</a></div>
</td>
</tr>
@ -923,8 +923,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="134"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:134</a></div>
<div class="io-line">Defined in <a href="" data-line="85"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:85</a></div>
</td>
</tr>
@ -1003,8 +1003,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="56"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:56</a></div>
<div class="io-line">Defined in <a href="" data-line="90"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:90</a></div>
</td>
</tr>
@ -1050,8 +1050,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="51"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:51</a></div>
<div class="io-line">Defined in <a href="" data-line="95"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:95</a></div>
</td>
</tr>
@ -1097,8 +1097,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="27"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:27</a></div>
<div class="io-line">Defined in <a href="" data-line="103"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:103</a></div>
</td>
</tr>
@ -1194,8 +1194,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="41"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:41</a></div>
<div class="io-line">Defined in <a href="" data-line="110"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:110</a></div>
</td>
</tr>
@ -1273,8 +1273,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="34"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:34</a></div>
<div class="io-line">Defined in <a href="" data-line="117"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:117</a></div>
</td>
</tr>
@ -1352,8 +1352,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="88"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:88</a></div>
<div class="io-line">Defined in <a href="" data-line="124"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:124</a></div>
</td>
</tr>
@ -1432,8 +1432,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="81"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:81</a></div>
<div class="io-line">Defined in <a href="" data-line="131"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:131</a></div>
</td>
</tr>
@ -1512,8 +1512,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="19"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:19</a></div>
<div class="io-line">Defined in <a href="" data-line="136"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:136</a></div>
</td>
</tr>
@ -1553,8 +1553,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="140"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:140</a></div>
<div class="io-line">Defined in <a href="" data-line="142"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:142</a></div>
</td>
</tr>
@ -1633,8 +1633,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="152"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:152</a></div>
<div class="io-line">Defined in <a href="" data-line="148"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:148</a></div>
</td>
</tr>
@ -1713,8 +1713,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="146"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:146</a></div>
<div class="io-line">Defined in <a href="" data-line="154"
class="link-to-prism">src/app/_pgp/pgp-key-store.ts:154</a></div>
</td>
</tr>
@ -1870,48 +1870,8 @@ const keyring &#x3D; new openpgp.Keyring();
* @extends KeyStore
*/
interface MutableKeyStore extends KeyStore {
/**
* Instantiate the keyring in the keystore.
* @async
*/
loadKeyring(): void;
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importKeyPair(publicKey: any, privateKey: any): Promise&lt;void&gt;;
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
importPublicKey(publicKey: any): Promise&lt;void&gt;;
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importPrivateKey(privateKey: any): Promise&lt;void&gt;;
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array&lt;any&gt;;
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array&lt;any&gt;;
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array&lt;any&gt;;
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void;
/**
* Get all the encryption keys.
* @returns An array of encryption keys.
@ -1920,30 +1880,6 @@ interface MutableKeyStore extends KeyStore {
* This is included to appease the implemented Keystore interface.
*/
getEncryptKeys(): Array&lt;any&gt;;
/**
* Get all private keys.
* @returns An array of all private keys.
*/
getPrivateKeys(): Array&lt;any&gt;;
/**
* Get the first private key.
* @returns The first private key.
*/
getPrivateKey(): any;
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
isValidKey(key: any): Promise&lt;boolean&gt;;
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
isEncryptedPrivateKey(privateKey: any): Promise&lt;boolean&gt;;
/**
* Get the first private key&#x27;s fingerprint.
* @returns The first private key&#x27;s fingerprint.
@ -1955,11 +1891,6 @@ interface MutableKeyStore extends KeyStore {
* @returns The key&#x27;s keyId.
*/
getKeyId(key: any): string;
/**
* Get the first private key&#x27;s keyID.
* @returns The first private key&#x27;s keyId.
*/
getPrivateKeyId(): string;
/**
* Get keys from the keyring using their keyId.
* @param keyId - The keyId of the keys to be fetched from the keyring.
@ -1967,49 +1898,118 @@ interface MutableKeyStore extends KeyStore {
*/
getKeysForId(keyId: string): Array&lt;any&gt;;
/**
* Get a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be fetched from the keyring.
* @returns The public key with that keyId.
* Get the first private key.
* @returns The first private key.
*/
getPublicKeyForId(keyId: string): any;
getPrivateKey(): any;
/**
* Get a private key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the private key to be fetched from the keyring.
* @returns The private key with that keyId.
*/
getPrivateKeyForId(keyId: string): any;
/**
* Get the first private key&#x27;s keyID.
* @returns The first private key&#x27;s keyId.
*/
getPrivateKeyId(): string;
/**
* Get all private keys.
* @returns An array of all private keys.
*/
getPrivateKeys(): Array&lt;any&gt;;
/**
* Get a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be fetched from the keyring.
* @returns The public key with that keyId.
*/
getPublicKeyForId(keyId: string): any;
/**
* Get a public key from the keyring using it&#x27;s subkeyId.
* @param subkeyId - The subkeyId of the public key to be fetched from the keyring.
* @returns The public key with that subkeyId.
*/
getPublicKeyForSubkeyId(subkeyId: string): any;
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array&lt;any&gt;;
/**
* Get public keys from the keyring using their address.
* @param address - The address of the public keys to be fetched from the keyring.
* @returns An array of the public keys with that address.
*/
getPublicKeysForAddress(address: string): Array&lt;any&gt;;
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array&lt;any&gt;;
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array&lt;any&gt;;
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importKeyPair(publicKey: any, privateKey: any): Promise&lt;void&gt;;
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importPrivateKey(privateKey: any): Promise&lt;void&gt;;
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
importPublicKey(publicKey: any): Promise&lt;void&gt;;
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
isEncryptedPrivateKey(privateKey: any): Promise&lt;boolean&gt;;
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
isValidKey(key: any): Promise&lt;boolean&gt;;
/**
* Instantiate the keyring in the keystore.
* @async
*/
loadKeyring(): void;
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the keys to be removed from the keyring.
* @returns An array of the removed keys.
*/
removeKeysForId(keyId: string): Array&lt;any&gt;;
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId: string): any;
/**
* Remove a public key from the keyring.
* @param publicKey - The public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKey(publicKey: any): any;
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void;
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId: string): any;
/**
* Sign message using private key.
* @async
@ -2021,81 +2021,9 @@ interface MutableKeyStore extends KeyStore {
/** Provides a keyring for pgp keys. */
class MutablePgpKeyStore implements MutableKeyStore {
/**
* Instantiate the keyring in the keystore.
* @async
*/
async loadKeyring(): Promise&lt;void&gt; {
await keyring.load();
await keyring.store();
}
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importKeyPair(publicKey: any, privateKey: any): Promise&lt;void&gt; {
try {
await keyring.publicKeys.importKey(publicKey);
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
async importPublicKey(publicKey: any): Promise&lt;void&gt; {
try {
await keyring.publicKeys.importKey(publicKey);
} catch (error) {
throw error;
}
}
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importPrivateKey(privateKey: any): Promise&lt;void&gt; {
try {
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
}
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
}
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void {
keyring.clear();
}
/**
@ -2109,50 +2037,6 @@ class MutablePgpKeyStore implements MutableKeyStore {
return [];
}
/**
* Get all private keys.
* @returns An array of all private keys.
*/
getPrivateKeys(): Array&lt;any&gt; {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.keys;
}
/**
* Get the first private key.
* @returns The first private key.
*/
getPrivateKey(): any {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.keys[0];
}
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
async isValidKey(key): Promise&lt;boolean&gt; {
// There is supposed to be an openpgp.readKey() method but I can&#x27;t find it?
const testKey &#x3D; await openpgp.key.readArmored(key);
return !testKey.err;
}
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
async isEncryptedPrivateKey(privateKey: any): Promise&lt;boolean&gt; {
const imported &#x3D; await openpgp.key.readArmored(privateKey);
for (const key of imported.keys) {
if (key.isDecrypted()) {
return false;
}
}
return true;
}
/**
* Get the first private key&#x27;s fingerprint.
* @returns The first private key&#x27;s fingerprint.
@ -2176,6 +2060,32 @@ class MutablePgpKeyStore implements MutableKeyStore {
return key.getKeyId().toHex();
}
/**
* Get keys from the keyring using their keyId.
* @param keyId - The keyId of the keys to be fetched from the keyring.
* @returns An array of the keys with that keyId.
*/
getKeysForId(keyId: string): Array&lt;any&gt; {
return keyring.getKeysForId(keyId);
}
/**
* Get the first private key.
* @returns The first private key.
*/
getPrivateKey(): any {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.keys[0];
}
/**
* Get a private key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the private key to be fetched from the keyring.
* @returns The private key with that keyId.
*/
getPrivateKeyForId(keyId): any {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.getForId(keyId);
}
/**
* Get the first private key&#x27;s keyID.
* @returns The first private key&#x27;s keyId.
@ -2190,12 +2100,11 @@ class MutablePgpKeyStore implements MutableKeyStore {
}
/**
* Get keys from the keyring using their keyId.
* @param keyId - The keyId of the keys to be fetched from the keyring.
* @returns An array of the keys with that keyId.
* Get all private keys.
* @returns An array of all private keys.
*/
getKeysForId(keyId: string): Array&lt;any&gt; {
return keyring.getKeysForId(keyId);
getPrivateKeys(): Array&lt;any&gt; {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.keys;
}
/**
@ -2207,15 +2116,6 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.getForId(keyId);
}
/**
* Get a private key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the private key to be fetched from the keyring.
* @returns The private key with that keyId.
*/
getPrivateKeyForId(keyId): any {
return keyring.privateKeys &amp;&amp; keyring.privateKeys.getForId(keyId);
}
/**
* Get a public key from the keyring using it&#x27;s subkeyId.
* @param subkeyId - The subkeyId of the public key to be fetched from the keyring.
@ -2225,6 +2125,14 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.getForId(subkeyId, true);
}
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
}
/**
* Get public keys from the keyring using their address.
* @param address - The address of the public keys to be fetched from the keyring.
@ -2234,6 +2142,103 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.getForAddress(address);
}
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
}
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array&lt;any&gt; {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.keys;
}
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importKeyPair(publicKey: any, privateKey: any): Promise&lt;void&gt; {
try {
await keyring.publicKeys.importKey(publicKey);
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importPrivateKey(privateKey: any): Promise&lt;void&gt; {
try {
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
async importPublicKey(publicKey: any): Promise&lt;void&gt; {
try {
await keyring.publicKeys.importKey(publicKey);
} catch (error) {
throw error;
}
}
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
async isEncryptedPrivateKey(privateKey: any): Promise&lt;boolean&gt; {
const imported &#x3D; await openpgp.key.readArmored(privateKey);
for (const key of imported.keys) {
if (key.isDecrypted()) {
return false;
}
}
return true;
}
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
async isValidKey(key): Promise&lt;boolean&gt; {
// There is supposed to be an openpgp.readKey() method but I can&#x27;t find it?
const testKey &#x3D; await openpgp.key.readArmored(key);
return !testKey.err;
}
/**
* Instantiate the keyring in the keystore.
* @async
*/
async loadKeyring(): Promise&lt;void&gt; {
await keyring.load();
await keyring.store();
}
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the keys to be removed from the keyring.
@ -2243,15 +2248,6 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.removeKeysForId(keyId);
}
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId): any {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.removeForId(keyId);
}
/**
* Remove a public key from the keyring.
* @param publicKey - The public key to be removed from the keyring.
@ -2262,9 +2258,13 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.removeForId(keyId);
}
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void {
keyring.clear();
/**
* Remove a public key from the keyring using it&#x27;s keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId): any {
return keyring.publicKeys &amp;&amp; keyring.publicKeys.removeForId(keyId);
}
/**
@ -2290,7 +2290,7 @@ class MutablePgpKeyStore implements MutableKeyStore {
}
/** @exports */
export { MutablePgpKeyStore, MutableKeyStore };
export { MutableKeyStore, MutablePgpKeyStore };
</code></pre>
</div>
</div>

View File

@ -161,65 +161,65 @@ interface Signable {
/** Signature object interface */
interface Signature {
/** Encryption engine used. */
engine: string;
/** Encryption algorithm used */
algo: string;
/** Data to be signed. */
data: string;
/** Message digest */
digest: string;
/** Encryption engine used. */
engine: string;
}
/** Signer interface */
interface Signer {
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
fingerprint(): string;
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
prepare(material: Signable): boolean;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
sign(digest: string): Promise&lt;void&gt;;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
}
/** Provides functionality for signing and verifying signed messages. */
class PGPSigner implements Signer {
/** Encryption engine used. */
engine &#x3D; &#x27;pgp&#x27;;
/** Encryption algorithm used */
algo &#x3D; &#x27;sha256&#x27;;
/** Message digest */
dgst: string;
/** Generated signature */
signature: Signature;
/** Encryption engine used. */
engine &#x3D; &#x27;pgp&#x27;;
/** A keystore holding pgp keys. */
keyStore: MutableKeyStore;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/** Event triggered on successful signing of message. */
onsign: (signature: Signature) &#x3D;&gt; void;
/** Event triggered on successful verification of a signature. */
onverify: (flag: boolean) &#x3D;&gt; void;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/** Generated signature */
signature: Signature;
/**
* Initializing the Signer.
@ -249,6 +249,41 @@ class PGPSigner implements Signer {
return true;
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password &#x3D; window.prompt(&#x27;password&#x27;);
await pk.decrypt(password);
}
const opts &#x3D; {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) &#x3D;&gt; {
this.signature &#x3D; {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
@ -285,45 +320,10 @@ class PGPSigner implements Signer {
this.onverify(false);
});
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password &#x3D; window.prompt(&#x27;password&#x27;);
await pk.decrypt(password);
}
const opts &#x3D; {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) &#x3D;&gt; {
this.signature &#x3D; {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
}
/** @exports */
export { Signable, Signature, Signer, PGPSigner };
export { PGPSigner, Signable, Signature, Signer };
</code></pre>
</div>
</div>

View File

@ -61,14 +61,14 @@
<h3>File</h3>
</p>
<p class="comment">
<code>src/app/_models/account.ts</code>
<code>src/app/_pgp/pgp-signer.ts</code>
</p>
<p class="comment">
<h3>Description</h3>
</p>
<p class="comment">
<p>Meta signature interface </p>
<p>Signature object interface </p>
</p>
@ -137,7 +137,7 @@
<tr>
<td class="col-md-4">
<div class="io-description"><p>Algorithm used </p>
<div class="io-description"><p>Encryption algorithm used </p>
</div>
</td>
</tr>
@ -172,7 +172,7 @@
<tr>
<td class="col-md-4">
<div class="io-description"><p>Data that was signed. </p>
<div class="io-description"><p>Data to be signed. </p>
</div>
</td>
</tr>
@ -253,74 +253,23 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface AccountDetails {
/** Account registration day */
date_registered: number;
/** User&#x27;s gender */
gender: string;
/** Age of user */
age?: string;
/** Type of account */
type?: string;
/** Token balance on account */
balance?: number;
/** Account identifiers */
identities: {
evm: {
&#x27;bloxberg:8996&#x27;: string[];
&#x27;oldchain:1&#x27;: string[];
};
latitude: number;
longitude: number;
};
/** User&#x27;s location */
location: {
area?: string;
area_name: string;
area_type?: string;
};
/** Products or services provided by user. */
products: string[];
/** Business category of user. */
category?: string;
/** Personal identifying information of user */
vcard: {
email: [
{
value: string;
}
];
fn: [
{
value: string;
}
];
n: [
{
value: string[];
}
];
tel: [
{
meta: {
TYP: string[];
};
value: string;
}
];
version: [
{
value: string;
}
];
};
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import * as openpgp from &#x27;openpgp&#x27;;
// Application imports
import { MutableKeyStore } from &#x27;@app/_pgp/pgp-key-store&#x27;;
import { LoggingService } from &#x27;@app/_services/logging.service&#x27;;
/** Signable object interface */
interface Signable {
/** The message to be signed. */
digest(): string;
}
/** Meta signature interface */
/** Signature object interface */
interface Signature {
/** Algorithm used */
/** Encryption algorithm used */
algo: string;
/** Data that was signed. */
/** Data to be signed. */
data: string;
/** Message digest */
digest: string;
@ -328,74 +277,159 @@ interface Signature {
engine: string;
}
/** Meta object interface */
interface Meta {
/** Account details */
data: AccountDetails;
/** Meta store id */
id: string;
/** Signature used during write. */
/** Signer interface */
interface Signer {
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
fingerprint(): string;
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
prepare(material: Signable): boolean;
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
sign(digest: string): Promise&lt;void&gt;;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
}
/** Provides functionality for signing and verifying signed messages. */
class PGPSigner implements Signer {
/** Encryption algorithm used */
algo &#x3D; &#x27;sha256&#x27;;
/** Message digest */
dgst: string;
/** Encryption engine used. */
engine &#x3D; &#x27;pgp&#x27;;
/** A keystore holding pgp keys. */
keyStore: MutableKeyStore;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/** Event triggered on successful signing of message. */
onsign: (signature: Signature) &#x3D;&gt; void;
/** Event triggered on successful verification of a signature. */
onverify: (flag: boolean) &#x3D;&gt; void;
/** Generated signature */
signature: Signature;
}
/** Meta response interface */
interface MetaResponse {
/** Meta store id */
id: string;
/** Meta object */
m: Meta;
}
/**
* Initializing the Signer.
* @param keyStore - A keystore holding pgp keys.
*/
constructor(keyStore: MutableKeyStore) {
this.keyStore &#x3D; keyStore;
this.onsign &#x3D; (signature: Signature) &#x3D;&gt; {};
this.onverify &#x3D; (flag: boolean) &#x3D;&gt; {};
}
/** Default account data object */
const defaultAccount: AccountDetails &#x3D; {
date_registered: Date.now(),
gender: &#x27;other&#x27;,
identities: {
evm: {
&#x27;bloxberg:8996&#x27;: [&#x27;&#x27;],
&#x27;oldchain:1&#x27;: [&#x27;&#x27;],
},
latitude: 0,
longitude: 0,
},
location: {
area_name: &#x27;Kilifi&#x27;,
},
products: [],
vcard: {
email: [
{
value: &#x27;&#x27;,
},
],
fn: [
{
value: &#x27;Sarafu Contract&#x27;,
},
],
n: [
{
value: [&#x27;Sarafu&#x27;, &#x27;Contract&#x27;],
},
],
tel: [
{
meta: {
TYP: [],
},
value: &#x27;&#x27;,
},
],
version: [
{
value: &#x27;3.0&#x27;,
},
],
},
};
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
public fingerprint(): string {
return this.keyStore.getFingerprint();
}
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
public prepare(material: Signable): boolean {
this.dgst &#x3D; material.digest();
return true;
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password &#x3D; window.prompt(&#x27;password&#x27;);
await pk.decrypt(password);
}
const opts &#x3D; {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) &#x3D;&gt; {
this.signature &#x3D; {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
public verify(digest: string, signature: Signature): void {
openpgp.signature
.readArmored(signature.data)
.then((sig) &#x3D;&gt; {
const opts &#x3D; {
message: openpgp.cleartext.fromText(digest),
publicKeys: this.keyStore.getTrustedKeys(),
signature: sig,
};
openpgp.verify(opts).then((v) &#x3D;&gt; {
let i &#x3D; 0;
for (i &#x3D; 0; i &lt; v.signatures.length; i++) {
const s &#x3D; v.signatures[i];
if (s.valid) {
this.onverify(s);
return;
}
}
this.loggingService.sendErrorLevelMessage(
&#x60;Checked ${i} signature(s) but none valid&#x60;,
this,
{ error: &#x27;404 Not found!&#x27; }
);
this.onverify(false);
});
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onverify(false);
});
}
}
/** @exports */
export { AccountDetails, Meta, MetaResponse, Signature, defaultAccount };
export { PGPSigner, Signable, Signature, Signer };
</code></pre>
</div>
</div>

View File

@ -61,14 +61,14 @@
<h3>File</h3>
</p>
<p class="comment">
<code>src/app/_pgp/pgp-signer.ts</code>
<code>src/app/_models/account.ts</code>
</p>
<p class="comment">
<h3>Description</h3>
</p>
<p class="comment">
<p>Signature object interface </p>
<p>Meta signature interface </p>
</p>
@ -137,7 +137,7 @@
<tr>
<td class="col-md-4">
<div class="io-description"><p>Encryption algorithm used </p>
<div class="io-description"><p>Algorithm used </p>
</div>
</td>
</tr>
@ -172,7 +172,7 @@
<tr>
<td class="col-md-4">
<div class="io-description"><p>Data to be signed. </p>
<div class="io-description"><p>Data that was signed. </p>
</div>
</td>
</tr>
@ -253,183 +253,149 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import * as openpgp from &#x27;openpgp&#x27;;
// Application imports
import { MutableKeyStore } from &#x27;@app/_pgp/pgp-key-store&#x27;;
import { LoggingService } from &#x27;@app/_services/logging.service&#x27;;
/** Signable object interface */
interface Signable {
/** The message to be signed. */
digest(): string;
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface AccountDetails {
/** Age of user */
age?: string;
/** Token balance on account */
balance?: number;
/** Business category of user. */
category?: string;
/** Account registration day */
date_registered: number;
/** User&#x27;s gender */
gender: string;
/** Account identifiers */
identities: {
evm: {
&#x27;bloxberg:8996&#x27;: string[];
&#x27;oldchain:1&#x27;: string[];
};
latitude: number;
longitude: number;
};
/** User&#x27;s location */
location: {
area?: string;
area_name: string;
area_type?: string;
};
/** Products or services provided by user. */
products: string[];
/** Type of account */
type?: string;
/** Personal identifying information of user */
vcard: {
email: [
{
value: string;
}
];
fn: [
{
value: string;
}
];
n: [
{
value: string[];
}
];
tel: [
{
meta: {
TYP: string[];
};
value: string;
}
];
version: [
{
value: string;
}
];
};
}
/** Signature object interface */
/** Meta signature interface */
interface Signature {
/** Encryption engine used. */
engine: string;
/** Encryption algorithm used */
/** Algorithm used */
algo: string;
/** Data to be signed. */
/** Data that was signed. */
data: string;
/** Message digest */
digest: string;
}
/** Signer interface */
interface Signer {
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
fingerprint(): string;
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
prepare(material: Signable): boolean;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
sign(digest: string): Promise&lt;void&gt;;
}
/** Provides functionality for signing and verifying signed messages. */
class PGPSigner implements Signer {
/** Encryption engine used. */
engine &#x3D; &#x27;pgp&#x27;;
/** Encryption algorithm used */
algo &#x3D; &#x27;sha256&#x27;;
/** Message digest */
dgst: string;
/** Generated signature */
signature: Signature;
/** A keystore holding pgp keys. */
keyStore: MutableKeyStore;
/** Event triggered on successful signing of message. */
onsign: (signature: Signature) &#x3D;&gt; void;
/** Event triggered on successful verification of a signature. */
onverify: (flag: boolean) &#x3D;&gt; void;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/**
* Initializing the Signer.
* @param keyStore - A keystore holding pgp keys.
*/
constructor(keyStore: MutableKeyStore) {
this.keyStore &#x3D; keyStore;
this.onsign &#x3D; (signature: Signature) &#x3D;&gt; {};
this.onverify &#x3D; (flag: boolean) &#x3D;&gt; {};
}
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
public fingerprint(): string {
return this.keyStore.getFingerprint();
}
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
public prepare(material: Signable): boolean {
this.dgst &#x3D; material.digest();
return true;
}
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
public verify(digest: string, signature: Signature): void {
openpgp.signature
.readArmored(signature.data)
.then((sig) &#x3D;&gt; {
const opts &#x3D; {
message: openpgp.cleartext.fromText(digest),
publicKeys: this.keyStore.getTrustedKeys(),
signature: sig,
};
openpgp.verify(opts).then((v) &#x3D;&gt; {
let i &#x3D; 0;
for (i &#x3D; 0; i &lt; v.signatures.length; i++) {
const s &#x3D; v.signatures[i];
if (s.valid) {
this.onverify(s);
return;
}
}
this.loggingService.sendErrorLevelMessage(
&#x60;Checked ${i} signature(s) but none valid&#x60;,
this,
{ error: &#x27;404 Not found!&#x27; }
);
this.onverify(false);
});
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onverify(false);
});
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password &#x3D; window.prompt(&#x27;password&#x27;);
await pk.decrypt(password);
}
const opts &#x3D; {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) &#x3D;&gt; {
this.signature &#x3D; {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
engine: string;
}
/** Meta object interface */
interface Meta {
/** Account details */
data: AccountDetails;
/** Meta store id */
id: string;
/** Signature used during write. */
signature: Signature;
}
/** Meta response interface */
interface MetaResponse {
/** Meta store id */
id: string;
/** Meta object */
m: Meta;
}
/** Default account data object */
const defaultAccount: AccountDetails &#x3D; {
date_registered: Date.now(),
gender: &#x27;other&#x27;,
identities: {
evm: {
&#x27;bloxberg:8996&#x27;: [&#x27;&#x27;],
&#x27;oldchain:1&#x27;: [&#x27;&#x27;],
},
latitude: 0,
longitude: 0,
},
location: {
area_name: &#x27;Kilifi&#x27;,
},
products: [],
vcard: {
email: [
{
value: &#x27;&#x27;,
},
],
fn: [
{
value: &#x27;Sarafu Contract&#x27;,
},
],
n: [
{
value: [&#x27;Sarafu&#x27;, &#x27;Contract&#x27;],
},
],
tel: [
{
meta: {
TYP: [],
},
value: &#x27;&#x27;,
},
],
version: [
{
value: &#x27;3.0&#x27;,
},
],
},
};
/** @exports */
export { Signable, Signature, Signer, PGPSigner };
export { AccountDetails, Meta, MetaResponse, Signature, defaultAccount };
</code></pre>
</div>
</div>

View File

@ -137,8 +137,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="36"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:36</a></div>
<div class="io-line">Defined in <a href="" data-line="32"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:32</a></div>
</td>
</tr>
@ -184,8 +184,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="29"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:29</a></div>
<div class="io-line">Defined in <a href="" data-line="34"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:34</a></div>
</td>
</tr>
@ -256,8 +256,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="31"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:31</a></div>
<div class="io-line">Defined in <a href="" data-line="36"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:36</a></div>
</td>
</tr>
@ -408,8 +408,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="54"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:54</a></div>
<div class="io-line">Defined in <a href="" data-line="48"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:48</a></div>
</td>
</tr>
@ -487,8 +487,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="48"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:48</a></div>
<div class="io-line">Defined in <a href="" data-line="54"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:54</a></div>
</td>
</tr>
@ -582,65 +582,65 @@ interface Signable {
/** Signature object interface */
interface Signature {
/** Encryption engine used. */
engine: string;
/** Encryption algorithm used */
algo: string;
/** Data to be signed. */
data: string;
/** Message digest */
digest: string;
/** Encryption engine used. */
engine: string;
}
/** Signer interface */
interface Signer {
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
fingerprint(): string;
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
prepare(material: Signable): boolean;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
sign(digest: string): Promise&lt;void&gt;;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
}
/** Provides functionality for signing and verifying signed messages. */
class PGPSigner implements Signer {
/** Encryption engine used. */
engine &#x3D; &#x27;pgp&#x27;;
/** Encryption algorithm used */
algo &#x3D; &#x27;sha256&#x27;;
/** Message digest */
dgst: string;
/** Generated signature */
signature: Signature;
/** Encryption engine used. */
engine &#x3D; &#x27;pgp&#x27;;
/** A keystore holding pgp keys. */
keyStore: MutableKeyStore;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/** Event triggered on successful signing of message. */
onsign: (signature: Signature) &#x3D;&gt; void;
/** Event triggered on successful verification of a signature. */
onverify: (flag: boolean) &#x3D;&gt; void;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/** Generated signature */
signature: Signature;
/**
* Initializing the Signer.
@ -670,6 +670,41 @@ class PGPSigner implements Signer {
return true;
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password &#x3D; window.prompt(&#x27;password&#x27;);
await pk.decrypt(password);
}
const opts &#x3D; {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) &#x3D;&gt; {
this.signature &#x3D; {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
@ -706,45 +741,10 @@ class PGPSigner implements Signer {
this.onverify(false);
});
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password &#x3D; window.prompt(&#x27;password&#x27;);
await pk.decrypt(password);
}
const opts &#x3D; {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) &#x3D;&gt; {
this.signature &#x3D; {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
}
/** @exports */
export { Signable, Signature, Signer, PGPSigner };
export { PGPSigner, Signable, Signature, Signer };
</code></pre>
</div>
</div>

View File

@ -418,16 +418,16 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface Token {
/** Name of the token. */
name: string;
/** The unique token symbol. */
symbol: string;
/** Address of the deployed token contract. */
address: string;
/** Total token supply. */
supply: string;
/** Number of decimals to convert to smallest denomination of the token. */
decimals: string;
/** Name of the token. */
name: string;
/** Address of account that deployed token. */
owner?: string;
/** Token reserve to token minting ratio. */
reserveRatio?: string;
/** Token reserve information */
reserves: {
&#x27;0xa686005CE37Dce7738436256982C3903f2E4ea8E&#x27;?: {
@ -435,10 +435,10 @@
balance: string;
};
};
/** Token reserve to token minting ratio. */
reserveRatio?: string;
/** Address of account that deployed token. */
owner?: string;
/** Total token supply. */
supply: string;
/** The unique token symbol. */
symbol: string;
}
/** @exports */

View File

@ -425,30 +425,30 @@ interface Conversion {
toValue: number;
/** Address of the initiator of the conversion. */
trader: string;
/** Account information of the initiator of the conversion. */
user: AccountDetails;
/** Conversion mining information. */
tx: Tx;
/** Account information of the initiator of the conversion. */
user: AccountDetails;
}
/** Transaction object interface */
interface Transaction {
/** Address of the transaction sender. */
from: string;
/** Account information of the transaction recipient. */
recipient: AccountDetails;
/** Account information of the transaction sender. */
sender: AccountDetails;
/** Address of the transaction recipient. */
to: string;
/** Account information of the transaction recipient. */
recipient: AccountDetails;
/** Transaction token information. */
token: TxToken;
/** Transaction mining information. */
tx: Tx;
/** Amount of tokens transacted. */
value: number;
/** Type of transaction. */
type?: string;
/** Amount of tokens transacted. */
value: number;
}
/** Transaction data interface */

View File

@ -305,30 +305,30 @@ interface Conversion {
toValue: number;
/** Address of the initiator of the conversion. */
trader: string;
/** Account information of the initiator of the conversion. */
user: AccountDetails;
/** Conversion mining information. */
tx: Tx;
/** Account information of the initiator of the conversion. */
user: AccountDetails;
}
/** Transaction object interface */
interface Transaction {
/** Address of the transaction sender. */
from: string;
/** Account information of the transaction recipient. */
recipient: AccountDetails;
/** Account information of the transaction sender. */
sender: AccountDetails;
/** Address of the transaction recipient. */
to: string;
/** Account information of the transaction recipient. */
recipient: AccountDetails;
/** Transaction token information. */
token: TxToken;
/** Transaction mining information. */
tx: Tx;
/** Amount of tokens transacted. */
value: number;
/** Type of transaction. */
type?: string;
/** Amount of tokens transacted. */
value: number;
}
/** Transaction data interface */

View File

@ -229,30 +229,30 @@ interface Conversion {
toValue: number;
/** Address of the initiator of the conversion. */
trader: string;
/** Account information of the initiator of the conversion. */
user: AccountDetails;
/** Conversion mining information. */
tx: Tx;
/** Account information of the initiator of the conversion. */
user: AccountDetails;
}
/** Transaction object interface */
interface Transaction {
/** Address of the transaction sender. */
from: string;
/** Account information of the transaction recipient. */
recipient: AccountDetails;
/** Account information of the transaction sender. */
sender: AccountDetails;
/** Address of the transaction recipient. */
to: string;
/** Account information of the transaction recipient. */
recipient: AccountDetails;
/** Transaction token information. */
token: TxToken;
/** Transaction mining information. */
tx: Tx;
/** Amount of tokens transacted. */
value: number;
/** Type of transaction. */
type?: string;
/** Amount of tokens transacted. */
value: number;
}
/** Transaction data interface */

View File

@ -178,17 +178,17 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">class Settings {
/** CIC Registry instance */
registry: any;
/** A resource for searching through blocks on the blockchain network. */
scanFilter: any;
/** Transaction Helper instance */
txHelper: any;
/** Web3 Object */
w3: W3 &#x3D; {
engine: undefined,
provider: undefined,
};
/** A resource for searching through blocks on the blockchain network. */
scanFilter: any;
/** CIC Registry instance */
registry: any;
/** Transaction Helper instance */
txHelper: any;
/**
* Initialize the settings.

File diff suppressed because one or more lines are too long

View File

@ -65,22 +65,22 @@
<title>cluster_AppModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-268 1186,-268 1186,-70 8,-70"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_AppModule_bootstrap</title>
<polygon fill="none" stroke="black" points="584,-208 584,-260 708,-260 708,-208 584,-208"/>
<g id="clust7" class="cluster">
<title>cluster_AppModule_providers</title>
<polygon fill="none" stroke="black" points="415,-78 415,-130 1178,-130 1178,-78 415,-78"/>
</g>
<g id="clust4" class="cluster">
<title>cluster_AppModule_imports</title>
<polygon fill="none" stroke="black" points="917,-78 917,-130 1178,-130 1178,-78 917,-78"/>
</g>
<g id="clust7" class="cluster">
<title>cluster_AppModule_providers</title>
<polygon fill="none" stroke="black" points="146,-78 146,-130 909,-130 909,-78 146,-78"/>
<polygon fill="none" stroke="black" points="146,-78 146,-130 407,-130 407,-78 146,-78"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_AppModule_declarations</title>
<polygon fill="none" stroke="black" points="16,-78 16,-130 138,-130 138,-78 16,-78"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_AppModule_bootstrap</title>
<polygon fill="none" stroke="black" points="447,-208 447,-260 571,-260 571,-208 447,-208"/>
</g>
<!-- AppComponent -->
<g id="node1" class="node">
<title>AppComponent</title>
@ -90,98 +90,98 @@
<!-- AppModule -->
<g id="node2" class="node">
<title>AppModule</title>
<polygon fill="#8dd3c7" stroke="black" points="687.66,-187 684.66,-191 663.66,-191 660.66,-187 604.34,-187 604.34,-151 687.66,-151 687.66,-187"/>
<text text-anchor="middle" x="646" y="-164.8" font-family="Times,serif" font-size="14.00">AppModule</text>
<polygon fill="#8dd3c7" stroke="black" points="550.66,-187 547.66,-191 526.66,-191 523.66,-187 467.34,-187 467.34,-151 550.66,-151 550.66,-187"/>
<text text-anchor="middle" x="509" y="-164.8" font-family="Times,serif" font-size="14.00">AppModule</text>
</g>
<!-- AppComponent&#45;&gt;AppModule -->
<g id="edge1" class="edge">
<title>AppComponent&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M77,-122.29C77,-144.21 77,-178 77,-178 77,-178 594.16,-178 594.16,-178"/>
<polygon fill="black" stroke="black" points="594.16,-181.5 604.16,-178 594.16,-174.5 594.16,-181.5"/>
<path fill="none" stroke="black" d="M77,-122.29C77,-144.21 77,-178 77,-178 77,-178 457.19,-178 457.19,-178"/>
<polygon fill="black" stroke="black" points="457.19,-181.5 467.19,-178 457.19,-174.5 457.19,-181.5"/>
</g>
<!-- AppComponent -->
<g id="node5" class="node">
<title>AppComponent </title>
<polygon fill="#80b1d3" stroke="black" points="700.44,-252 591.56,-252 591.56,-216 700.44,-216 700.44,-252"/>
<text text-anchor="middle" x="646" y="-229.8" font-family="Times,serif" font-size="14.00">AppComponent </text>
<polygon fill="#80b1d3" stroke="black" points="563.44,-252 454.56,-252 454.56,-216 563.44,-216 563.44,-252"/>
<text text-anchor="middle" x="509" y="-229.8" font-family="Times,serif" font-size="14.00">AppComponent </text>
</g>
<!-- AppModule&#45;&gt;AppComponent -->
<g id="edge4" class="edge">
<title>AppModule&#45;&gt;AppComponent </title>
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M646,-187.11C646,-187.11 646,-205.99 646,-205.99"/>
<polygon fill="black" stroke="black" points="642.5,-205.99 646,-215.99 649.5,-205.99 642.5,-205.99"/>
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M509,-187.11C509,-187.11 509,-205.99 509,-205.99"/>
<polygon fill="black" stroke="black" points="505.5,-205.99 509,-215.99 512.5,-205.99 505.5,-205.99"/>
</g>
<!-- AppRoutingModule -->
<g id="node3" class="node">
<title>AppRoutingModule</title>
<polygon fill="#8dd3c7" stroke="black" points="1170.27,-122 1167.27,-126 1146.27,-126 1143.27,-122 1041.73,-122 1041.73,-86 1170.27,-86 1170.27,-122"/>
<text text-anchor="middle" x="1106" y="-99.8" font-family="Times,serif" font-size="14.00">AppRoutingModule</text>
<polygon fill="#8dd3c7" stroke="black" points="399.27,-122 396.27,-126 375.27,-126 372.27,-122 270.73,-122 270.73,-86 399.27,-86 399.27,-122"/>
<text text-anchor="middle" x="335" y="-99.8" font-family="Times,serif" font-size="14.00">AppRoutingModule</text>
</g>
<!-- AppRoutingModule&#45;&gt;AppModule -->
<g id="edge2" class="edge">
<title>AppRoutingModule&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M1106,-122.29C1106,-144.21 1106,-178 1106,-178 1106,-178 698.04,-178 698.04,-178"/>
<polygon fill="black" stroke="black" points="698.04,-174.5 688.04,-178 698.04,-181.5 698.04,-174.5"/>
<path fill="none" stroke="black" d="M335,-122.03C335,-138.4 335,-160 335,-160 335,-160 457.32,-160 457.32,-160"/>
<polygon fill="black" stroke="black" points="457.32,-163.5 467.32,-160 457.32,-156.5 457.32,-163.5"/>
</g>
<!-- SharedModule -->
<g id="node4" class="node">
<title>SharedModule</title>
<polygon fill="#8dd3c7" stroke="black" points="1023.42,-122 1020.42,-126 999.42,-126 996.42,-122 924.58,-122 924.58,-86 1023.42,-86 1023.42,-122"/>
<text text-anchor="middle" x="974" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
<polygon fill="#8dd3c7" stroke="black" points="252.42,-122 249.42,-126 228.42,-126 225.42,-122 153.58,-122 153.58,-86 252.42,-86 252.42,-122"/>
<text text-anchor="middle" x="203" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
</g>
<!-- SharedModule&#45;&gt;AppModule -->
<g id="edge3" class="edge">
<title>SharedModule&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M974,-122.11C974,-141.34 974,-169 974,-169 974,-169 697.87,-169 697.87,-169"/>
<polygon fill="black" stroke="black" points="697.87,-165.5 687.87,-169 697.87,-172.5 697.87,-165.5"/>
<path fill="none" stroke="black" d="M203,-122.11C203,-141.34 203,-169 203,-169 203,-169 457.09,-169 457.09,-169"/>
<polygon fill="black" stroke="black" points="457.09,-172.5 467.09,-169 457.09,-165.5 457.09,-172.5"/>
</g>
<!-- ErrorInterceptor -->
<g id="node6" class="node">
<title>ErrorInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="827" cy="-104" rx="73.53" ry="18"/>
<text text-anchor="middle" x="827" y="-99.8" font-family="Times,serif" font-size="14.00">ErrorInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="1096" cy="-104" rx="73.53" ry="18"/>
<text text-anchor="middle" x="1096" y="-99.8" font-family="Times,serif" font-size="14.00">ErrorInterceptor</text>
</g>
<!-- ErrorInterceptor&#45;&gt;AppModule -->
<g id="edge5" class="edge">
<title>ErrorInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M827,-122.03C827,-138.4 827,-160 827,-160 827,-160 697.98,-160 697.98,-160"/>
<polygon fill="black" stroke="black" points="697.98,-156.5 687.98,-160 697.98,-163.5 697.98,-156.5"/>
<path fill="none" stroke="black" d="M1096,-122.29C1096,-144.21 1096,-178 1096,-178 1096,-178 560.75,-178 560.75,-178"/>
<polygon fill="black" stroke="black" points="560.75,-174.5 550.75,-178 560.74,-181.5 560.75,-174.5"/>
</g>
<!-- GlobalErrorHandler -->
<g id="node7" class="node">
<title>GlobalErrorHandler</title>
<ellipse fill="#fdb462" stroke="black" cx="646" cy="-104" rx="88.58" ry="18"/>
<text text-anchor="middle" x="646" y="-99.8" font-family="Times,serif" font-size="14.00">GlobalErrorHandler</text>
<ellipse fill="#fdb462" stroke="black" cx="915" cy="-104" rx="88.58" ry="18"/>
<text text-anchor="middle" x="915" y="-99.8" font-family="Times,serif" font-size="14.00">GlobalErrorHandler</text>
</g>
<!-- GlobalErrorHandler&#45;&gt;AppModule -->
<g id="edge6" class="edge">
<title>GlobalErrorHandler&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M646,-122.11C646,-122.11 646,-140.99 646,-140.99"/>
<polygon fill="black" stroke="black" points="642.5,-140.99 646,-150.99 649.5,-140.99 642.5,-140.99"/>
<path fill="none" stroke="black" d="M915,-122.11C915,-141.34 915,-169 915,-169 915,-169 560.92,-169 560.92,-169"/>
<polygon fill="black" stroke="black" points="560.92,-165.5 550.92,-169 560.92,-172.5 560.92,-165.5"/>
</g>
<!-- HttpConfigInterceptor -->
<g id="node8" class="node">
<title>HttpConfigInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="442" cy="-104" rx="97.27" ry="18"/>
<text text-anchor="middle" x="442" y="-99.8" font-family="Times,serif" font-size="14.00">HttpConfigInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="711" cy="-104" rx="97.27" ry="18"/>
<text text-anchor="middle" x="711" y="-99.8" font-family="Times,serif" font-size="14.00">HttpConfigInterceptor</text>
</g>
<!-- HttpConfigInterceptor&#45;&gt;AppModule -->
<g id="edge7" class="edge">
<title>HttpConfigInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M442,-122.03C442,-138.4 442,-160 442,-160 442,-160 594.23,-160 594.23,-160"/>
<polygon fill="black" stroke="black" points="594.23,-163.5 604.23,-160 594.23,-156.5 594.23,-163.5"/>
<path fill="none" stroke="black" d="M711,-122.03C711,-138.4 711,-160 711,-160 711,-160 560.85,-160 560.85,-160"/>
<polygon fill="black" stroke="black" points="560.85,-156.5 550.85,-160 560.85,-163.5 560.85,-156.5"/>
</g>
<!-- LoggingInterceptor -->
<g id="node9" class="node">
<title>LoggingInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="240" cy="-104" rx="86.24" ry="18"/>
<text text-anchor="middle" x="240" y="-99.8" font-family="Times,serif" font-size="14.00">LoggingInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="509" cy="-104" rx="86.24" ry="18"/>
<text text-anchor="middle" x="509" y="-99.8" font-family="Times,serif" font-size="14.00">LoggingInterceptor</text>
</g>
<!-- LoggingInterceptor&#45;&gt;AppModule -->
<g id="edge8" class="edge">
<title>LoggingInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M240,-122.11C240,-141.34 240,-169 240,-169 240,-169 594.08,-169 594.08,-169"/>
<polygon fill="black" stroke="black" points="594.08,-172.5 604.08,-169 594.08,-165.5 594.08,-172.5"/>
<path fill="none" stroke="black" d="M509,-122.11C509,-122.11 509,-140.99 509,-140.99"/>
<polygon fill="black" stroke="black" points="505.5,-140.99 509,-150.99 512.5,-140.99 505.5,-140.99"/>
</g>
</g>
</svg>

View File

@ -24,22 +24,22 @@
<title>cluster_AppModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-268 1186,-268 1186,-70 8,-70"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_AppModule_bootstrap</title>
<polygon fill="none" stroke="black" points="584,-208 584,-260 708,-260 708,-208 584,-208"/>
<g id="clust7" class="cluster">
<title>cluster_AppModule_providers</title>
<polygon fill="none" stroke="black" points="415,-78 415,-130 1178,-130 1178,-78 415,-78"/>
</g>
<g id="clust4" class="cluster">
<title>cluster_AppModule_imports</title>
<polygon fill="none" stroke="black" points="917,-78 917,-130 1178,-130 1178,-78 917,-78"/>
</g>
<g id="clust7" class="cluster">
<title>cluster_AppModule_providers</title>
<polygon fill="none" stroke="black" points="146,-78 146,-130 909,-130 909,-78 146,-78"/>
<polygon fill="none" stroke="black" points="146,-78 146,-130 407,-130 407,-78 146,-78"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_AppModule_declarations</title>
<polygon fill="none" stroke="black" points="16,-78 16,-130 138,-130 138,-78 16,-78"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_AppModule_bootstrap</title>
<polygon fill="none" stroke="black" points="447,-208 447,-260 571,-260 571,-208 447,-208"/>
</g>
<!-- AppComponent -->
<g id="node1" class="node">
<title>AppComponent</title>
@ -49,98 +49,98 @@
<!-- AppModule -->
<g id="node2" class="node">
<title>AppModule</title>
<polygon fill="#8dd3c7" stroke="black" points="687.66,-187 684.66,-191 663.66,-191 660.66,-187 604.34,-187 604.34,-151 687.66,-151 687.66,-187"/>
<text text-anchor="middle" x="646" y="-164.8" font-family="Times,serif" font-size="14.00">AppModule</text>
<polygon fill="#8dd3c7" stroke="black" points="550.66,-187 547.66,-191 526.66,-191 523.66,-187 467.34,-187 467.34,-151 550.66,-151 550.66,-187"/>
<text text-anchor="middle" x="509" y="-164.8" font-family="Times,serif" font-size="14.00">AppModule</text>
</g>
<!-- AppComponent&#45;&gt;AppModule -->
<g id="edge1" class="edge">
<title>AppComponent&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M77,-122.29C77,-144.21 77,-178 77,-178 77,-178 594.16,-178 594.16,-178"/>
<polygon fill="black" stroke="black" points="594.16,-181.5 604.16,-178 594.16,-174.5 594.16,-181.5"/>
<path fill="none" stroke="black" d="M77,-122.29C77,-144.21 77,-178 77,-178 77,-178 457.19,-178 457.19,-178"/>
<polygon fill="black" stroke="black" points="457.19,-181.5 467.19,-178 457.19,-174.5 457.19,-181.5"/>
</g>
<!-- AppComponent -->
<g id="node5" class="node">
<title>AppComponent </title>
<polygon fill="#80b1d3" stroke="black" points="700.44,-252 591.56,-252 591.56,-216 700.44,-216 700.44,-252"/>
<text text-anchor="middle" x="646" y="-229.8" font-family="Times,serif" font-size="14.00">AppComponent </text>
<polygon fill="#80b1d3" stroke="black" points="563.44,-252 454.56,-252 454.56,-216 563.44,-216 563.44,-252"/>
<text text-anchor="middle" x="509" y="-229.8" font-family="Times,serif" font-size="14.00">AppComponent </text>
</g>
<!-- AppModule&#45;&gt;AppComponent -->
<g id="edge4" class="edge">
<title>AppModule&#45;&gt;AppComponent </title>
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M646,-187.11C646,-187.11 646,-205.99 646,-205.99"/>
<polygon fill="black" stroke="black" points="642.5,-205.99 646,-215.99 649.5,-205.99 642.5,-205.99"/>
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M509,-187.11C509,-187.11 509,-205.99 509,-205.99"/>
<polygon fill="black" stroke="black" points="505.5,-205.99 509,-215.99 512.5,-205.99 505.5,-205.99"/>
</g>
<!-- AppRoutingModule -->
<g id="node3" class="node">
<title>AppRoutingModule</title>
<polygon fill="#8dd3c7" stroke="black" points="1170.27,-122 1167.27,-126 1146.27,-126 1143.27,-122 1041.73,-122 1041.73,-86 1170.27,-86 1170.27,-122"/>
<text text-anchor="middle" x="1106" y="-99.8" font-family="Times,serif" font-size="14.00">AppRoutingModule</text>
<polygon fill="#8dd3c7" stroke="black" points="399.27,-122 396.27,-126 375.27,-126 372.27,-122 270.73,-122 270.73,-86 399.27,-86 399.27,-122"/>
<text text-anchor="middle" x="335" y="-99.8" font-family="Times,serif" font-size="14.00">AppRoutingModule</text>
</g>
<!-- AppRoutingModule&#45;&gt;AppModule -->
<g id="edge2" class="edge">
<title>AppRoutingModule&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M1106,-122.29C1106,-144.21 1106,-178 1106,-178 1106,-178 698.04,-178 698.04,-178"/>
<polygon fill="black" stroke="black" points="698.04,-174.5 688.04,-178 698.04,-181.5 698.04,-174.5"/>
<path fill="none" stroke="black" d="M335,-122.03C335,-138.4 335,-160 335,-160 335,-160 457.32,-160 457.32,-160"/>
<polygon fill="black" stroke="black" points="457.32,-163.5 467.32,-160 457.32,-156.5 457.32,-163.5"/>
</g>
<!-- SharedModule -->
<g id="node4" class="node">
<title>SharedModule</title>
<polygon fill="#8dd3c7" stroke="black" points="1023.42,-122 1020.42,-126 999.42,-126 996.42,-122 924.58,-122 924.58,-86 1023.42,-86 1023.42,-122"/>
<text text-anchor="middle" x="974" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
<polygon fill="#8dd3c7" stroke="black" points="252.42,-122 249.42,-126 228.42,-126 225.42,-122 153.58,-122 153.58,-86 252.42,-86 252.42,-122"/>
<text text-anchor="middle" x="203" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
</g>
<!-- SharedModule&#45;&gt;AppModule -->
<g id="edge3" class="edge">
<title>SharedModule&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M974,-122.11C974,-141.34 974,-169 974,-169 974,-169 697.87,-169 697.87,-169"/>
<polygon fill="black" stroke="black" points="697.87,-165.5 687.87,-169 697.87,-172.5 697.87,-165.5"/>
<path fill="none" stroke="black" d="M203,-122.11C203,-141.34 203,-169 203,-169 203,-169 457.09,-169 457.09,-169"/>
<polygon fill="black" stroke="black" points="457.09,-172.5 467.09,-169 457.09,-165.5 457.09,-172.5"/>
</g>
<!-- ErrorInterceptor -->
<g id="node6" class="node">
<title>ErrorInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="827" cy="-104" rx="73.53" ry="18"/>
<text text-anchor="middle" x="827" y="-99.8" font-family="Times,serif" font-size="14.00">ErrorInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="1096" cy="-104" rx="73.53" ry="18"/>
<text text-anchor="middle" x="1096" y="-99.8" font-family="Times,serif" font-size="14.00">ErrorInterceptor</text>
</g>
<!-- ErrorInterceptor&#45;&gt;AppModule -->
<g id="edge5" class="edge">
<title>ErrorInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M827,-122.03C827,-138.4 827,-160 827,-160 827,-160 697.98,-160 697.98,-160"/>
<polygon fill="black" stroke="black" points="697.98,-156.5 687.98,-160 697.98,-163.5 697.98,-156.5"/>
<path fill="none" stroke="black" d="M1096,-122.29C1096,-144.21 1096,-178 1096,-178 1096,-178 560.75,-178 560.75,-178"/>
<polygon fill="black" stroke="black" points="560.75,-174.5 550.75,-178 560.74,-181.5 560.75,-174.5"/>
</g>
<!-- GlobalErrorHandler -->
<g id="node7" class="node">
<title>GlobalErrorHandler</title>
<ellipse fill="#fdb462" stroke="black" cx="646" cy="-104" rx="88.58" ry="18"/>
<text text-anchor="middle" x="646" y="-99.8" font-family="Times,serif" font-size="14.00">GlobalErrorHandler</text>
<ellipse fill="#fdb462" stroke="black" cx="915" cy="-104" rx="88.58" ry="18"/>
<text text-anchor="middle" x="915" y="-99.8" font-family="Times,serif" font-size="14.00">GlobalErrorHandler</text>
</g>
<!-- GlobalErrorHandler&#45;&gt;AppModule -->
<g id="edge6" class="edge">
<title>GlobalErrorHandler&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M646,-122.11C646,-122.11 646,-140.99 646,-140.99"/>
<polygon fill="black" stroke="black" points="642.5,-140.99 646,-150.99 649.5,-140.99 642.5,-140.99"/>
<path fill="none" stroke="black" d="M915,-122.11C915,-141.34 915,-169 915,-169 915,-169 560.92,-169 560.92,-169"/>
<polygon fill="black" stroke="black" points="560.92,-165.5 550.92,-169 560.92,-172.5 560.92,-165.5"/>
</g>
<!-- HttpConfigInterceptor -->
<g id="node8" class="node">
<title>HttpConfigInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="442" cy="-104" rx="97.27" ry="18"/>
<text text-anchor="middle" x="442" y="-99.8" font-family="Times,serif" font-size="14.00">HttpConfigInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="711" cy="-104" rx="97.27" ry="18"/>
<text text-anchor="middle" x="711" y="-99.8" font-family="Times,serif" font-size="14.00">HttpConfigInterceptor</text>
</g>
<!-- HttpConfigInterceptor&#45;&gt;AppModule -->
<g id="edge7" class="edge">
<title>HttpConfigInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M442,-122.03C442,-138.4 442,-160 442,-160 442,-160 594.23,-160 594.23,-160"/>
<polygon fill="black" stroke="black" points="594.23,-163.5 604.23,-160 594.23,-156.5 594.23,-163.5"/>
<path fill="none" stroke="black" d="M711,-122.03C711,-138.4 711,-160 711,-160 711,-160 560.85,-160 560.85,-160"/>
<polygon fill="black" stroke="black" points="560.85,-156.5 550.85,-160 560.85,-163.5 560.85,-156.5"/>
</g>
<!-- LoggingInterceptor -->
<g id="node9" class="node">
<title>LoggingInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="240" cy="-104" rx="86.24" ry="18"/>
<text text-anchor="middle" x="240" y="-99.8" font-family="Times,serif" font-size="14.00">LoggingInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="509" cy="-104" rx="86.24" ry="18"/>
<text text-anchor="middle" x="509" y="-99.8" font-family="Times,serif" font-size="14.00">LoggingInterceptor</text>
</g>
<!-- LoggingInterceptor&#45;&gt;AppModule -->
<g id="edge8" class="edge">
<title>LoggingInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M240,-122.11C240,-141.34 240,-169 240,-169 240,-169 594.08,-169 594.08,-169"/>
<polygon fill="black" stroke="black" points="594.08,-172.5 604.08,-169 594.08,-165.5 594.08,-172.5"/>
<path fill="none" stroke="black" d="M509,-122.11C509,-122.11 509,-140.99 509,-140.99"/>
<polygon fill="black" stroke="black" points="505.5,-140.99 509,-150.99 512.5,-140.99 505.5,-140.99"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -65,55 +65,55 @@
<title>cluster_PagesModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="36,-70 36,-195 460,-195 460,-70 36,-70"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_PagesModule_declarations</title>
<polygon fill="none" stroke="black" points="322,-78 322,-130 452,-130 452,-78 322,-78"/>
</g>
<g id="clust4" class="cluster">
<title>cluster_PagesModule_imports</title>
<polygon fill="none" stroke="black" points="44,-78 44,-130 314,-130 314,-78 44,-78"/>
<polygon fill="none" stroke="black" points="182,-78 182,-130 452,-130 452,-78 182,-78"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_PagesModule_declarations</title>
<polygon fill="none" stroke="black" points="44,-78 44,-130 174,-130 174,-78 44,-78"/>
</g>
<!-- PagesComponent -->
<g id="node1" class="node">
<title>PagesComponent</title>
<polygon fill="#ffffb3" stroke="black" points="443.99,-122 330.01,-122 330.01,-86 443.99,-86 443.99,-122"/>
<text text-anchor="middle" x="387" y="-99.8" font-family="Times,serif" font-size="14.00">PagesComponent</text>
<polygon fill="#ffffb3" stroke="black" points="165.99,-122 52.01,-122 52.01,-86 165.99,-86 165.99,-122"/>
<text text-anchor="middle" x="109" y="-99.8" font-family="Times,serif" font-size="14.00">PagesComponent</text>
</g>
<!-- PagesModule -->
<g id="node2" class="node">
<title>PagesModule</title>
<polygon fill="#8dd3c7" stroke="black" points="283.21,-187 280.21,-191 259.21,-191 256.21,-187 190.79,-187 190.79,-151 283.21,-151 283.21,-187"/>
<text text-anchor="middle" x="237" y="-164.8" font-family="Times,serif" font-size="14.00">PagesModule</text>
<polygon fill="#8dd3c7" stroke="black" points="285.21,-187 282.21,-191 261.21,-191 258.21,-187 192.79,-187 192.79,-151 285.21,-151 285.21,-187"/>
<text text-anchor="middle" x="239" y="-164.8" font-family="Times,serif" font-size="14.00">PagesModule</text>
</g>
<!-- PagesComponent&#45;&gt;PagesModule -->
<g id="edge1" class="edge">
<title>PagesComponent&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M387,-122.11C387,-141.34 387,-169 387,-169 387,-169 293.23,-169 293.23,-169"/>
<polygon fill="black" stroke="black" points="293.23,-165.5 283.23,-169 293.23,-172.5 293.23,-165.5"/>
<path fill="none" stroke="black" d="M109,-122.11C109,-141.34 109,-169 109,-169 109,-169 182.8,-169 182.8,-169"/>
<polygon fill="black" stroke="black" points="182.8,-172.5 192.8,-169 182.8,-165.5 182.8,-172.5"/>
</g>
<!-- PagesRoutingModule -->
<g id="node3" class="node">
<title>PagesRoutingModule</title>
<polygon fill="#8dd3c7" stroke="black" points="305.82,-122 302.82,-126 281.82,-126 278.82,-122 168.18,-122 168.18,-86 305.82,-86 305.82,-122"/>
<text text-anchor="middle" x="237" y="-99.8" font-family="Times,serif" font-size="14.00">PagesRoutingModule</text>
<polygon fill="#8dd3c7" stroke="black" points="443.82,-122 440.82,-126 419.82,-126 416.82,-122 306.18,-122 306.18,-86 443.82,-86 443.82,-122"/>
<text text-anchor="middle" x="375" y="-99.8" font-family="Times,serif" font-size="14.00">PagesRoutingModule</text>
</g>
<!-- PagesRoutingModule&#45;&gt;PagesModule -->
<g id="edge2" class="edge">
<title>PagesRoutingModule&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M237,-122.11C237,-122.11 237,-140.99 237,-140.99"/>
<polygon fill="black" stroke="black" points="233.5,-140.99 237,-150.99 240.5,-140.99 233.5,-140.99"/>
<path fill="none" stroke="black" d="M375,-122.11C375,-141.34 375,-169 375,-169 375,-169 295.42,-169 295.42,-169"/>
<polygon fill="black" stroke="black" points="295.42,-165.5 285.42,-169 295.42,-172.5 295.42,-165.5"/>
</g>
<!-- SharedModule -->
<g id="node4" class="node">
<title>SharedModule</title>
<polygon fill="#8dd3c7" stroke="black" points="150.42,-122 147.42,-126 126.42,-126 123.42,-122 51.58,-122 51.58,-86 150.42,-86 150.42,-122"/>
<text text-anchor="middle" x="101" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
<polygon fill="#8dd3c7" stroke="black" points="288.42,-122 285.42,-126 264.42,-126 261.42,-122 189.58,-122 189.58,-86 288.42,-86 288.42,-122"/>
<text text-anchor="middle" x="239" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
</g>
<!-- SharedModule&#45;&gt;PagesModule -->
<g id="edge3" class="edge">
<title>SharedModule&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M101,-122.11C101,-141.34 101,-169 101,-169 101,-169 180.58,-169 180.58,-169"/>
<polygon fill="black" stroke="black" points="180.58,-172.5 190.58,-169 180.58,-165.5 180.58,-172.5"/>
<path fill="none" stroke="black" d="M239,-122.11C239,-122.11 239,-140.99 239,-140.99"/>
<polygon fill="black" stroke="black" points="235.5,-140.99 239,-150.99 242.5,-140.99 235.5,-140.99"/>
</g>
</g>
</svg>

View File

@ -24,55 +24,55 @@
<title>cluster_PagesModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="36,-70 36,-195 460,-195 460,-70 36,-70"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_PagesModule_declarations</title>
<polygon fill="none" stroke="black" points="322,-78 322,-130 452,-130 452,-78 322,-78"/>
</g>
<g id="clust4" class="cluster">
<title>cluster_PagesModule_imports</title>
<polygon fill="none" stroke="black" points="44,-78 44,-130 314,-130 314,-78 44,-78"/>
<polygon fill="none" stroke="black" points="182,-78 182,-130 452,-130 452,-78 182,-78"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_PagesModule_declarations</title>
<polygon fill="none" stroke="black" points="44,-78 44,-130 174,-130 174,-78 44,-78"/>
</g>
<!-- PagesComponent -->
<g id="node1" class="node">
<title>PagesComponent</title>
<polygon fill="#ffffb3" stroke="black" points="443.99,-122 330.01,-122 330.01,-86 443.99,-86 443.99,-122"/>
<text text-anchor="middle" x="387" y="-99.8" font-family="Times,serif" font-size="14.00">PagesComponent</text>
<polygon fill="#ffffb3" stroke="black" points="165.99,-122 52.01,-122 52.01,-86 165.99,-86 165.99,-122"/>
<text text-anchor="middle" x="109" y="-99.8" font-family="Times,serif" font-size="14.00">PagesComponent</text>
</g>
<!-- PagesModule -->
<g id="node2" class="node">
<title>PagesModule</title>
<polygon fill="#8dd3c7" stroke="black" points="283.21,-187 280.21,-191 259.21,-191 256.21,-187 190.79,-187 190.79,-151 283.21,-151 283.21,-187"/>
<text text-anchor="middle" x="237" y="-164.8" font-family="Times,serif" font-size="14.00">PagesModule</text>
<polygon fill="#8dd3c7" stroke="black" points="285.21,-187 282.21,-191 261.21,-191 258.21,-187 192.79,-187 192.79,-151 285.21,-151 285.21,-187"/>
<text text-anchor="middle" x="239" y="-164.8" font-family="Times,serif" font-size="14.00">PagesModule</text>
</g>
<!-- PagesComponent&#45;&gt;PagesModule -->
<g id="edge1" class="edge">
<title>PagesComponent&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M387,-122.11C387,-141.34 387,-169 387,-169 387,-169 293.23,-169 293.23,-169"/>
<polygon fill="black" stroke="black" points="293.23,-165.5 283.23,-169 293.23,-172.5 293.23,-165.5"/>
<path fill="none" stroke="black" d="M109,-122.11C109,-141.34 109,-169 109,-169 109,-169 182.8,-169 182.8,-169"/>
<polygon fill="black" stroke="black" points="182.8,-172.5 192.8,-169 182.8,-165.5 182.8,-172.5"/>
</g>
<!-- PagesRoutingModule -->
<g id="node3" class="node">
<title>PagesRoutingModule</title>
<polygon fill="#8dd3c7" stroke="black" points="305.82,-122 302.82,-126 281.82,-126 278.82,-122 168.18,-122 168.18,-86 305.82,-86 305.82,-122"/>
<text text-anchor="middle" x="237" y="-99.8" font-family="Times,serif" font-size="14.00">PagesRoutingModule</text>
<polygon fill="#8dd3c7" stroke="black" points="443.82,-122 440.82,-126 419.82,-126 416.82,-122 306.18,-122 306.18,-86 443.82,-86 443.82,-122"/>
<text text-anchor="middle" x="375" y="-99.8" font-family="Times,serif" font-size="14.00">PagesRoutingModule</text>
</g>
<!-- PagesRoutingModule&#45;&gt;PagesModule -->
<g id="edge2" class="edge">
<title>PagesRoutingModule&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M237,-122.11C237,-122.11 237,-140.99 237,-140.99"/>
<polygon fill="black" stroke="black" points="233.5,-140.99 237,-150.99 240.5,-140.99 233.5,-140.99"/>
<path fill="none" stroke="black" d="M375,-122.11C375,-141.34 375,-169 375,-169 375,-169 295.42,-169 295.42,-169"/>
<polygon fill="black" stroke="black" points="295.42,-165.5 285.42,-169 295.42,-172.5 295.42,-165.5"/>
</g>
<!-- SharedModule -->
<g id="node4" class="node">
<title>SharedModule</title>
<polygon fill="#8dd3c7" stroke="black" points="150.42,-122 147.42,-126 126.42,-126 123.42,-122 51.58,-122 51.58,-86 150.42,-86 150.42,-122"/>
<text text-anchor="middle" x="101" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
<polygon fill="#8dd3c7" stroke="black" points="288.42,-122 285.42,-126 264.42,-126 261.42,-122 189.58,-122 189.58,-86 288.42,-86 288.42,-122"/>
<text text-anchor="middle" x="239" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
</g>
<!-- SharedModule&#45;&gt;PagesModule -->
<g id="edge3" class="edge">
<title>SharedModule&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M101,-122.11C101,-141.34 101,-169 101,-169 101,-169 180.58,-169 180.58,-169"/>
<polygon fill="black" stroke="black" points="180.58,-172.5 190.58,-169 180.58,-165.5 180.58,-172.5"/>
<path fill="none" stroke="black" d="M239,-122.11C239,-122.11 239,-140.99 239,-140.99"/>
<polygon fill="black" stroke="black" points="235.5,-140.99 239,-150.99 242.5,-140.99 235.5,-140.99"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -65,14 +65,14 @@
<title>cluster_TransactionsModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-268 714,-268 714,-70 8,-70"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_TransactionsModule_exports</title>
<polygon fill="none" stroke="black" points="288,-208 288,-260 494,-260 494,-208 288,-208"/>
</g>
<g id="clust5" class="cluster">
<title>cluster_TransactionsModule_imports</title>
<polygon fill="none" stroke="black" points="398,-78 398,-130 706,-130 706,-78 398,-78"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_TransactionsModule_exports</title>
<polygon fill="none" stroke="black" points="288,-208 288,-260 494,-260 494,-208 288,-208"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_TransactionsModule_declarations</title>
<polygon fill="none" stroke="black" points="16,-78 16,-130 390,-130 390,-78 16,-78"/>

View File

@ -24,14 +24,14 @@
<title>cluster_TransactionsModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-268 714,-268 714,-70 8,-70"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_TransactionsModule_exports</title>
<polygon fill="none" stroke="black" points="288,-208 288,-260 494,-260 494,-208 288,-208"/>
</g>
<g id="clust5" class="cluster">
<title>cluster_TransactionsModule_imports</title>
<polygon fill="none" stroke="black" points="398,-78 398,-130 706,-130 706,-78 398,-78"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_TransactionsModule_exports</title>
<polygon fill="none" stroke="black" points="288,-208 288,-260 494,-260 494,-208 288,-208"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_TransactionsModule_declarations</title>
<polygon fill="none" stroke="black" points="16,-78 16,-130 390,-130 390,-78 16,-78"/>

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

File diff suppressed because one or more lines are too long

View File

@ -148,7 +148,7 @@
<div class="tsd-signature tsd-kind-icon">registry<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/settings.ts:11</li>
<li>Defined in src/app/_models/settings.ts:4</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -163,7 +163,7 @@
<div class="tsd-signature tsd-kind-icon">scan<wbr>Filter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/settings.ts:9</li>
<li>Defined in src/app/_models/settings.ts:6</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -178,7 +178,7 @@
<div class="tsd-signature tsd-kind-icon">tx<wbr>Helper<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/settings.ts:13</li>
<li>Defined in src/app/_models/settings.ts:8</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -193,7 +193,7 @@
<div class="tsd-signature tsd-kind-icon">w3<span class="tsd-signature-symbol">:</span> <a href="../interfaces/app__models_settings.w3.html" class="tsd-signature-type" data-tsd-kind="Interface">W3</a><span class="tsd-signature-symbol"> = ...</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/settings.ts:4</li>
<li>Defined in src/app/_models/settings.ts:10</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -163,7 +163,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#clearkeysinkeyring">clearKeysInKeyring</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:408</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:167</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -186,7 +186,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getencryptkeys">getEncryptKeys</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:250</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:178</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -216,7 +216,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getfingerprint">getFingerprint</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:302</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:186</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -240,7 +240,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getkeyid">getKeyId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:317</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:201</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -273,7 +273,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getkeysforid">getKeysForId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:339</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:210</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -306,7 +306,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getprivatekey">getPrivateKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:266</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:218</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -330,7 +330,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getprivatekeyforid">getPrivateKeyForId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:357</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:227</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -363,7 +363,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getprivatekeyid">getPrivateKeyId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:325</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:235</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -387,7 +387,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getprivatekeys">getPrivateKeys</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:258</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:248</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -411,7 +411,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getpublickeyforid">getPublicKeyForId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:348</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:257</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -444,7 +444,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getpublickeyforsubkeyid">getPublicKeyForSubkeyId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:366</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:266</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -477,7 +477,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getpublickeys">getPublicKeys</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:223</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:274</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -501,7 +501,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getpublickeysforaddress">getPublicKeysForAddress</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:375</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:283</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -534,7 +534,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#gettrustedactivekeys">getTrustedActiveKeys</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:239</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:291</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -558,7 +558,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#gettrustedkeys">getTrustedKeys</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:231</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:299</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -582,7 +582,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#importkeypair">importKeyPair</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:182</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:310</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -627,7 +627,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#importprivatekey">importPrivateKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:211</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:325</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -666,7 +666,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#importpublickey">importPublicKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:197</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:339</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -705,7 +705,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#isencryptedprivatekey">isEncryptedPrivateKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:288</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:353</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -742,7 +742,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#isvalidkey">isValidKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:276</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:369</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -779,7 +779,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#loadkeyring">loadKeyring</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:170</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:379</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -806,7 +806,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#removekeysforid">removeKeysForId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:384</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:389</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -839,7 +839,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#removepublickey">removePublicKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:402</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:398</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -872,7 +872,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#removepublickeyforid">removePublicKeyForId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:393</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:408</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -167,7 +167,7 @@
<div class="tsd-signature tsd-kind-icon">algo<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#x27;sha256&#x27;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:62</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:60</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -182,7 +182,7 @@
<div class="tsd-signature tsd-kind-icon">dgst<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:64</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:62</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -197,7 +197,7 @@
<div class="tsd-signature tsd-kind-icon">engine<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#x27;pgp&#x27;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:60</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:64</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -212,7 +212,7 @@
<div class="tsd-signature tsd-kind-icon">key<wbr>Store<span class="tsd-signature-symbol">:</span> <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html" class="tsd-signature-type" data-tsd-kind="Interface">MutableKeyStore</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:68</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:66</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -227,7 +227,7 @@
<div class="tsd-signature tsd-kind-icon">logging<wbr>Service<span class="tsd-signature-symbol">:</span> <a href="app__services_logging_service.loggingservice.html" class="tsd-signature-type" data-tsd-kind="Class">LoggingService</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:74</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:68</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -316,7 +316,7 @@
<div class="tsd-signature tsd-kind-icon">signature<span class="tsd-signature-symbol">:</span> <a href="../interfaces/app__pgp_pgp_signer.signature.html" class="tsd-signature-type" data-tsd-kind="Interface">Signature</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:66</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:74</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -396,7 +396,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_signer.signer.html">Signer</a>.<a href="../interfaces/app__pgp_pgp_signer.signer.html#sign">sign</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:146</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:109</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -432,7 +432,7 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_signer.signer.html">Signer</a>.<a href="../interfaces/app__pgp_pgp_signer.signer.html#verify">verify</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:109</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:144</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -114,7 +114,7 @@
<div class="tsd-signature tsd-kind-icon">age<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/account.ts:8</li>
<li>Defined in src/app/_models/account.ts:4</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -129,7 +129,7 @@
<div class="tsd-signature tsd-kind-icon">balance<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/account.ts:12</li>
<li>Defined in src/app/_models/account.ts:6</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -144,7 +144,7 @@
<div class="tsd-signature tsd-kind-icon">category<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/account.ts:31</li>
<li>Defined in src/app/_models/account.ts:8</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -159,7 +159,7 @@
<div class="tsd-signature tsd-kind-icon">date_<wbr>registered<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/account.ts:4</li>
<li>Defined in src/app/_models/account.ts:10</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -174,7 +174,7 @@
<div class="tsd-signature tsd-kind-icon">gender<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/account.ts:6</li>
<li>Defined in src/app/_models/account.ts:12</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -270,7 +270,7 @@
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/account.ts:10</li>
<li>Defined in src/app/_models/account.ts:31</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -109,7 +109,7 @@
<div class="tsd-signature tsd-kind-icon">action<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/mappings.ts:10</li>
<li>Defined in src/app/_models/mappings.ts:4</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -124,7 +124,7 @@
<div class="tsd-signature tsd-kind-icon">approval<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/mappings.ts:12</li>
<li>Defined in src/app/_models/mappings.ts:6</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -139,7 +139,7 @@
<div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/mappings.ts:4</li>
<li>Defined in src/app/_models/mappings.ts:8</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -154,7 +154,7 @@
<div class="tsd-signature tsd-kind-icon">role<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/mappings.ts:8</li>
<li>Defined in src/app/_models/mappings.ts:10</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -169,7 +169,7 @@
<div class="tsd-signature tsd-kind-icon">user<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/mappings.ts:6</li>
<li>Defined in src/app/_models/mappings.ts:12</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -106,7 +106,7 @@
<div class="tsd-signature tsd-kind-icon">locations<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/mappings.ts:20</li>
<li>Defined in src/app/_models/mappings.ts:18</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -121,7 +121,7 @@
<div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/mappings.ts:18</li>
<li>Defined in src/app/_models/mappings.ts:20</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -106,7 +106,7 @@
<div class="tsd-signature tsd-kind-icon">area<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/mappings.ts:28</li>
<li>Defined in src/app/_models/mappings.ts:26</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -121,7 +121,7 @@
<div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/mappings.ts:26</li>
<li>Defined in src/app/_models/mappings.ts:28</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -112,7 +112,7 @@
<div class="tsd-signature tsd-kind-icon">address<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/token.ts:8</li>
<li>Defined in src/app/_models/token.ts:4</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -127,7 +127,7 @@
<div class="tsd-signature tsd-kind-icon">decimals<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/token.ts:12</li>
<li>Defined in src/app/_models/token.ts:6</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -142,7 +142,7 @@
<div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/token.ts:4</li>
<li>Defined in src/app/_models/token.ts:8</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -157,7 +157,7 @@
<div class="tsd-signature tsd-kind-icon">owner<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/token.ts:23</li>
<li>Defined in src/app/_models/token.ts:10</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -172,7 +172,7 @@
<div class="tsd-signature tsd-kind-icon">reserve<wbr>Ratio<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/token.ts:21</li>
<li>Defined in src/app/_models/token.ts:12</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -218,7 +218,7 @@
<div class="tsd-signature tsd-kind-icon">supply<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/token.ts:10</li>
<li>Defined in src/app/_models/token.ts:21</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -233,7 +233,7 @@
<div class="tsd-signature tsd-kind-icon">symbol<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/token.ts:6</li>
<li>Defined in src/app/_models/token.ts:23</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -186,7 +186,7 @@
<div class="tsd-signature tsd-kind-icon">tx<span class="tsd-signature-symbol">:</span> <a href="app__models_transaction.tx.html" class="tsd-signature-type" data-tsd-kind="Interface">Tx</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/transaction.ts:19</li>
<li>Defined in src/app/_models/transaction.ts:17</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -201,7 +201,7 @@
<div class="tsd-signature tsd-kind-icon">user<span class="tsd-signature-symbol">:</span> <a href="app__models_account.accountdetails.html" class="tsd-signature-type" data-tsd-kind="Interface">AccountDetails</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/transaction.ts:17</li>
<li>Defined in src/app/_models/transaction.ts:19</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -127,7 +127,7 @@
<div class="tsd-signature tsd-kind-icon">recipient<span class="tsd-signature-symbol">:</span> <a href="app__models_account.accountdetails.html" class="tsd-signature-type" data-tsd-kind="Interface">AccountDetails</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/transaction.ts:31</li>
<li>Defined in src/app/_models/transaction.ts:27</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -142,7 +142,7 @@
<div class="tsd-signature tsd-kind-icon">sender<span class="tsd-signature-symbol">:</span> <a href="app__models_account.accountdetails.html" class="tsd-signature-type" data-tsd-kind="Interface">AccountDetails</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/transaction.ts:27</li>
<li>Defined in src/app/_models/transaction.ts:29</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -157,7 +157,7 @@
<div class="tsd-signature tsd-kind-icon">to<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/transaction.ts:29</li>
<li>Defined in src/app/_models/transaction.ts:31</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -202,7 +202,7 @@
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/transaction.ts:39</li>
<li>Defined in src/app/_models/transaction.ts:37</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -217,7 +217,7 @@
<div class="tsd-signature tsd-kind-icon">value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_models/transaction.ts:37</li>
<li>Defined in src/app/_models/transaction.ts:39</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -144,7 +144,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:154</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:16</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -167,7 +167,7 @@
<aside class="tsd-sources">
<p>Overrides KeyStore.getEncryptKeys</p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:64</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:24</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -197,7 +197,7 @@
<aside class="tsd-sources">
<p>Overrides KeyStore.getFingerprint</p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:93</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:29</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -220,7 +220,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:99</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:35</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -252,7 +252,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:110</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:41</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -285,7 +285,7 @@
<aside class="tsd-sources">
<p>Overrides KeyStore.getPrivateKey</p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:74</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:46</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -308,7 +308,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:122</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:52</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -340,7 +340,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:104</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:57</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -363,7 +363,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:69</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:62</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -386,7 +386,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:116</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:68</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -418,7 +418,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:128</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:74</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -450,7 +450,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:46</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:79</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -473,7 +473,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:134</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:85</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -506,7 +506,7 @@
<aside class="tsd-sources">
<p>Overrides KeyStore.getTrustedActiveKeys</p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:56</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:90</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -530,7 +530,7 @@
<aside class="tsd-sources">
<p>Overrides KeyStore.getTrustedKeys</p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:51</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:95</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -553,7 +553,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:27</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:103</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -597,7 +597,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:41</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:110</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -635,7 +635,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:34</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:117</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -673,7 +673,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:88</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:124</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -709,7 +709,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:81</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:131</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -745,7 +745,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:19</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:136</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -771,7 +771,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:140</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:142</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -803,7 +803,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:152</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:148</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -835,7 +835,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:146</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:154</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -108,7 +108,7 @@
<div class="tsd-signature tsd-kind-icon">algo<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:19</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:17</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -123,7 +123,7 @@
<div class="tsd-signature tsd-kind-icon">data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:21</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:19</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -138,7 +138,7 @@
<div class="tsd-signature tsd-kind-icon">digest<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:23</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:21</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -153,7 +153,7 @@
<div class="tsd-signature tsd-kind-icon">engine<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:17</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:23</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -120,7 +120,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:36</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:32</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -143,7 +143,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:29</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:34</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -171,7 +171,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:31</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:36</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -231,7 +231,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:54</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:48</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
@ -266,7 +266,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:48</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:54</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -90,7 +90,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_helpers/read-csv.ts:13</li>
<li>Defined in src/app/_helpers/read-csv.ts:29</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">

View File

@ -4,6 +4,22 @@ const objCsv: { size: number; dataFile: any } = {
dataFile: [],
};
/**
* Parses data to CSV format.
*
* @param data - The data to be parsed.
* @returns An array of the parsed data.
*/
function parseData(data: any): Array<any> {
const csvData: Array<any> = [];
const lineBreak: Array<any> = data.split('\n');
lineBreak.forEach((res) => {
csvData.push(res.split(','));
});
console.table(csvData);
return csvData;
}
/**
* Reads a csv file and converts it to an array.
*
@ -22,21 +38,5 @@ function readCsv(input: any): Array<any> | void {
}
}
/**
* Parses data to CSV format.
*
* @param data - The data to be parsed.
* @returns An array of the parsed data.
*/
function parseData(data: any): Array<any> {
const csvData: Array<any> = [];
const lineBreak: Array<any> = data.split('\n');
lineBreak.forEach((res) => {
csvData.push(res.split(','));
});
console.table(csvData);
return csvData;
}
/** @exports */
export { readCsv };

View File

@ -1,15 +1,15 @@
/** Account data interface */
interface AccountDetails {
/** Age of user */
age?: string;
/** Token balance on account */
balance?: number;
/** Business category of user. */
category?: string;
/** Account registration day */
date_registered: number;
/** User's gender */
gender: string;
/** Age of user */
age?: string;
/** Type of account */
type?: string;
/** Token balance on account */
balance?: number;
/** Account identifiers */
identities: {
evm: {
@ -27,8 +27,8 @@ interface AccountDetails {
};
/** Products or services provided by user. */
products: string[];
/** Business category of user. */
category?: string;
/** Type of account */
type?: string;
/** Personal identifying information of user */
vcard: {
email: [

View File

@ -1,31 +1,31 @@
/** Action object interface */
interface Action {
/** Action ID */
id: number;
/** Admin who initialized the action. */
user: string;
/** Admin's role in the system */
role: string;
/** Action performed */
action: string;
/** Action approval status. */
approval: boolean;
/** Action ID */
id: number;
/** Admin's role in the system */
role: string;
/** Admin who initialized the action. */
user: string;
}
/** Area name object interface */
interface AreaName {
/** Name of area */
name: string;
/** Locations that map to that area name. */
locations: Array<string>;
/** Name of area */
name: string;
}
/** Area type object interface */
interface AreaType {
/** Type of area */
name: string;
/** Areas that map to that area type. */
area: Array<string>;
/** Type of area */
name: string;
}
/** Category object interface */

View File

@ -1,16 +1,16 @@
/** Settings class */
class Settings {
/** CIC Registry instance */
registry: any;
/** A resource for searching through blocks on the blockchain network. */
scanFilter: any;
/** Transaction Helper instance */
txHelper: any;
/** Web3 Object */
w3: W3 = {
engine: undefined,
provider: undefined,
};
/** A resource for searching through blocks on the blockchain network. */
scanFilter: any;
/** CIC Registry instance */
registry: any;
/** Transaction Helper instance */
txHelper: any;
/**
* Initialize the settings.

View File

@ -1,15 +1,15 @@
/** Token object interface */
interface Token {
/** Name of the token. */
name: string;
/** The unique token symbol. */
symbol: string;
/** Address of the deployed token contract. */
address: string;
/** Total token supply. */
supply: string;
/** Number of decimals to convert to smallest denomination of the token. */
decimals: string;
/** Name of the token. */
name: string;
/** Address of account that deployed token. */
owner?: string;
/** Token reserve to token minting ratio. */
reserveRatio?: string;
/** Token reserve information */
reserves: {
'0xa686005CE37Dce7738436256982C3903f2E4ea8E'?: {
@ -17,10 +17,10 @@ interface Token {
balance: string;
};
};
/** Token reserve to token minting ratio. */
reserveRatio?: string;
/** Address of account that deployed token. */
owner?: string;
/** Total token supply. */
supply: string;
/** The unique token symbol. */
symbol: string;
}
/** @exports */

View File

@ -13,30 +13,30 @@ interface Conversion {
toValue: number;
/** Address of the initiator of the conversion. */
trader: string;
/** Account information of the initiator of the conversion. */
user: AccountDetails;
/** Conversion mining information. */
tx: Tx;
/** Account information of the initiator of the conversion. */
user: AccountDetails;
}
/** Transaction object interface */
interface Transaction {
/** Address of the transaction sender. */
from: string;
/** Account information of the transaction recipient. */
recipient: AccountDetails;
/** Account information of the transaction sender. */
sender: AccountDetails;
/** Address of the transaction recipient. */
to: string;
/** Account information of the transaction recipient. */
recipient: AccountDetails;
/** Transaction token information. */
token: TxToken;
/** Transaction mining information. */
tx: Tx;
/** Amount of tokens transacted. */
value: number;
/** Type of transaction. */
type?: string;
/** Amount of tokens transacted. */
value: number;
}
/** Transaction data interface */

View File

@ -12,48 +12,8 @@ const keyring = new openpgp.Keyring();
* @extends KeyStore
*/
interface MutableKeyStore extends KeyStore {
/**
* Instantiate the keyring in the keystore.
* @async
*/
loadKeyring(): void;
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importKeyPair(publicKey: any, privateKey: any): Promise<void>;
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
importPublicKey(publicKey: any): Promise<void>;
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importPrivateKey(privateKey: any): Promise<void>;
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array<any>;
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array<any>;
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array<any>;
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void;
/**
* Get all the encryption keys.
* @returns An array of encryption keys.
@ -62,30 +22,6 @@ interface MutableKeyStore extends KeyStore {
* This is included to appease the implemented Keystore interface.
*/
getEncryptKeys(): Array<any>;
/**
* Get all private keys.
* @returns An array of all private keys.
*/
getPrivateKeys(): Array<any>;
/**
* Get the first private key.
* @returns The first private key.
*/
getPrivateKey(): any;
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
isValidKey(key: any): Promise<boolean>;
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
isEncryptedPrivateKey(privateKey: any): Promise<boolean>;
/**
* Get the first private key's fingerprint.
* @returns The first private key's fingerprint.
@ -97,11 +33,6 @@ interface MutableKeyStore extends KeyStore {
* @returns The key's keyId.
*/
getKeyId(key: any): string;
/**
* Get the first private key's keyID.
* @returns The first private key's keyId.
*/
getPrivateKeyId(): string;
/**
* Get keys from the keyring using their keyId.
* @param keyId - The keyId of the keys to be fetched from the keyring.
@ -109,49 +40,118 @@ interface MutableKeyStore extends KeyStore {
*/
getKeysForId(keyId: string): Array<any>;
/**
* Get a public key from the keyring using it's keyId.
* @param keyId - The keyId of the public key to be fetched from the keyring.
* @returns The public key with that keyId.
* Get the first private key.
* @returns The first private key.
*/
getPublicKeyForId(keyId: string): any;
getPrivateKey(): any;
/**
* Get a private key from the keyring using it's keyId.
* @param keyId - The keyId of the private key to be fetched from the keyring.
* @returns The private key with that keyId.
*/
getPrivateKeyForId(keyId: string): any;
/**
* Get the first private key's keyID.
* @returns The first private key's keyId.
*/
getPrivateKeyId(): string;
/**
* Get all private keys.
* @returns An array of all private keys.
*/
getPrivateKeys(): Array<any>;
/**
* Get a public key from the keyring using it's keyId.
* @param keyId - The keyId of the public key to be fetched from the keyring.
* @returns The public key with that keyId.
*/
getPublicKeyForId(keyId: string): any;
/**
* Get a public key from the keyring using it's subkeyId.
* @param subkeyId - The subkeyId of the public key to be fetched from the keyring.
* @returns The public key with that subkeyId.
*/
getPublicKeyForSubkeyId(subkeyId: string): any;
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array<any>;
/**
* Get public keys from the keyring using their address.
* @param address - The address of the public keys to be fetched from the keyring.
* @returns An array of the public keys with that address.
*/
getPublicKeysForAddress(address: string): Array<any>;
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array<any>;
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array<any>;
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importKeyPair(publicKey: any, privateKey: any): Promise<void>;
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importPrivateKey(privateKey: any): Promise<void>;
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
importPublicKey(publicKey: any): Promise<void>;
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
isEncryptedPrivateKey(privateKey: any): Promise<boolean>;
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
isValidKey(key: any): Promise<boolean>;
/**
* Instantiate the keyring in the keystore.
* @async
*/
loadKeyring(): void;
/**
* Remove a public key from the keyring using it's keyId.
* @param keyId - The keyId of the keys to be removed from the keyring.
* @returns An array of the removed keys.
*/
removeKeysForId(keyId: string): Array<any>;
/**
* Remove a public key from the keyring using it's keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId: string): any;
/**
* Remove a public key from the keyring.
* @param publicKey - The public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKey(publicKey: any): any;
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void;
/**
* Remove a public key from the keyring using it's keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId: string): any;
/**
* Sign message using private key.
* @async
@ -163,81 +163,9 @@ interface MutableKeyStore extends KeyStore {
/** Provides a keyring for pgp keys. */
class MutablePgpKeyStore implements MutableKeyStore {
/**
* Instantiate the keyring in the keystore.
* @async
*/
async loadKeyring(): Promise<void> {
await keyring.load();
await keyring.store();
}
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importKeyPair(publicKey: any, privateKey: any): Promise<void> {
try {
await keyring.publicKeys.importKey(publicKey);
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
async importPublicKey(publicKey: any): Promise<void> {
try {
await keyring.publicKeys.importKey(publicKey);
} catch (error) {
throw error;
}
}
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importPrivateKey(privateKey: any): Promise<void> {
try {
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array<any> {
return keyring.publicKeys && keyring.publicKeys.keys;
}
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array<any> {
return keyring.publicKeys && keyring.publicKeys.keys;
}
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array<any> {
return keyring.publicKeys && keyring.publicKeys.keys;
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void {
keyring.clear();
}
/**
@ -251,50 +179,6 @@ class MutablePgpKeyStore implements MutableKeyStore {
return [];
}
/**
* Get all private keys.
* @returns An array of all private keys.
*/
getPrivateKeys(): Array<any> {
return keyring.privateKeys && keyring.privateKeys.keys;
}
/**
* Get the first private key.
* @returns The first private key.
*/
getPrivateKey(): any {
return keyring.privateKeys && keyring.privateKeys.keys[0];
}
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
async isValidKey(key): Promise<boolean> {
// There is supposed to be an openpgp.readKey() method but I can't find it?
const testKey = await openpgp.key.readArmored(key);
return !testKey.err;
}
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
async isEncryptedPrivateKey(privateKey: any): Promise<boolean> {
const imported = await openpgp.key.readArmored(privateKey);
for (const key of imported.keys) {
if (key.isDecrypted()) {
return false;
}
}
return true;
}
/**
* Get the first private key's fingerprint.
* @returns The first private key's fingerprint.
@ -318,6 +202,32 @@ class MutablePgpKeyStore implements MutableKeyStore {
return key.getKeyId().toHex();
}
/**
* Get keys from the keyring using their keyId.
* @param keyId - The keyId of the keys to be fetched from the keyring.
* @returns An array of the keys with that keyId.
*/
getKeysForId(keyId: string): Array<any> {
return keyring.getKeysForId(keyId);
}
/**
* Get the first private key.
* @returns The first private key.
*/
getPrivateKey(): any {
return keyring.privateKeys && keyring.privateKeys.keys[0];
}
/**
* Get a private key from the keyring using it's keyId.
* @param keyId - The keyId of the private key to be fetched from the keyring.
* @returns The private key with that keyId.
*/
getPrivateKeyForId(keyId): any {
return keyring.privateKeys && keyring.privateKeys.getForId(keyId);
}
/**
* Get the first private key's keyID.
* @returns The first private key's keyId.
@ -332,12 +242,11 @@ class MutablePgpKeyStore implements MutableKeyStore {
}
/**
* Get keys from the keyring using their keyId.
* @param keyId - The keyId of the keys to be fetched from the keyring.
* @returns An array of the keys with that keyId.
* Get all private keys.
* @returns An array of all private keys.
*/
getKeysForId(keyId: string): Array<any> {
return keyring.getKeysForId(keyId);
getPrivateKeys(): Array<any> {
return keyring.privateKeys && keyring.privateKeys.keys;
}
/**
@ -349,15 +258,6 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys && keyring.publicKeys.getForId(keyId);
}
/**
* Get a private key from the keyring using it's keyId.
* @param keyId - The keyId of the private key to be fetched from the keyring.
* @returns The private key with that keyId.
*/
getPrivateKeyForId(keyId): any {
return keyring.privateKeys && keyring.privateKeys.getForId(keyId);
}
/**
* Get a public key from the keyring using it's subkeyId.
* @param subkeyId - The subkeyId of the public key to be fetched from the keyring.
@ -367,6 +267,14 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys && keyring.publicKeys.getForId(subkeyId, true);
}
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array<any> {
return keyring.publicKeys && keyring.publicKeys.keys;
}
/**
* Get public keys from the keyring using their address.
* @param address - The address of the public keys to be fetched from the keyring.
@ -376,6 +284,103 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys && keyring.publicKeys.getForAddress(address);
}
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array<any> {
return keyring.publicKeys && keyring.publicKeys.keys;
}
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array<any> {
return keyring.publicKeys && keyring.publicKeys.keys;
}
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importKeyPair(publicKey: any, privateKey: any): Promise<void> {
try {
await keyring.publicKeys.importKey(publicKey);
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importPrivateKey(privateKey: any): Promise<void> {
try {
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
async importPublicKey(publicKey: any): Promise<void> {
try {
await keyring.publicKeys.importKey(publicKey);
} catch (error) {
throw error;
}
}
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
async isEncryptedPrivateKey(privateKey: any): Promise<boolean> {
const imported = await openpgp.key.readArmored(privateKey);
for (const key of imported.keys) {
if (key.isDecrypted()) {
return false;
}
}
return true;
}
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
async isValidKey(key): Promise<boolean> {
// There is supposed to be an openpgp.readKey() method but I can't find it?
const testKey = await openpgp.key.readArmored(key);
return !testKey.err;
}
/**
* Instantiate the keyring in the keystore.
* @async
*/
async loadKeyring(): Promise<void> {
await keyring.load();
await keyring.store();
}
/**
* Remove a public key from the keyring using it's keyId.
* @param keyId - The keyId of the keys to be removed from the keyring.
@ -385,15 +390,6 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.removeKeysForId(keyId);
}
/**
* Remove a public key from the keyring using it's keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId): any {
return keyring.publicKeys && keyring.publicKeys.removeForId(keyId);
}
/**
* Remove a public key from the keyring.
* @param publicKey - The public key to be removed from the keyring.
@ -404,9 +400,13 @@ class MutablePgpKeyStore implements MutableKeyStore {
return keyring.publicKeys && keyring.publicKeys.removeForId(keyId);
}
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void {
keyring.clear();
/**
* Remove a public key from the keyring using it's keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId): any {
return keyring.publicKeys && keyring.publicKeys.removeForId(keyId);
}
/**
@ -432,4 +432,4 @@ class MutablePgpKeyStore implements MutableKeyStore {
}
/** @exports */
export { MutablePgpKeyStore, MutableKeyStore };
export { MutableKeyStore, MutablePgpKeyStore };

View File

@ -13,65 +13,65 @@ interface Signable {
/** Signature object interface */
interface Signature {
/** Encryption engine used. */
engine: string;
/** Encryption algorithm used */
algo: string;
/** Data to be signed. */
data: string;
/** Message digest */
digest: string;
/** Encryption engine used. */
engine: string;
}
/** Signer interface */
interface Signer {
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
fingerprint(): string;
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
prepare(material: Signable): boolean;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
sign(digest: string): Promise<void>;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
}
/** Provides functionality for signing and verifying signed messages. */
class PGPSigner implements Signer {
/** Encryption engine used. */
engine = 'pgp';
/** Encryption algorithm used */
algo = 'sha256';
/** Message digest */
dgst: string;
/** Generated signature */
signature: Signature;
/** Encryption engine used. */
engine = 'pgp';
/** A keystore holding pgp keys. */
keyStore: MutableKeyStore;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/** Event triggered on successful signing of message. */
onsign: (signature: Signature) => void;
/** Event triggered on successful verification of a signature. */
onverify: (flag: boolean) => void;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/** Generated signature */
signature: Signature;
/**
* Initializing the Signer.
@ -101,6 +101,41 @@ class PGPSigner implements Signer {
return true;
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise<void> {
const m = openpgp.cleartext.fromText(digest);
const pk = this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password = window.prompt('password');
await pk.decrypt(password);
}
const opts = {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) => {
this.signature = {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) => {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
@ -137,42 +172,7 @@ class PGPSigner implements Signer {
this.onverify(false);
});
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise<void> {
const m = openpgp.cleartext.fromText(digest);
const pk = this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password = window.prompt('password');
await pk.decrypt(password);
}
const opts = {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) => {
this.signature = {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) => {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
}
/** @exports */
export { Signable, Signature, Signer, PGPSigner };
export { PGPSigner, Signable, Signature, Signer };