Documentation ¶
Index ¶
- Variables
- func Base64UrlToBytes(base64Url string) ([]byte, error)
- func BitcoinAddress(pk *PubKey) string
- func EthereumAddress(pk *PubKey) string
- func ParseCredentialPublicKey(pubStr string) (interface{}, error)
- type AccountData
- func (*AccountData) Descriptor() ([]byte, []int)
- func (m *AccountData) GetAddress() string
- func (m *AccountData) GetAlgo() string
- func (m *AccountData) GetPublicKey() []byte
- func (m *AccountData) Marshal() (dAtA []byte, err error)
- func (m *AccountData) MarshalTo(dAtA []byte) (int, error)
- func (m *AccountData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AccountData) ProtoMessage()
- func (m *AccountData) Reset()
- func (m *AccountData) Size() (n int)
- func (m *AccountData) String() string
- func (m *AccountData) Unmarshal(dAtA []byte) error
- func (m *AccountData) XXX_DiscardUnknown()
- func (m *AccountData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AccountData) XXX_Merge(src proto.Message)
- func (m *AccountData) XXX_Size() int
- func (m *AccountData) XXX_Unmarshal(b []byte) error
- type Address
- type CoinType
- func (ct CoinType) AddrPrefix() string
- func (ct CoinType) BipPath() uint32
- func (ct CoinType) DIDMethod() string
- func (CoinType) EnumDescriptor() ([]byte, []int)
- func (ct CoinType) FormatAddress(pk *PubKey) string
- func (ct CoinType) FormatDID(pk *PubKey) (string, string)
- func (ct CoinType) IsBitcoin() bool
- func (ct CoinType) IsCosmos() bool
- func (ct CoinType) IsDogecoin() bool
- func (ct CoinType) IsEthereum() bool
- func (ct CoinType) IsFilecoin() bool
- func (ct CoinType) IsHandshake() bool
- func (ct CoinType) IsLitecoin() bool
- func (ct CoinType) IsRipple() bool
- func (ct CoinType) IsSolana() bool
- func (ct CoinType) IsSonr() bool
- func (ct CoinType) IsTestnet() bool
- func (ct CoinType) Name() string
- func (x CoinType) String() string
- func (ct CoinType) Ticker() string
- type JSONWebSignature2020Proof
- func (*JSONWebSignature2020Proof) Descriptor() ([]byte, []int)
- func (m *JSONWebSignature2020Proof) GetJws() string
- func (m *JSONWebSignature2020Proof) GetProof() *Proof
- func (m *JSONWebSignature2020Proof) Marshal() (dAtA []byte, err error)
- func (m *JSONWebSignature2020Proof) MarshalTo(dAtA []byte) (int, error)
- func (m *JSONWebSignature2020Proof) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*JSONWebSignature2020Proof) ProtoMessage()
- func (m *JSONWebSignature2020Proof) Reset()
- func (m *JSONWebSignature2020Proof) Size() (n int)
- func (m *JSONWebSignature2020Proof) String() string
- func (m *JSONWebSignature2020Proof) Unmarshal(dAtA []byte) error
- func (m *JSONWebSignature2020Proof) XXX_DiscardUnknown()
- func (m *JSONWebSignature2020Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JSONWebSignature2020Proof) XXX_Merge(src proto.Message)
- func (m *JSONWebSignature2020Proof) XXX_Size() int
- func (m *JSONWebSignature2020Proof) XXX_Unmarshal(b []byte) error
- type KeyType
- type Proof
- func (*Proof) Descriptor() ([]byte, []int)
- func (m *Proof) GetCreated() string
- func (m *Proof) GetDomain() string
- func (m *Proof) GetProofPurpose() string
- func (m *Proof) GetType() ProofType
- func (m *Proof) GetVerificationMethod() string
- func (m *Proof) Marshal() (dAtA []byte, err error)
- func (m *Proof) MarshalTo(dAtA []byte) (int, error)
- func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Proof) ProtoMessage()
- func (m *Proof) Reset()
- func (m *Proof) Size() (n int)
- func (m *Proof) String() string
- func (m *Proof) Unmarshal(dAtA []byte) error
- func (m *Proof) XXX_DiscardUnknown()
- func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Proof) XXX_Merge(src proto.Message)
- func (m *Proof) XXX_Size() int
- func (m *Proof) XXX_Unmarshal(b []byte) error
- type ProofType
- type PubKey
- func (pk *PubKey) Address() Address
- func (pk *PubKey) Base64() string
- func (pk *PubKey) Blake3() string
- func (pk *PubKey) Btcec() (*btcec.PublicKey, error)
- func (pk *PubKey) Bytes() []byte
- func (*PubKey) Descriptor() ([]byte, []int)
- func (pk *PubKey) Equals(other cryptotypes.PubKey) bool
- func (m *PubKey) GetKey() []byte
- func (m *PubKey) GetKeyType() string
- func (m *PubKey) Marshal() (dAtA []byte, err error)
- func (m *PubKey) MarshalTo(dAtA []byte) (int, error)
- func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (pk *PubKey) Multibase() string
- func (*PubKey) ProtoMessage()
- func (pk *PubKey) Raw() []byte
- func (m *PubKey) Reset()
- func (pk *PubKey) Secp256k1() (*secp256k1.PubKey, error)
- func (pk *PubKey) Secp256k1AnyProto() (*codectypes.Any, error)
- func (m *PubKey) Size() (n int)
- func (m *PubKey) String() string
- func (pk *PubKey) Type() string
- func (m *PubKey) Unmarshal(dAtA []byte) error
- func (m *PubKey) XXX_DiscardUnknown()
- func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PubKey) XXX_Merge(src proto.Message)
- func (m *PubKey) XXX_Size() int
- func (m *PubKey) XXX_Unmarshal(b []byte) error
- type VerifiableCredential
- func (*VerifiableCredential) Descriptor() ([]byte, []int)
- func (m *VerifiableCredential) GetContext() []string
- func (m *VerifiableCredential) GetCredentialSubject() map[string]string
- func (m *VerifiableCredential) GetExpirationDate() string
- func (m *VerifiableCredential) GetId() string
- func (m *VerifiableCredential) GetIssuanceDate() string
- func (m *VerifiableCredential) GetIssuer() string
- func (m *VerifiableCredential) GetProof() map[string]string
- func (m *VerifiableCredential) GetType() []string
- func (m *VerifiableCredential) Marshal() (dAtA []byte, err error)
- func (m *VerifiableCredential) MarshalTo(dAtA []byte) (int, error)
- func (m *VerifiableCredential) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*VerifiableCredential) ProtoMessage()
- func (m *VerifiableCredential) Reset()
- func (m *VerifiableCredential) Size() (n int)
- func (m *VerifiableCredential) String() string
- func (m *VerifiableCredential) Unmarshal(dAtA []byte) error
- func (m *VerifiableCredential) XXX_DiscardUnknown()
- func (m *VerifiableCredential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VerifiableCredential) XXX_Merge(src proto.Message)
- func (m *VerifiableCredential) XXX_Size() int
- func (m *VerifiableCredential) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthCoin = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCoin = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupCoin = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthSsi = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSsi = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSsi = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthVc = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowVc = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupVc = fmt.Errorf("proto: unexpected end of group") )
var CoinType_name = map[int32]string{
0: "CoinType_BITCOIN",
1: "CoinType_TESTNET",
2: "CoinType_LITECOIN",
3: "CoinType_DOGE",
4: "CoinType_ETHEREUM",
5: "CoinType_SONR",
6: "CoinType_COSMOS",
7: "CoinType_FILECOIN",
8: "CoinType_HNS",
9: "CoinType_SOLANA",
10: "CoinType_XRP",
}
var CoinType_value = map[string]int32{
"CoinType_BITCOIN": 0,
"CoinType_TESTNET": 1,
"CoinType_LITECOIN": 2,
"CoinType_DOGE": 3,
"CoinType_ETHEREUM": 4,
"CoinType_SONR": 5,
"CoinType_COSMOS": 6,
"CoinType_FILECOIN": 7,
"CoinType_HNS": 8,
"CoinType_SOLANA": 9,
"CoinType_XRP": 10,
}
var KeyType_name = map[int32]string{
0: "KeyType_UNSPECIFIED",
1: "KeyType_JSON_WEB_KEY_2020",
2: "KeyType_ED25519_VERIFICATION_KEY_2018",
3: "KeyType_ECDSA_SECP256K1_VERIFICATION_KEY_2019",
4: "KeyType_RSA_VERIFICATION_KEY_2018",
5: "KeyType_WEB_AUTHN_AUTHENTICATION_2018",
}
var KeyType_value = map[string]int32{
"KeyType_UNSPECIFIED": 0,
"KeyType_JSON_WEB_KEY_2020": 1,
"KeyType_ED25519_VERIFICATION_KEY_2018": 2,
"KeyType_ECDSA_SECP256K1_VERIFICATION_KEY_2019": 3,
"KeyType_RSA_VERIFICATION_KEY_2018": 4,
"KeyType_WEB_AUTHN_AUTHENTICATION_2018": 5,
}
var ProofType_name = map[int32]string{
0: "ProofType_UNSPECIFIED",
1: "ProofType_JSON_WEB_SIGNATURE_2020",
2: "ProofType_ED25519_SIGNATURE_2018",
3: "ProofType_ECDSA_SECP256K1_SIGNATURE_2019",
4: "ProofType_RSA_SIGNATURE_2018",
}
var ProofType_value = map[string]int32{
"ProofType_UNSPECIFIED": 0,
"ProofType_JSON_WEB_SIGNATURE_2020": 1,
"ProofType_ED25519_SIGNATURE_2018": 2,
"ProofType_ECDSA_SECP256K1_SIGNATURE_2019": 3,
"ProofType_RSA_SIGNATURE_2018": 4,
}
Functions ¶
func Base64UrlToBytes ¶ added in v0.6.5
Base64UrlToBytes converts a base64url string to bytes.
func BitcoinAddress ¶ added in v0.5.0
BitcoinAddress returns the Bitcoin address of the public key.
func EthereumAddress ¶ added in v0.5.0
EthereumAddress returns the Ethereum address of the public key.
func ParseCredentialPublicKey ¶ added in v0.6.5
ParseCredentialPublicKey parses a public key from a base64url string.
Types ¶
type AccountData ¶ added in v0.7.1
type AccountData struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Algo string `protobuf:"bytes,2,opt,name=algo,proto3" json:"algo,omitempty"` PublicKey []byte `protobuf:"bytes,3,opt,name=publicKey,proto3" json:"publicKey,omitempty"` }
func (*AccountData) Descriptor ¶ added in v0.7.1
func (*AccountData) Descriptor() ([]byte, []int)
func (*AccountData) GetAddress ¶ added in v0.7.1
func (m *AccountData) GetAddress() string
func (*AccountData) GetAlgo ¶ added in v0.7.1
func (m *AccountData) GetAlgo() string
func (*AccountData) GetPublicKey ¶ added in v0.7.1
func (m *AccountData) GetPublicKey() []byte
func (*AccountData) Marshal ¶ added in v0.7.1
func (m *AccountData) Marshal() (dAtA []byte, err error)
func (*AccountData) MarshalTo ¶ added in v0.7.1
func (m *AccountData) MarshalTo(dAtA []byte) (int, error)
func (*AccountData) MarshalToSizedBuffer ¶ added in v0.7.1
func (m *AccountData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AccountData) ProtoMessage ¶ added in v0.7.1
func (*AccountData) ProtoMessage()
func (*AccountData) Reset ¶ added in v0.7.1
func (m *AccountData) Reset()
func (*AccountData) Size ¶ added in v0.7.1
func (m *AccountData) Size() (n int)
func (*AccountData) String ¶ added in v0.7.1
func (m *AccountData) String() string
func (*AccountData) Unmarshal ¶ added in v0.7.1
func (m *AccountData) Unmarshal(dAtA []byte) error
func (*AccountData) XXX_DiscardUnknown ¶ added in v0.7.1
func (m *AccountData) XXX_DiscardUnknown()
func (*AccountData) XXX_Marshal ¶ added in v0.7.1
func (m *AccountData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccountData) XXX_Merge ¶ added in v0.7.1
func (m *AccountData) XXX_Merge(src proto.Message)
func (*AccountData) XXX_Size ¶ added in v0.7.1
func (m *AccountData) XXX_Size() int
func (*AccountData) XXX_Unmarshal ¶ added in v0.7.1
func (m *AccountData) XXX_Unmarshal(b []byte) error
type CoinType ¶
type CoinType int32
CoinType is the BIP-0044 coin type for each supported coin.
const ( // Bitcoins coin type is 0 CoinType_CoinType_BITCOIN CoinType = 0 // Testnet coin type is 1 CoinType_CoinType_TESTNET CoinType = 1 // Litecoin coin type is 2 CoinType_CoinType_LITECOIN CoinType = 2 // Dogecoin coin type is 3 CoinType_CoinType_DOGE CoinType = 3 // Ethereum coin type is 60 CoinType_CoinType_ETHEREUM CoinType = 4 // Sonr coin type is 703 CoinType_CoinType_SONR CoinType = 5 // Cosmos coin type is 118 CoinType_CoinType_COSMOS CoinType = 6 // Filecoin coin type is 461 CoinType_CoinType_FILECOIN CoinType = 7 // Handshake coin type is 5353 CoinType_CoinType_HNS CoinType = 8 // Solana coin type is 501 CoinType_CoinType_SOLANA CoinType = 9 // Ripple coin type is 144 CoinType_CoinType_XRP CoinType = 10 )
func CoinTypeFromAddrPrefix ¶
CoinTypeFromAddrPrefix returns the CoinType from the string.
func CoinTypeFromBipPath ¶
CoinTypeFromBipPath returns the CoinType from the index.
func CoinTypeFromDidMethod ¶
CoinTypeFromDidMethod returns the CoinType from the DID method.
func CoinTypeFromName ¶
CoinTypeFromName returns the CoinType from the name.
func CoinTypeFromTicker ¶
CoinTypeFromTicker returns the CoinType from the symbol.
func (CoinType) AddrPrefix ¶
AddrPrefix returns the address prefix for the given coin type.
func (CoinType) DIDMethod ¶ added in v0.7.1
DIDMethod returns the DID method for the given coin type.
func (CoinType) EnumDescriptor ¶
func (CoinType) FormatAddress ¶ added in v0.5.0
FormatAddress returns the address for the given public key for the spec of the coin type.
func (CoinType) FormatDID ¶ added in v0.6.0
FormatDID returns the DID for the given public key for the spec of the coin type, along with the address.
func (CoinType) IsDogecoin ¶
IsDogecoin returns true if the coin type is dogecoin.
func (CoinType) IsEthereum ¶
IsEthereum returns true if the coin type is ethereum.
func (CoinType) IsFilecoin ¶
IsFilecoin returns true if the coin type is filecoin.
func (CoinType) IsHandshake ¶
IsHandshake returns true if the coin type is handshake.
func (CoinType) IsLitecoin ¶
IsLitecoin returns true if the coin type is litecoin.
type JSONWebSignature2020Proof ¶
type JSONWebSignature2020Proof struct { Proof *Proof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` Jws string `protobuf:"bytes,2,opt,name=jws,proto3" json:"jws,omitempty"` }
JSONWebSignature2020Proof is a VC proof with a signature according to JsonWebSignature2020
func (*JSONWebSignature2020Proof) Descriptor ¶
func (*JSONWebSignature2020Proof) Descriptor() ([]byte, []int)
func (*JSONWebSignature2020Proof) GetJws ¶
func (m *JSONWebSignature2020Proof) GetJws() string
func (*JSONWebSignature2020Proof) GetProof ¶
func (m *JSONWebSignature2020Proof) GetProof() *Proof
func (*JSONWebSignature2020Proof) Marshal ¶
func (m *JSONWebSignature2020Proof) Marshal() (dAtA []byte, err error)
func (*JSONWebSignature2020Proof) MarshalTo ¶
func (m *JSONWebSignature2020Proof) MarshalTo(dAtA []byte) (int, error)
func (*JSONWebSignature2020Proof) MarshalToSizedBuffer ¶
func (m *JSONWebSignature2020Proof) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*JSONWebSignature2020Proof) ProtoMessage ¶
func (*JSONWebSignature2020Proof) ProtoMessage()
func (*JSONWebSignature2020Proof) Reset ¶
func (m *JSONWebSignature2020Proof) Reset()
func (*JSONWebSignature2020Proof) Size ¶
func (m *JSONWebSignature2020Proof) Size() (n int)
func (*JSONWebSignature2020Proof) String ¶
func (m *JSONWebSignature2020Proof) String() string
func (*JSONWebSignature2020Proof) Unmarshal ¶
func (m *JSONWebSignature2020Proof) Unmarshal(dAtA []byte) error
func (*JSONWebSignature2020Proof) XXX_DiscardUnknown ¶
func (m *JSONWebSignature2020Proof) XXX_DiscardUnknown()
func (*JSONWebSignature2020Proof) XXX_Marshal ¶
func (m *JSONWebSignature2020Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*JSONWebSignature2020Proof) XXX_Merge ¶
func (m *JSONWebSignature2020Proof) XXX_Merge(src proto.Message)
func (*JSONWebSignature2020Proof) XXX_Size ¶
func (m *JSONWebSignature2020Proof) XXX_Size() int
func (*JSONWebSignature2020Proof) XXX_Unmarshal ¶
func (m *JSONWebSignature2020Proof) XXX_Unmarshal(b []byte) error
type KeyType ¶
type KeyType int32
KeyType is the type of key used to sign a DID document.
const ( // No key type specified KeyType_KeyType_UNSPECIFIED KeyType = 0 // JsonWebKey2020 is a VerificationMethod type. https://w3c-ccg.github.io/lds-jws2020/ KeyType_KeyType_JSON_WEB_KEY_2020 KeyType = 1 // ED25519VerificationKey2018 is the Ed25519VerificationKey2018 verification key type as specified here: https://w3c-ccg.github.io/lds-ed25519-2018/ KeyType_KeyType_ED25519_VERIFICATION_KEY_2018 KeyType = 2 // ECDSASECP256K1VerificationKey2019 is the EcdsaSecp256k1VerificationKey2019 verification key type as specified here: https://w3c-ccg.github.io/lds-ecdsa-secp256k1-2019/ KeyType_KeyType_ECDSA_SECP256K1_VERIFICATION_KEY_2019 KeyType = 3 // RSAVerificationKey2018 is the RsaVerificationKey2018 verification key type as specified here: https://w3c-ccg.github.io/lds-rsa2018/ KeyType_KeyType_RSA_VERIFICATION_KEY_2018 KeyType = 4 // WebAuthnAuthentication2018 is the WebAuthnAuthentication2018 verification key type as specified here: https://w3c-ccg.github.io/lds-webauthn/ KeyType_KeyType_WEB_AUTHN_AUTHENTICATION_2018 KeyType = 5 )
func KeyTypeFromMulticodec ¶
KeyTypeFromMulticodec returns the key type
func KeyTypeFromPrettyString ¶
KeyTypeFromPrettyString returns the key type
func (KeyType) EnumDescriptor ¶
func (KeyType) FormatString ¶
FormatString returns the string representation of the key type
func (KeyType) IsBlockchainKey ¶ added in v0.5.0
IsBlockchainKey returns true if the key is a edsa or secp256k1 key
func (KeyType) IsWebAuthnKey ¶ added in v0.5.0
IsWebAuthnKey returns true if the key is a webauthn key
func (KeyType) MulticodecType ¶
MulticodecType returns the multicodec code for the key type -- We represent those as raw public key bytes prefixed with public key -- multiformat code. | secp256k1 "0xe7" | Ed25519 "0xed" | P256 "0x1200" | P384 "0x1201" | P512 "0x1202" | RSA "0x1205"
func (KeyType) PrettyString ¶
PrettyString returns the string representation of the key type
type Proof ¶
type Proof struct { // Type defines the specific proof type used. For example, an Ed25519Signature2018 type indicates that the proof includes a digital signature produced by an ed25519 cryptographic key. Type ProofType `protobuf:"varint,1,opt,name=type,proto3,enum=sonr.crypto.ProofType" json:"type,omitempty"` // ProofPurpose defines the intent for the proof, the reason why an entity created it. Acts as a safeguard to prevent the proof from being misused for a purpose other than the one it was intended for. ProofPurpose string `protobuf:"bytes,2,opt,name=proof_purpose,json=proofPurpose,proto3" json:"proof_purpose,omitempty"` // VerificationMethod points to the ID that can be used to verify the proof, eg: a public key. VerificationMethod string `protobuf:"bytes,3,opt,name=verification_method,json=verificationMethod,proto3" json:"verification_method,omitempty"` // Created notes when the proof was created using a iso8601 string Created string `protobuf:"bytes,4,opt,name=created,proto3" json:"created,omitempty"` // Domain specifies the restricted domain of the proof Domain string `protobuf:"bytes,5,opt,name=domain,proto3" json:"domain,omitempty"` }
Proof represents a credential/presentation proof as defined by the Linked Data Proofs 1.0 specification (https://w3c-ccg.github.io/ld-proofs/).
func (*Proof) Descriptor ¶
func (*Proof) GetCreated ¶
func (*Proof) GetProofPurpose ¶
func (*Proof) GetVerificationMethod ¶
func (*Proof) ProtoMessage ¶
func (*Proof) ProtoMessage()
func (*Proof) XXX_DiscardUnknown ¶
func (m *Proof) XXX_DiscardUnknown()
func (*Proof) XXX_Marshal ¶
func (*Proof) XXX_Unmarshal ¶
type ProofType ¶
type ProofType int32
ProofType is the type of proof used to present claims over a DID document.
const ( // No proof type specified ProofType_ProofType_UNSPECIFIED ProofType = 0 // JsonWebSignature2020 is a proof type. https://w3c-ccg.github.io/lds-jws2020/ ProofType_ProofType_JSON_WEB_SIGNATURE_2020 ProofType = 1 // ED25519Signature2018 is the Ed25519Signature2018 proof type as specified here: https://w3c-ccg.github.io/lds-ed25519-2018/ ProofType_ProofType_ED25519_SIGNATURE_2018 ProofType = 2 // EcdsaSecp256k1Signature2019 is the EcdsaSecp256k1Signature2019 proof type as specified here: https://w3c-ccg.github.io/lds-ecdsa-secp256k1-2019/ ProofType_ProofType_ECDSA_SECP256K1_SIGNATURE_2019 ProofType = 3 // RsaSignature2018 is the RsaSignature2018 proof type as specified here: https://w3c-ccg.github.io/lds-rsa2018/ ProofType_ProofType_RSA_SIGNATURE_2018 ProofType = 4 )
func (ProofType) EnumDescriptor ¶
func (ProofType) FormatString ¶
FormatString returns the string representation of the key type
type PubKey ¶
type PubKey struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` KeyType string `protobuf:"bytes,2,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` }
PubKey represents a public key in bytes format.
func NewSecp256k1PubKey ¶ added in v0.7.1
NewSecp256k1PubKey takes a secp256k1.PubKey and returns a PubKey
func (*PubKey) Address ¶
Address Creating a new method called Address() that returns an Address type.
func (*PubKey) Descriptor ¶
func (*PubKey) Equals ¶
func (pk *PubKey) Equals(other cryptotypes.PubKey) bool
Equals Comparing the two keys.
func (*PubKey) GetKeyType ¶
func (*PubKey) MarshalToSizedBuffer ¶
func (*PubKey) ProtoMessage ¶
func (*PubKey) ProtoMessage()
func (*PubKey) Secp256k1AnyProto ¶ added in v0.6.20
func (pk *PubKey) Secp256k1AnyProto() (*codectypes.Any, error)
Secp256k1AnyProto returns the pubkey for cosmos transactions
func (*PubKey) XXX_DiscardUnknown ¶
func (m *PubKey) XXX_DiscardUnknown()
func (*PubKey) XXX_Marshal ¶
func (*PubKey) XXX_Unmarshal ¶
type VerifiableCredential ¶
type VerifiableCredential struct { // ID is the unique identifier for the credential. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Context is a list of URIs that define the context of the credential. Context []string `protobuf:"bytes,2,rep,name=context,proto3" json:"context,omitempty"` // Type is a list of URIs that define the type of the credential. Type []string `protobuf:"bytes,3,rep,name=type,proto3" json:"type,omitempty"` // Issuer is the DID of the issuer of the credential. Issuer string `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"` // IssuanceDate is the date the credential was issued. IssuanceDate string `protobuf:"bytes,5,opt,name=issuance_date,json=issuanceDate,proto3" json:"issuance_date,omitempty"` // ExpirationDate is the date the credential expires. ExpirationDate string `protobuf:"bytes,6,opt,name=expiration_date,json=expirationDate,proto3" json:"expiration_date,omitempty"` // CredentialSubject is the subject of the credential. CredentialSubject map[string]string `` /* 200-byte string literal not displayed */ // Proof is the proof of the credential. Proof map[string]string `` /* 151-byte string literal not displayed */ }
VerifiableCredential represents a credential as defined by the Verifiable Credentials Data Model 1.0 specification (https://www.w3.org/TR/vc-data-model/).
func (*VerifiableCredential) Descriptor ¶
func (*VerifiableCredential) Descriptor() ([]byte, []int)
func (*VerifiableCredential) GetContext ¶
func (m *VerifiableCredential) GetContext() []string
func (*VerifiableCredential) GetCredentialSubject ¶
func (m *VerifiableCredential) GetCredentialSubject() map[string]string
func (*VerifiableCredential) GetExpirationDate ¶
func (m *VerifiableCredential) GetExpirationDate() string
func (*VerifiableCredential) GetId ¶
func (m *VerifiableCredential) GetId() string
func (*VerifiableCredential) GetIssuanceDate ¶
func (m *VerifiableCredential) GetIssuanceDate() string
func (*VerifiableCredential) GetIssuer ¶
func (m *VerifiableCredential) GetIssuer() string
func (*VerifiableCredential) GetProof ¶
func (m *VerifiableCredential) GetProof() map[string]string
func (*VerifiableCredential) GetType ¶
func (m *VerifiableCredential) GetType() []string
func (*VerifiableCredential) Marshal ¶
func (m *VerifiableCredential) Marshal() (dAtA []byte, err error)
func (*VerifiableCredential) MarshalTo ¶
func (m *VerifiableCredential) MarshalTo(dAtA []byte) (int, error)
func (*VerifiableCredential) MarshalToSizedBuffer ¶
func (m *VerifiableCredential) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*VerifiableCredential) ProtoMessage ¶
func (*VerifiableCredential) ProtoMessage()
func (*VerifiableCredential) Reset ¶
func (m *VerifiableCredential) Reset()
func (*VerifiableCredential) Size ¶
func (m *VerifiableCredential) Size() (n int)
func (*VerifiableCredential) String ¶
func (m *VerifiableCredential) String() string
func (*VerifiableCredential) Unmarshal ¶
func (m *VerifiableCredential) Unmarshal(dAtA []byte) error
func (*VerifiableCredential) XXX_DiscardUnknown ¶
func (m *VerifiableCredential) XXX_DiscardUnknown()
func (*VerifiableCredential) XXX_Marshal ¶
func (m *VerifiableCredential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerifiableCredential) XXX_Merge ¶
func (m *VerifiableCredential) XXX_Merge(src proto.Message)
func (*VerifiableCredential) XXX_Size ¶
func (m *VerifiableCredential) XXX_Size() int
func (*VerifiableCredential) XXX_Unmarshal ¶
func (m *VerifiableCredential) XXX_Unmarshal(b []byte) error