Skip to content

Usage and signing data

After you have a logged in user object from the callback or home page, you can do the following:

User information

Get the anonymous account ID

const accountName = await user.getAccountName().toString();

Get the username

const username = await user.getUsername();
const shortUsername = username.getBaseUsername();

Get the DID

const accountDid = await user.getDid();


Sign a W3C verifiable credential

const vc = await user.signVc("", "NameAndDob", {
    name: "Joe Somebody",
    dob: new Date('1999-06-04')

const verifiedVc = await vc.verify();

Authenticate to your server


const vc = await user.signVc("", "UserAuth", {
    accountName: await user.getAccountName.toString()


const verifiedVc = await vc.verify();
const userDid = vc.getIssuer();
// save userDid as the account unique user ID

You can also use the same flow above to send all requests, which adds integrity protection and non-repudiation to all requests to your server.

Sign a document


Sign a blockchain transaction

Step 1. Modify your Antelope smart contract to accept signatures from users signed into your registered app (see Register your app)


#include <id.tmy/id.tmy.hpp>

token::transfer(const name &from,
                        const name &to,
                        const asset &quantity,
                        const string &memo)
    require_auth({to, idtonomy::id::get_app_permission_by_origin("")});
    // or
    require_auth({to, idtonomy::id::get_app_permission_by_username("")});

Step 2. Use the API to sign the transaction

const trx = await user.signTransaction('eosio.token', 'transfer', {
    from: "me",
    to: "you",
    quantity: '1 SYS',
    memo: 'test memo',

Sovereign storage vault

Store data


Request data


Send a peer-to-peer message

const msg = new Message.signMessage(
    { foo: "bar" }
    await user.getIssuer(),
    await user.getWalletDid()
await user.sendMessage(msg);