DID
changeOwner
Change owner of identity.
Parameters
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
identityOwner
Return an owner address of identity.
Parameters
Name | Type | Description |
---|---|---|
sender | String | Sender address |
indentity | String | Identity address |
Return Value
Name | Type | Description |
---|---|---|
address | String | Owner address of identity |
Example
addDelegate
Add delegate to identity.
Parameters
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
revokeDelegate
Revoke delegate.
Parameters
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
validDelegate
Return a valid delegate.
Parameters
Name | Type | Description |
---|---|---|
sender | String | Sender address |
identity | String | Identity address |
delegateType | String | Type string. length <= 32 |
delegate | String | Delegate address |
Return Value
Name | Type | Description |
---|---|---|
valid | Bool | valid result. true or false |
Example
setAttribute
Set service or key attribute at identity.
Parameters
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
revokeAttribute
Revoke attribute.
Parameters
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
Last updated