Guides
Setup Issuer

Setup Issuer

Video Guide

The following steps to setup issuer requires celocli to be installed

Use the following command to install celocli.

npm i -g @celo/celocli

Configure the CLI to use the right network

celocli config:set --node wss://forno.celo.org/ws

Setting up the Issuer account

⚠️

The optional steps below are if you don't intend to use an data encryption key to interact with SocialConnect Protcol. However, it is highly recommended to use DEK.

Create a new account using celocli

celocli account:new

You will see five fields of information about this created account in our console: mnemonic, accountAddress, privateKey, publicKey, address

Exporing Issuer address and private key (optional)

To avoid confussion by having to copy paste constantly these values for the different accounts, you can use export to create a temporal variable of such values.

export ISSUER_ADDRESS=address
export ISSUER_PRIVATE_KEY=privateKey

Register the Issuer Account (optional)

To map an attestation signer or an attestation encryption key the issuer needs to be registered

This is an onchain transaction, so you need Celo in your Issuer account.

celocli account:register --from $ISSUER_ADDRESS --privateKey $ISSUER_PRIVATE_KEY

Fund the account with cUSD

If you plan to use attestation signer or the DEK (steps below), then the attestation signer will use the issuer account is the one that will pay quota in cUSD.

If you want to convert some Celo to cUSD in advance, you can run:

celocli exchange:celo --value 1000000000000000000 --from $ISSUER_ADDRESS --privateKey $ISSUER_PRIVATE_KEY

The above example converted 1 Celo. You can find a tool (opens in a new tab) to convert the value to wei in the celoscan website.

Registering DEK for the Issuer account (Recommended)

Create a new account using celocli

celocli account:new 
export ISSUER_DEK_PUBLIC_KEY=publicKey

Register DEK

Here ISSUER_ADDRESS is the address of the Issuer account we setup in the "Setting up the Issuer account" section, and ISSUER_PRIVATE_KEY is the private key of the same account.

celocli account:register-data-encryption-key --publicKey $ISSUER_DEK_PUBLIC_KEY --from $ISSUER_ADDRESS --privateKey $ISSUER_PRIVATE_KEY

That's it your Issuer account is now ready to lookup, register and revoke atttestations!