DID

changeOwner

Change owner of identity.

Parameters

NameTypeDescription

sender

String

Sender Address

identity

String

Identity address

newOwner

String

New owner address

tempKey

String

tempKey for "changeOwner"

hashKey

String

hash(tempKey | secretKey)

signature

String

sign( hash( sender | identity | newOwner | tempKey | hashKey ) ) by sender's privateKey using signData API

In order to perform a transaction, the owner must have a balance of at least 1 GFEI for gas cost.

Return Value

NameTypeDescription

transactionId

String

Transaction Id

A transactionId is returned, but that doesn't mean it has been added to the Block yet. You should check that the status is 1 by using net_getTransactionStatus.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

identityOwner

Return an owner address of identity.

Parameters

NameTypeDescription

sender

String

Sender address

indentity

String

Identity address

Return Value

NameTypeDescription

address

String

Owner address of identity

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "address": "0xB596C495229D43F9c6C3DB9B76325419D4970Aa4"
        }
    }
}

addDelegate

Add delegate to identity.

Parameters

NameTypeDescription

sender

String

Sender Address

identity

String

Identity address

delegateType

String

Type string. length <= 32

delegate

String

Deleagate address

validity

BigInteger

Valid time. seconds. block timestamp + validity

tempKey

String

tempKey for "addDelegate"

hashKey

String

hash(tempKey | secretKey)

signature

String

sign( hash( sender | identity | delegateType | delegate | tempKey | hashKey ) ) by sender's privateKey using signData API

In order to perform a transaction, the owner must have a balance of at least 1 GFEI for gas cost.

Return Value

NameTypeDescription

transactionId

String

Transaction Id

A transactionId is returned, but that doesn't mean it has been added to the Block yet. You should check that the status is 1 by using net_getTransactionStatus.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

revokeDelegate

Revoke delegate.

Parameters

NameTypeDescription

sender

String

Sender Address

identity

String

Identity address

delegateType

String

Type string. length <= 32

delegate

String

Delegate address

tempKey

String

tempKey for "revokeDelegate"

hashKey

String

hash(tempKey | secretKey)

signature

String

sign( hash( sender | identity | delegateType | delegate | tempKey | hashKey ) ) by sender's privateKey using signData API

In order to perform a transaction, the owner must have a balance of at least 1 GFEI for gas cost.

Return Value

NameTypeDescription

transactionId

String

Transaction Id

A transactionId is returned, but that doesn't mean it has been added to the Block yet. You should check that the status is 1 by using net_getTransactionStatus.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

validDelegate

Return a valid delegate.

Parameters

NameTypeDescription

sender

String

Sender address

identity

String

Identity address

delegateType

String

Type string. length <= 32

delegate

String

Delegate address

Return Value

NameTypeDescription

valid

Bool

valid result. true or false

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "valid": true
        }
    }
}

setAttribute

Set service or key attribute at identity.

Parameters

NameTypeDescription

sender

String

Sender address

identity

String

Identity address

attrName

String

Attribute name. length <= 32. Service starts with "did/svc/". Key starts with "did/key/".

attrValue

String

Attribute value

validity

BigInteger

Valid time. seconds. block timestamp + validity

tempKey

String

tempKey for "setAttribute"

hashKey

String

hash(tempKey | fromAddress' secretKey)

signature

String

sign( hash( sender | identity | attrName | attrValue | validity | tempKey | hashKey ) ) by sender's privateKey using signData API

In order to perform a transaction, the from address must have a balance of at least 1 GFEI for gas cost.

Return Value

NameTypeDescription

transactionId

String

Transaction Id

A transactionId is returned, but that doesn't mean it has been added to the Block yet. You should check that the status is 1 by using net_getTransactionStatus.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

revokeAttribute

Revoke attribute.

Parameters

NameTypeDescription

sender

String

Sender address

identity

String

Identity address

attrName

String

Attribute name. length <= 32. Service starts with "did/svc/". Key starts with "did/key/".

attrValue

String

Attribute value

tempKey

String

tempKey for "revokeAttribute"

hashKey

String

hash(tempKey | fromAddress' secretKey)

signature

String

sign( hash( sender | identity | attrName | attrValue | tempKey | hashKey ) ) by sender's privateKey using signData API

In order to perform a transaction, the spender address must have a balance of at least 1 1 GFEI for gas cost.

Return Value

NameTypeDescription

transactionId

String

Transaction Id

A transactionId is returned, but that doesn't mean it has been added to the Block yet. You should check that the status is 1 by using net_getTransactionStatus.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

Last updated