- addContact#
Add a contact to the wallet’s contact list. Contacts are identified by the pair of
aliasandaliasType; if a contact with the same alias and alias type already exists, it is updated.Request:
The request arguments are an AddContactRequest object.
Response:
On success, the result is an empty object.
Side effects:
Adds or updates the contact in the wallet’s contact list. After the contact list has changed, wallet-core emits a
contact-addednotification.
interface AddContactRequest {
// The contact to add or update.
contact: ContactEntry;
}
interface ContactEntry {
// Contact alias.
alias: string;
// Alias type.
aliasType: string;
// Mailbox URI.
mailboxBaseUri: string;
// Mailbox identity.
mailboxAddress: HashCodeString;
// The source of this contact, may be a URI.
source: string;
// The local petname of the contact.
petname: string;
}