sideos API Documentation
  • Welcome!
  • Quick Start
  • Sign up & get started
    • Creating a Credential Type
    • Add an Admin
  • Issue a Verifiable Credential
  • How to delete your Data
  • Reference
    • API Reference
      • Offer Credentials
      • Request Credentials
      • Templates
      • Wallets
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Wallets

API endpoints to create local and public DIDs

PreviousTemplates

Last updated 1 year ago

A Decentralized Identifier (DID) comes in different flavours. We are using 2 types of DIDs in the sideos ecosystem:

  1. Private DID. For a private DID our implementation follows the did:key Method () is a DID that is locally generated in a wallet and not anchored on a public registry. There is no link to a public blockchain or repository. On mobile phones this method is preferred for privacy and technical reasons.

  2. Public DID. For a public DID our implementation follows the did:sideos Method () of a blockchain anchored DID. We are blockchain agnostic and have 2 DLT connectors implemented: Tezos and Ethereum smart contracts mapping sideos DIDs to the respective DID Document on chain or in the IPFS respectively. Public DIDs are for Issuers and Verifiers who want to be resolvable on a public registry for trust-related reasons.

DIDs are created when a wallet is set up and there is no reason to explicitely create a DID by yourself. Still, there may be scenarios where you want to build a local system, e.g. insite an IoT device, where the DID should be pre-build. In that scenario you would call the endpoint for creating a local DID.

If you want to manage sub-wallets in a multi-tenant system of an issuer or verifier, you can create a new public DID by calling the API endpoint to create a public DID. You can chose if the DID should be anchored on a blockchain or not.

Create a Local DID

To create a local DID you call the endpoint with an empty data set. The response gives you the new DID and the respective public key material. The private key is securely stored in the platform database and can be provisioned in a secure channel. We currently do this on demand.

Create a Public DID

The wallet is stored and managed in the platform as a cloud wallet.

To create a public DID which can be optionally anchored on the blockchain you call the endpoint with a name for the wallet and a boolean value. If the value for anchored is true, the DID method is did:sideos and the DID document is written to the blockchain. We also support and privacy-preserved zero-knowledge networks and on customer demand. In the case of anchoring on Ethereum the DID document is stored on the . If the value for anchored is false we create a private DID did:private.

Tezoz
Ethereum
MINA
Aleo
IPFS
https://w3c-ccg.github.io/did-method-key/
https://github.com/sideos/sideos-did-method

Create a local DID

post

Create a local DID based on the key material provided

Authorizations
Responses
200
response is a wallet object including the DID and keys.
application/json
400
Bad Request
application/json
403
Unauthorized Access
application/json
500
Server Error
application/json
post
POST /v3/createlocaldid HTTP/1.1
Host: juno.sideos.io
X-TOKEN: YOUR_API_KEY
Accept: */*
{
  "error": "false,",
  "did": "did:key:v004:z6MkrL41Eo41aHPhrdEAatCqYc7TiU3PHso5fLyNE7sfbkfQ",
  "pubkey": {
    "crv": "Ed25519",
    "d": "text",
    "x": "RvdvCO9qwwB-xeWG4YzbEae4g8iZlIBi5U5hO1CHUPQ",
    "kty": "OKP",
    "use": "sig"
  },
  "response": {
    "acknowledged": true,
    "insertedId": "65db292432889eff535dee66",
    "pubkey": {
      "crv": "Ed25519",
      "d": "text",
      "x": "RvdvCO9qwwB-xeWG4YzbEae4g8iZlIBi5U5hO1CHUPQ",
      "kty": "OKP",
      "use": "sig"
    }
  }
}
  • Create a Local DID
  • POSTCreate a local DID
  • Create a Public DID
  • POSTCreate a public DID

Create a public DID

post

Create a public DID hold in a cloud wallet as a sub-tenant of your sideos account. The DID can be optionally anchored on a Blockchain (Tezoz, Ethereum). You need to be a admin of a multi-tenant account.

Authorizations
Body
namestringOptional

the name of the wallet. Must be unique.

Example: ACME Wallet
anchoredbooleanOptionalExample: true
Responses
200
Wallet created
application/json
400
Bad Request
application/json
403
Unauthorized Access
application/json
422
Unprocessable Content.
application/json
500
Server Error
application/json
post
POST /v3/createpublicdid HTTP/1.1
Host: juno.sideos.io
X-TOKEN: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "name": "ACME Wallet",
  "anchored": true
}
{
  "did": "did:sideos:V002:z6MkjEHR5a1Eii2DYwds5mFZ2Bgpuq4h7EQoawKBm9BFsmSj",
  "token": "text"
}