# Glossary

Here are collected all that common terms that you should know while you are working with Commercio.network

# Did

Directly from Did Specifications (opens new window):

A DID is a simple text string that consists of three parts:

  1. the URL scheme identifier (did);
  2. the identifier for the DID method;
  3. the DID method-specific identifier.

Example of Commercio.network Did

did:com:14zk9u8894eg7fhgw0dsesnqzmlrx85ga9rvnjc

This Did in simple words it's nothing but a link that resolves to a specific Did Document.

# In SDK

Inside the SDK the did is an object of type Did which has a string field named value that contains a string like the example above.

inline class Did(val value: String)
1

# Did Document

Directly from Did Specifications (opens new window):

A Did Document contains information associated with the Did such as ways to cryptographically authenticate the entity in control of the Did, as well as services that can be used to interact with the entity.

Did Document Example (specific for Commercio.network)

{
  "@context": "https://www.w3.org/ns/did/v1",
  "id": "did:com:14zk9u8894eg7fhgw0dsesnqzmlrx85ga9rvnjc",
  "publicKey": [
    {
      "id": "did:com:14zk9u8894eg7fhgw0dsesnqzmlrx85ga9rvnjc#keys-1",
      "type": "RsaVerificationKey2018",
      "controller": "did:com:14zk9u8894eg7fhgw0dsesnqzmlrx85ga9rvnjc ",
      "publicKeyHex": "30820122300d06092a864886f70d01010105000382010f003082010a0282010100"
    },
    {
      "id": "did:com:14zk9u8894eg7fhgw0dsesnqzmlrx85ga9rvnjc#keys-2",
      "type": "Secp256k1VerificationKey2018",
      "controller": "did:com:14zk9u8894eg7fhgw0dsesnqzmlrx85ga9rvnjc ",
      "publicKeyHex": "02b97c30de767f084ce3080168ee293053ba33b235d7116a3263d29f1450936b71"
    }
  ],
  "service": [
    {
      "id": "did:com:14zk9u8894eg7fhgw0dsesnqzmlrx85ga9rvnjc#openid",
      "type": "OpenIdConnectVersion1.0Service",
      "serviceEndpoint": "https://openid.commercio.com/"
    },
    {
      "id": "did:com:14zk9u8894eg7fhgw0dsesnqzmlrx85ga9rvnjc#messageing",
      "type": "MessaginService",
      "serviceEndpoint": "http://chat.commercio.com/did:com:14zk9u8894eg7fhgw0dsesnqzmlrx85ga9rvnjc"
    }
  ],
  "proof": {
    "type": "LinkedDataSignature2015",
    "created": "2016-02-08T16:02:20Z",
    "proofPurpose": "authentication",
    "controller": "did:com:14zk9u8894eg7fhgw0dsesnqzmlrx85ga9rvnjc",
    "verificationMethod": "did:com:pub1addwnpepq20w6zkfdncmkqnlmrktzjsfqu2dk0v9qduzm7wrpr8hzk9wl4zwyjnjarv",
    "signatureValue": "QNB13Y7Q9...1tzjn4w=="
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# In SDK

Inside the SDK it is an object of type DidDocument:

data class DidDocument(
    @JsonProperty("@context") val context: String,
    @JsonProperty("id") val id: String,
    @JsonProperty("publicKey") val publicKeys: List<DidDocumentPublicKey>,
    @JsonProperty("proof") val proof: DidDocumentProof,
    @JsonProperty("service") @JsonInclude(JsonInclude.Include.NON_NULL) val service: List<DidDocumentService>?
) 
1
2
3
4
5
6
7

# Did Power Up Request

Directly from Commercio.network Documentation (opens new window):

A Did Power Up is the expression we use when referring to the willingness of a user to move a specified amount of tokens from external centralized entity to one of his private pairwise Did, making them able to send documents (which indeed require the user to spend some tokens as fees).

Did Power Up Request example

{
  "claimant":"address that sent funds to the centralized entity before",
  "amount":[
      {
        "denom":"ucommercio",
        "amount":"amount to transfer to the pairwise did, integer"
      }
  ],
  "proof":"proof string",
  "id":"randomly-generated UUID v4",
  "proof_key":"proof encryption key"
}
1
2
3
4
5
6
7
8
9
10
11
12

# MsgRequestDidPowerUp in SDK

Inside the SDK it is an object of type MsgRequestDidPowerUp

data class MsgRequestDidPowerUp(
    private val claimantDid: String,
    private val amount: List<StdCoin>,
    private val powerUpProof: String,
    private val uuid: String,
    private val proofKey: String
)
1
2
3
4
5
6
7