Setup: Hosted Track
Welcome to the hosted tutorial track. This is the most beginner-friendly path, since your account representative at Cordial Systems or someone at your organization will already have created a demo treasury instance for you to interact with. If you are more technical, or simply curious, you can also follow the self-hosted demo track. Let’s get started.
The goal of this lesson is to create and register a long-term credential.
You should have received, either from a Cordial Systems representative or an administrator at your organisation three things:
- API URL: This is the base URL to access the Cordial Treasury API for your treasury instance.
Example:https://public-sgxcsbhhjdj1lagbseam5i-treasury.cordialapis.com
.
Notation: In the following, wherever you see<api-url>
, you should replace this with your API URL. - User: This is your user ID, that an administrator of your treasury instance created for you.
Example:jane-tutorial
Notation: In the following, wherever you see<user-id>
, you should replace this with your user ID. - Invite: This is a single-use credential to bootstrap enrolling.
Example:6a616e652d7475746f7269616c
Notation: In the following, wherever you see<invite-code>
, you should replace this with your invite code.
Enrol for Tutorial
Run the following commands in a terminal, line-by-line, replacing the values <api-url>
, <user-id>
and <invite-code>
with the values you received:
- CLI (run this!)
API_URL="<api-url>"
USER="<user-id>"
INVITE="<invite-code>"
Now run the following command:
- CLI (run this!)
treasury user enroll --invite ${INVITE} --api-url ${API_URL} ${USER}
This command is expected to succeed, with output similar to
Set default API URL to https://public-sgxcsbhhjdj1lagbseam5i-treasury.cordialapis.com
Created client key root-key with signing algorithm ecdsa-k256-sha256
operations/9656B5B99E4E8A5693D16CDD547B64547AEA2B912C52D8D26D6AA64AAE208659
Registered credential root-key corresponding to the client key for user joe-tutorial
Verification
To verify, run
- CLI
treasury config treasury
You should see output like
name = "treasuries/<treasury-id>"
api_url = "<api-url>"
sign_with = "client-keys/root-key"