N
N
Nimera Blockchain
Eng
Search
K

Managing commands for an account and its attributes

Available in the core.

core.auth.pk.new - Account registration

  • id : String - EON-ID of the account.
  • key : String - public key in Base64.
  • alg : String - signature algorithm. Supported by ed25519.
The command does not require a signature.
Possible errors:
  • "Unsupported algorithm" - unsupported public key algorithm.
  • "Incorrect account public key" - account ID does not match the provided key.
  • "Public key already exists" - the account is already registered.
Example:
{
...
"type": "core.auth.pk.new",
"data": {
"alg": "ed25519",
"id": "EON-LA8RA-QADLL-EBPRW",
"key": "MD4G+x0KKTuKPEL2PBZHZ/q8J5D3fF33U7wBKuZcj7o="
}
}

Multisignature management

Multisignature control commands.

core.auth.multisign.enable - Enabling multisignature

  • sender : String - EON-ID of the account.
  • quorum : Map<String, long> - quorum parameters.
  • hash : String - the hash of the recall secret in Base64.
  • alg : String - hash algorithm. Supports SHA-512.
The command is signed by the account specified in sender and all quorum members - all accounts specified in quorum.
Possible errors:
  • "Hash algorithm is not supported" - unsupported HASH algorithm was set.
  • "Circular links" - cyclic references appeared in the multi-signatures of quorum participants.
  • "Quorum value is outside range" - weight value is incorrect (should be from 1 to 100).
  • "Insufficient total quorum" - the total weight of the quorum participants is insufficient (the sum of all quorums must be at least 100).
Example:
{
...
"type": "core.auth.multisign.enable",
"data": {
"sender": "EON-LA8RA-QADLL-EBPRW",
"quorum": {
"EON-A7CJA-F3PUZ-DKVSK": 30,
"EON-LA8RA-QADLL-EBPRW": 70
},
"hash": "MD4G+x0KKTuKPEL2PBZHZ/q8J5D3fF33U7wBKuZcj7o=",
"alg": "SHA-512"
}
}

core.auth.multisign.revoke - Multisignature revoke

  • id : String - EON-ID of the account.
  • secret : String - secret.
The command does not require a signature.
Possible errors:
  • "Multi-signature is not enabled" - multisignature is not activated.
  • "Prohibited" - revoke parameters are not set.
  • "Secret wrong" - wrong secret.
  • "Unsupported hash algorithm" - unsupported HASH algorithm.
Example:
{
...
"type": "core.auth.multisign.revoke",
"data": {
"id": "EON-LA8RA-QADLL-EBPRW",
"secret": "SUPER-SECRET-PHRASE"
}
}
core.auth.multisign.disable - Disabling multisignature
  • sender : String - EON-ID of the account.
The command is signed by the account specified in sender.
Possible errors:
  • "Multi-signature is not enabled" - multisignature is not activated.
Example:
{
...
"type": "core.auth.multisign.disable",
"data": {
"sender": "EON-LA8RA-QADLL-EBPRW"
}
}

Attribute management

core.data.set - Attribute setup

  • sender : String - EON-ID of the account.
  • value : Map<Sting, String|long> - attributes.
    • Valid key characters: -_.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.
    • Valid string values characters: - _.~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!*'();:@&=+$,/?%#[].
The command is signed by the account specified in sender.
Possible errors:
  • "Incorrect property" - the properties set incorrectly.
Example:
{
...
"type": "core.data.set",
"data": {
"sender": "EON-LA8RA-QADLL-EBPRW",
"value": {
"me.age": 30,
"service.token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NSIsIm5hbWUiOiJKb2huIEdvbGQiLCJhZG1pbiI6dHJ1ZX0K.LIHjWCBORSWMEibq-tnT8ue_deUqZx1K0XxCOXZRrBI"
}
}
}
core.data.del - Attribute removal
  • sender : String - EON-ID of the account.
  • value : String - attribute names (separated by a space bar).
The command is signed by the account specified in sender.
Possible errors:
  • "Unknown property" - removes the unknown property.
Example:
{
...
"type": "core.data.del",
"data": {
"sender": "EON-LA8RA-QADLL-EBPRW",
"value": "me.age service.token"
}
}

state.attribute.set - Setting an account attribute

  • sender : String - EON-ID of the account.
  • value : Map<Sting, String|long> - attributes.
    • Valid key characters: -_.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.
    • Valid string values characters: - _.~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!*'();:@&=+$,/?%#[].
  • target : String - Target account EON-ID.
The command is signed by the account specified in sender.
Possible errors:
  • "Incorrect property" - the properties are set incorrectly .
Example:
{
...
"type": "state.attribute.set",
"data": {
"sender": "EON-LA8RA-QADLL-EBPRW",
"value": {
"me.age": 30,
"service.token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NSIsIm5hbWUiOiJKb2huIEdvbGQiLCJhZG1pbiI6dHJ1ZX0K.LIHjWCBORSWMEibq-tnT8ue_deUqZx1K0XxCOXZRrBI"
},
"target": "EON-A7CJA-F3PUZ-DKVSK"
}
}

state.attribute.del - Deleting an account attribute

  • sender : String - EON-ID of the account.
  • value : String - attribute names (separated by a space bar).
  • target : String - Target account EON-ID.
The command is signed by the account specified in sender.
Possible errors:
  • "Unknown property" - the unknown property is deleted.
Example:
{
...
"type": "state.attribute.del",
"data": {
"sender": "EON-LA8RA-QADLL-EBPRW",
"value": "me.age service.token",
"target": "EON-A7CJA-F3PUZ-DKVSK"
}
}