DID management
Is now in the development stage.

DID Management

did_create_operation

This struct represents the operation to create decentralized identifier (DID). Only the account/asset/contract owner will be able to create DIDs for these objects.
1
struct did_create_operation : public base_operation
2
{
3
struct fee_parameters_type {
4
uint64_t fee = 0;
5
};
6
7
asset fee;
8
account_id_type registrar;
9
10
/// The entity to which DID will be attached
11
object_id_type essence;
12
13
/// Public keys that will be added to the DID object
14
std::set<std::string> public_keys;
15
16
void validate() const;
17
account_id_type fee_payer() const { return registrar; }
18
};
Copied!

JSON Example

1
[
2
68,{
3
"fee": {
4
"amount": 0,
5
"asset_id": "1.3.0"
6
},
7
"registrar": "1.2.0",
8
"essence": "0.0.0",
9
"public_keys": []
10
}
11
]
Copied!

did_update_operation

This struct represents the operation to update decentralized identifier (DID). Only the account/asset/contract owner will be able to update DIDs for these objects.
1
struct did_update_operation : public base_operation
2
{
3
struct fee_parameters_type {
4
uint64_t fee = 0;
5
};
6
7
asset fee;
8
account_id_type registrar;
9
10
/// ID of the object ID to update
11
std::string did_identifier;
12
13
/// Public keys to be deleted from the DID object
14
std::set<std::string> pub_keys_to_delete;
15
16
/// Public keys to add to the DID object
17
std::set<std::string> pub_keys_to_add;
18
19
void validate() const;
20
account_id_type fee_payer() const { return registrar; }
21
};
Copied!

JSON Example

1
[
2
69,{
3
"fee": {
4
"amount": 0,
5
"asset_id": "1.3.0"
6
},
7
"registrar": "1.2.0",
8
"did_identifier": "1.25.0",
9
"pub_keys_to_delete": [],
10
"pub_keys_to_add": []
11
}
12
]
Copied!

did_delete_operation

This struct represents the operation to remove decentralized identifier (DID). Only the account/asset/contract owner will be able to delete DIDs for these objects.
1
struct did_delete_operation : public base_operation
2
{
3
struct fee_parameters_type {
4
uint64_t fee = 0;
5
};
6
7
asset fee;
8
account_id_type registrar;
9
10
/// ID of the object ID to remove
11
std::string did_identifier;
12
13
void validate() const;
14
account_id_type fee_payer() const { return registrar; }
15
};
Copied!

JSON Example

1
[
2
70,{
3
"fee": {
4
"amount": 0,
5
"asset_id": "1.3.0"
6
},
7
"registrar": "1.2.0",
8
"did_identifier": "1.25.0"
9
}
10
]
Copied!
Last modified 11mo ago