Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCodec(cdc *codec.Codec)
- func ValidateHex(value string) bool
- type DidDepositRequest
- type DidDocument
- type DidPowerUpRequest
- type MsgInvalidateDidDepositRequest
- func (msg MsgInvalidateDidDepositRequest) GetSignBytes() []byte
- func (msg MsgInvalidateDidDepositRequest) GetSigners() []sdk.AccAddress
- func (msg MsgInvalidateDidDepositRequest) Route() string
- func (msg MsgInvalidateDidDepositRequest) Type() string
- func (msg MsgInvalidateDidDepositRequest) ValidateBasic() sdk.Error
- type MsgInvalidateDidPowerUpRequest
- func (msg MsgInvalidateDidPowerUpRequest) GetSignBytes() []byte
- func (msg MsgInvalidateDidPowerUpRequest) GetSigners() []sdk.AccAddress
- func (msg MsgInvalidateDidPowerUpRequest) Route() string
- func (msg MsgInvalidateDidPowerUpRequest) Type() string
- func (msg MsgInvalidateDidPowerUpRequest) ValidateBasic() sdk.Error
- type MsgMoveDeposit
- type MsgPowerUpDid
- type MsgRequestDidDeposit
- type MsgRequestDidPowerUp
- type MsgSetIdentity
- type Proof
- type PubKey
- type PubKeys
- type RequestStatus
- type Service
- type Services
Constants ¶
const ( ModuleName = "id" StoreKey = ModuleName QuerierRoute = ModuleName IdentitiesStorePrefix = StoreKey + ":identities:" KeyTypeRsa = "RsaVerificationKey2018" KeyTypeSecp256k1 = "Secp256k1VerificationKey2018" KeyTypeEd25519 = "Ed25519VerificationKey2018" DidDepositRequestStorePrefix = StoreKey + "depositRequest" DidPowerUpRequestStorePrefix = StoreKey + "powerUpRequest" HandledPowerUpRequestsReferenceStorePrefix = StoreKey + "handledPowerUpRequestsReference" StatusApproved = "approved" StatusRejected = "rejected" StatusCanceled = "canceled" QueryResolveDid = "identities" QueryResolveDepositRequest = "depositRequest" QueryResolvePowerUpRequest = "powerUpRequest" MsgTypeSetIdentity = "setIdentity" MsgTypeRequestDidDeposit = "requestDidDeposit" MsgTypeInvalidateDidDepositRequest = "invalidateDidDepositRequest" MsgTypeRequestDidPowerUp = "requestDidPowerUp" MsgTypeInvalidateDidPowerUpRequest = "invalidateDidPowerUpRequest" MsgTypeMoveDeposit = "moveDeposit" MsgTypePowerUpDid = "powerUpDid" )
Variables ¶
var ModuleCdc *codec.Codec
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on wire codec
func ValidateHex ¶ added in v1.3.0
ValidateHex returns true if the given value is a valid hexadecimal-encoded string, false otherwise
Types ¶
type DidDepositRequest ¶ added in v1.3.0
type DidDepositRequest struct { Status *RequestStatus `json:"status"` // Type of the request Recipient sdk.AccAddress `json:"recipient"` // Address that should be funded Amount sdk.Coins `json:"amount"` // Amount that should be taken Proof string `json:"proof"` // Proof of the deposit, encrypted using an AES-256 key and hex encoded EncryptionKey string `json:"encryption_key"` // AES-256 key encrypted using reader's public key and hex encoded FromAddress sdk.AccAddress `json:"from_address"` // Address from which the funds should be taken }
DidDepositRequest represents the request that is sent from a user when he wants to use some amounts from his public identity to later power up his pairwise Did. This request will later be read and unencrypted from a central organization that will move the funds.
type DidDocument ¶ added in v1.2.0
type DidDocument struct { Context string `json:"@context"` ID sdk.AccAddress `json:"id"` PubKeys PubKeys `json:"publicKey"` Authentication ctypes.Strings `json:"authentication"` Proof Proof `json:"proof"` Services Services `json:"service"` }
DidDocument is the concrete serialization of the data model, according to a particular syntax. The Did Document contains attributes or claims about the DID Subject, and the DID itself is contained in the id property.
func (DidDocument) Equals ¶ added in v1.2.0
func (didDocument DidDocument) Equals(other DidDocument) bool
Equals returns true iff didDocument and other contain the same data
func (DidDocument) Validate ¶ added in v1.2.0
func (didDocument DidDocument) Validate() sdk.Error
Validate checks the data present inside this Did Document and returns an error if something is wrong
type DidPowerUpRequest ¶ added in v1.3.0
type DidPowerUpRequest struct { Status *RequestStatus `json:"status"` Claimant sdk.AccAddress `json:"claimant"` Amount sdk.Coins `json:"amount"` Proof string `json:"proof"` EncryptionKey string `json:"encryption_key"` }
DidDepositRequest represents the request that is sent from a user when he wants to send something to his pairwise Did. This request will be read and unencrypted from a central identity that will later update the status and send the funds to the pairwise Did
type MsgInvalidateDidDepositRequest ¶ added in v1.3.0
type MsgInvalidateDidDepositRequest struct { Editor sdk.AccAddress `json:"editor"` DepositProof string `json:"deposit_proof"` Status RequestStatus `json:"status"` }
func NewMsgInvalidateDidDepositRequest ¶ added in v1.3.0
func NewMsgInvalidateDidDepositRequest(status RequestStatus, proof string, editor sdk.AccAddress) MsgInvalidateDidDepositRequest
func (MsgInvalidateDidDepositRequest) GetSignBytes ¶ added in v1.3.0
func (msg MsgInvalidateDidDepositRequest) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgInvalidateDidDepositRequest) GetSigners ¶ added in v1.3.0
func (msg MsgInvalidateDidDepositRequest) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgInvalidateDidDepositRequest) Route ¶ added in v1.3.0
func (msg MsgInvalidateDidDepositRequest) Route() string
Route Implements Msg.
func (MsgInvalidateDidDepositRequest) Type ¶ added in v1.3.0
func (msg MsgInvalidateDidDepositRequest) Type() string
Type Implements Msg.
func (MsgInvalidateDidDepositRequest) ValidateBasic ¶ added in v1.3.0
func (msg MsgInvalidateDidDepositRequest) ValidateBasic() sdk.Error
ValidateBasic Implements Msg.
type MsgInvalidateDidPowerUpRequest ¶ added in v1.3.0
type MsgInvalidateDidPowerUpRequest struct { PowerUpProof string `json:"power_up_proof"` Status RequestStatus `json:"status"` Editor sdk.AccAddress `json:"editor"` }
func NewMsgInvalidateDidPowerUpRequest ¶ added in v1.3.0
func NewMsgInvalidateDidPowerUpRequest(status RequestStatus, proof string, editor sdk.AccAddress) MsgInvalidateDidPowerUpRequest
func (MsgInvalidateDidPowerUpRequest) GetSignBytes ¶ added in v1.3.0
func (msg MsgInvalidateDidPowerUpRequest) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgInvalidateDidPowerUpRequest) GetSigners ¶ added in v1.3.0
func (msg MsgInvalidateDidPowerUpRequest) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgInvalidateDidPowerUpRequest) Route ¶ added in v1.3.0
func (msg MsgInvalidateDidPowerUpRequest) Route() string
Route Implements Msg.
func (MsgInvalidateDidPowerUpRequest) Type ¶ added in v1.3.0
func (msg MsgInvalidateDidPowerUpRequest) Type() string
Type Implements Msg.
func (MsgInvalidateDidPowerUpRequest) ValidateBasic ¶ added in v1.3.0
func (msg MsgInvalidateDidPowerUpRequest) ValidateBasic() sdk.Error
ValidateBasic Implements Msg.
type MsgMoveDeposit ¶ added in v1.3.0
type MsgMoveDeposit struct { DepositProof string `json:"deposit_proof"` Signer sdk.AccAddress `json:"signer"` }
func NewMsgMoveDeposit ¶ added in v1.3.0
func NewMsgMoveDeposit(proof string, signer sdk.AccAddress) MsgMoveDeposit
func (MsgMoveDeposit) GetSignBytes ¶ added in v1.3.0
func (msg MsgMoveDeposit) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgMoveDeposit) GetSigners ¶ added in v1.3.0
func (msg MsgMoveDeposit) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgMoveDeposit) Route ¶ added in v1.3.0
func (msg MsgMoveDeposit) Route() string
Route Implements Msg.
func (MsgMoveDeposit) Type ¶ added in v1.3.0
func (msg MsgMoveDeposit) Type() string
Type Implements Msg.
func (MsgMoveDeposit) ValidateBasic ¶ added in v1.3.0
func (msg MsgMoveDeposit) ValidateBasic() sdk.Error
ValidateBasic Implements Msg.
type MsgPowerUpDid ¶ added in v1.3.0
type MsgPowerUpDid struct { Recipient sdk.AccAddress `json:"recipient"` Amount sdk.Coins `json:"amount"` ActivationReference string `json:"activation_reference"` Signer sdk.AccAddress `json:"signer"` }
func (MsgPowerUpDid) GetSignBytes ¶ added in v1.3.0
func (msg MsgPowerUpDid) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgPowerUpDid) GetSigners ¶ added in v1.3.0
func (msg MsgPowerUpDid) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgPowerUpDid) Route ¶ added in v1.3.0
func (msg MsgPowerUpDid) Route() string
Route Implements Msg.
func (MsgPowerUpDid) Type ¶ added in v1.3.0
func (msg MsgPowerUpDid) Type() string
Type Implements Msg.
func (MsgPowerUpDid) ValidateBasic ¶ added in v1.3.0
func (msg MsgPowerUpDid) ValidateBasic() sdk.Error
ValidateBasic Implements Msg.
type MsgRequestDidDeposit ¶ added in v1.3.0
type MsgRequestDidDeposit struct { Recipient sdk.AccAddress `json:"recipient"` // Address that should be funded Amount sdk.Coins `json:"amount"` // Amount that should be taken Proof string `json:"proof"` // Proof of the deposit, encrypted using an AES-256 key and hex encoded EncryptionKey string `json:"encryption_key"` // AES-256 key encrypted using reader's public key and hex encoded FromAddress sdk.AccAddress `json:"from_address"` // Address from which the funds should be taken }
func (MsgRequestDidDeposit) GetSignBytes ¶ added in v1.3.0
func (msg MsgRequestDidDeposit) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgRequestDidDeposit) GetSigners ¶ added in v1.3.0
func (msg MsgRequestDidDeposit) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgRequestDidDeposit) Route ¶ added in v1.3.0
func (msg MsgRequestDidDeposit) Route() string
Route Implements Msg.
func (MsgRequestDidDeposit) Type ¶ added in v1.3.0
func (msg MsgRequestDidDeposit) Type() string
Type Implements Msg.
func (MsgRequestDidDeposit) ValidateBasic ¶ added in v1.3.0
func (msg MsgRequestDidDeposit) ValidateBasic() sdk.Error
ValidateBasic Implements Msg.
type MsgRequestDidPowerUp ¶ added in v1.3.0
type MsgRequestDidPowerUp struct { Claimant sdk.AccAddress `json:"claimant"` Amount sdk.Coins `json:"amount"` Proof string `json:"proof"` EncryptionKey string `json:"encryption_key"` }
func (MsgRequestDidPowerUp) GetSignBytes ¶ added in v1.3.0
func (msg MsgRequestDidPowerUp) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgRequestDidPowerUp) GetSigners ¶ added in v1.3.0
func (msg MsgRequestDidPowerUp) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgRequestDidPowerUp) Route ¶ added in v1.3.0
func (msg MsgRequestDidPowerUp) Route() string
Route Implements Msg.
func (MsgRequestDidPowerUp) Type ¶ added in v1.3.0
func (msg MsgRequestDidPowerUp) Type() string
Type Implements Msg.
func (MsgRequestDidPowerUp) ValidateBasic ¶ added in v1.3.0
func (msg MsgRequestDidPowerUp) ValidateBasic() sdk.Error
ValidateBasic Implements Msg.
type MsgSetIdentity ¶
type MsgSetIdentity DidDocument
func NewMsgSetIdentity ¶
func NewMsgSetIdentity(document DidDocument) MsgSetIdentity
func (MsgSetIdentity) GetSignBytes ¶
func (msg MsgSetIdentity) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgSetIdentity) GetSigners ¶
func (msg MsgSetIdentity) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgSetIdentity) ValidateBasic ¶
func (msg MsgSetIdentity) ValidateBasic() sdk.Error
ValidateBasic Implements Msg.
type Proof ¶ added in v1.3.0
type Proof struct { Type string `json:"type"` Created time.Time `json:"created"` Creator string `json:"creator"` SignatureValue string `json:"signatureValue"` }
A proof on a DID Document is cryptographic proof of the integrity of the DID Document according to either: 1. The subject, or: 1. The controller, if present.
type PubKey ¶ added in v1.3.0
type PubKey struct { ID string `json:"id"` Type string `json:"type"` Controller sdk.AccAddress `json:"controller"` PublicKeyHex string `json:"publicKeyHex"` }
PubKey contains the information of a public key contained inside a Did Document
type PubKeys ¶ added in v1.3.0
type PubKeys []PubKey
PubKeys represents a slice of PubKey objects
type RequestStatus ¶ added in v1.3.0
RequestStatus represents the status that can be associated to a Did Deposit request or a Did Power Up request
func NewRequestStatus ¶ added in v1.3.2
func NewRequestStatus(statusType, message string) RequestStatus
func (RequestStatus) Validate ¶ added in v1.3.0
func (status RequestStatus) Validate() sdk.Error
Validate returns an error if something present inside the status is wrong
type Service ¶ added in v1.3.0
type Service struct { ID string `json:"id"` Type string `json:"type"` ServiceEndpoint string `json:"serviceEndpoint"` }
Service represents any type of service the subject wishes to advertise, including decentralized identity management services for further discovery, authentication, authorization, or interaction.