Contacts

Information

These methods are accessible through profile.contacts() which exposes a ContactRepository instance.

Get a list of all contacts

1profile.contacts().all();

Get the first stored contact

1profile.contacts().first();

Get the last stored contact

1profile.contacts().last();

Get a list of all wallet keys

1profile.contacts().keys();

Get a list of all wallet values

1profile.contacts().values();

Create a new contact for the given data

1profile.contacts().create(
2 "Jane Doe",
3 [{ coin: "Ethereum", network: "testnet", address: "TESTNET-ADDRESS" }],
4);

Fill the contacts with the given contacts object

1profile.contacts().fill(contacts);

Find the contact for the given ID

1profile.contacts().findById("D61mfSggzbvQgTUe6JhYKH2doHaqJ3Dyib");

Update a contact using its Id and provided information

1profile.contacts().update(newContact.id(), { name: "Jane Doe" });

Forget the contact for the given ID

1profile.contacts().forget("uuid");

Forget all contacts (Use with caution!)

1profile.contacts().flush();

Get the count of stored contacts

1profile.contacts().count();

Find the contact for the given address

1profile.contacts().findByAddress("D61mfSggzbvQgTUe6JhYKH2doHaqJ3Dyib");

Find all contacts for the given coin

1profile.contacts().findByCoin("ARK");

Find the contact for the given network

1profile.contacts().findByNetwork("devnet");

Get the contacts data as an Object

1profile.contacts().toObject();
Last updated 2 years ago
Edit Page
Share: