Home | Platform SDK

Contacts

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

Get a list of all contacts with key and value

profile.contacts().all();

Get a list of all wallet keys

profile.contacts().keys();

Get a list of all wallet values

profile.contacts().values();

Create a new contact for the given data

profile.contacts().create({
    name: "Jane Doe",
    addresses: [{ coin: "Ethereum", network: "testnet", address: "TESTNET-ADDRESS" }],
    starred: true,
});

Find the contact for the given ID

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

Find the contact for the given address

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

Find all contacts for the given coin

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

Find the contact for the given address

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

Forget the contact for the given ID

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

Forget all contacts (Use with caution!)

profile.contacts().flush();

2020 © ARK.io | All rights reserved | An ARK.io Product