Documentation ¶
Index ¶
- Constants
- func GetDIDFromUri(idURI string) string
- func IsRegisterDIDTx(tx *types.Transaction) bool
- func IsRegisterIdentificationTx(tx *types.Transaction) bool
- func IsURIHasPrefix(did string) bool
- type DIDHeaderInfo
- type DIDPayloadInfo
- type DIDProofInfo
- type DIDPublicKeyInfo
- type Operation
- type PayloadRegisterIdentification
- type RegisterIdentificationContent
- type RegisterIdentificationValue
- type TranasactionData
Constants ¶
View Source
const ( Create_DID_Operation = "create" Update_DID_Operation = "update" Deactivate_DID_Operation = "deactivate" )
View Source
const DIDInfoVersion = 0x00
View Source
const DID_ELASTOS_PREFIX = "did:elastos:"
View Source
const MaxSignDataSize = 1000
View Source
const (
RegisterDID types.TxType = 0x0a
)
View Source
const RegisterIdentification = 0x09
View Source
const RegisterIdentificationVersion = 0x00
Variables ¶
This section is empty.
Functions ¶
func GetDIDFromUri ¶ added in v0.1.3
func IsRegisterDIDTx ¶ added in v0.1.3
func IsRegisterDIDTx(tx *types.Transaction) bool
func IsRegisterIdentificationTx ¶
func IsRegisterIdentificationTx(tx *types.Transaction) bool
func IsURIHasPrefix ¶ added in v0.1.3
Types ¶
type DIDHeaderInfo ¶ added in v0.1.3
type DIDHeaderInfo struct { Specification string `json:"specification"` Operation string `json:"operation"` PreviousTxid string `json:"previousTxid,omitempty"` }
header of DID transaction payload
func (*DIDHeaderInfo) Deserialize ¶ added in v0.1.3
func (d *DIDHeaderInfo) Deserialize(r io.Reader, version byte) error
type DIDPayloadInfo ¶ added in v0.1.3
type DIDPayloadInfo struct { ID string `json:"id"` PublicKey []DIDPublicKeyInfo `json:"publicKey"` Authentication []interface{} `json:"authentication"` Authorization []interface{} `json:"authorization"` Expires string `json:"expires"` }
payload in DID transaction payload
type DIDProofInfo ¶ added in v0.1.3
type DIDProofInfo struct { Type string `json:"type"` VerificationMethod string `json:"verificationMethod"` Signature string `json:"signature"` }
proof of DID transaction payload
func (*DIDProofInfo) Deserialize ¶ added in v0.1.3
func (d *DIDProofInfo) Deserialize(r io.Reader, version byte) error
type DIDPublicKeyInfo ¶ added in v0.1.3
type DIDPublicKeyInfo struct { ID string `json:"id"` Type string `json:"type"` Controller string `json:"controller"` PublicKeyBase58 string `json:"publicKeyBase58"` }
public keys of payload in DID transaction payload
func (*DIDPublicKeyInfo) Deserialize ¶ added in v0.1.3
func (p *DIDPublicKeyInfo) Deserialize(r io.Reader, version byte) error
type Operation ¶ added in v0.1.3
type Operation struct { Header DIDHeaderInfo `json:"header"` Payload string `json:"payload"` Proof DIDProofInfo `json:"proof"` PayloadInfo *DIDPayloadInfo }
payload of DID transaction
func (*Operation) Deserialize ¶ added in v0.1.3
type PayloadRegisterIdentification ¶
type PayloadRegisterIdentification struct { ID string Sign []byte Contents []RegisterIdentificationContent }
func (*PayloadRegisterIdentification) Data ¶
func (p *PayloadRegisterIdentification) Data(version byte) []byte
func (*PayloadRegisterIdentification) Deserialize ¶
func (p *PayloadRegisterIdentification) Deserialize(r io.Reader, version byte) error
func (*PayloadRegisterIdentification) GetData ¶
func (p *PayloadRegisterIdentification) GetData() []byte
type RegisterIdentificationContent ¶
type RegisterIdentificationContent struct { Path string Values []RegisterIdentificationValue }
func (*RegisterIdentificationContent) Deserialize ¶
func (a *RegisterIdentificationContent) Deserialize(r io.Reader, version byte) error
type RegisterIdentificationValue ¶
func (*RegisterIdentificationValue) Deserialize ¶
func (a *RegisterIdentificationValue) Deserialize(r io.Reader, version byte) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.