mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
(no commit message provided)
This commit is contained in:
committed by
Prad Nukala (aider)
parent
775150830f
commit
e127d70584
+229
-51
@@ -5,18 +5,21 @@ package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/cosmos/cosmos-proto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/cosmos/gogoproto/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
|
||||
_ "github.com/cosmos/cosmos-proto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/cosmos/gogoproto/proto"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
var (
|
||||
_ = proto.Marshal
|
||||
_ = fmt.Errorf
|
||||
_ = math.Inf
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
@@ -40,9 +43,11 @@ func (*DIDDocument) ProtoMessage() {}
|
||||
func (*DIDDocument) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f1c7ebf7d0ca3c72, []int{0}
|
||||
}
|
||||
|
||||
func (m *DIDDocument) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
|
||||
func (m *DIDDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_DIDDocument.Marshal(b, m, deterministic)
|
||||
@@ -55,12 +60,15 @@ func (m *DIDDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
|
||||
func (m *DIDDocument) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DIDDocument.Merge(m, src)
|
||||
}
|
||||
|
||||
func (m *DIDDocument) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
|
||||
func (m *DIDDocument) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DIDDocument.DiscardUnknown(m)
|
||||
}
|
||||
@@ -111,9 +119,12 @@ func (m *DIDDocument) GetCapabilityInvocation() []string {
|
||||
|
||||
// VerificationMethod defines a verification method
|
||||
type VerificationMethod struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
|
||||
PublicKey *PublicKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
|
||||
// The delegation proof or verification method
|
||||
PublicKeyMultibase string `protobuf:"bytes,3,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"`
|
||||
// Public Key JWKS is a map of the associated public keys
|
||||
PublicKeyJwks map[string]string `protobuf:"bytes,4,rep,name=public_key_jwks,json=publicKeyJwks,proto3" json:"public_key_jwks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (m *VerificationMethod) Reset() { *m = VerificationMethod{} }
|
||||
@@ -122,9 +133,11 @@ func (*VerificationMethod) ProtoMessage() {}
|
||||
func (*VerificationMethod) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f1c7ebf7d0ca3c72, []int{1}
|
||||
}
|
||||
|
||||
func (m *VerificationMethod) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
|
||||
func (m *VerificationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_VerificationMethod.Marshal(b, m, deterministic)
|
||||
@@ -137,12 +150,15 @@ func (m *VerificationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte,
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
|
||||
func (m *VerificationMethod) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VerificationMethod.Merge(m, src)
|
||||
}
|
||||
|
||||
func (m *VerificationMethod) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
|
||||
func (m *VerificationMethod) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VerificationMethod.DiscardUnknown(m)
|
||||
}
|
||||
@@ -163,9 +179,16 @@ func (m *VerificationMethod) GetController() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VerificationMethod) GetPublicKey() *PublicKey {
|
||||
func (m *VerificationMethod) GetPublicKeyMultibase() string {
|
||||
if m != nil {
|
||||
return m.PublicKey
|
||||
return m.PublicKeyMultibase
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VerificationMethod) GetPublicKeyJwks() map[string]string {
|
||||
if m != nil {
|
||||
return m.PublicKeyJwks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -173,36 +196,41 @@ func (m *VerificationMethod) GetPublicKey() *PublicKey {
|
||||
func init() {
|
||||
proto.RegisterType((*DIDDocument)(nil), "did.v1.DIDDocument")
|
||||
proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod")
|
||||
proto.RegisterMapType((map[string]string)(nil), "did.v1.VerificationMethod.PublicKeyJwksEntry")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("did/v1/account.proto", fileDescriptor_f1c7ebf7d0ca3c72) }
|
||||
|
||||
var fileDescriptor_f1c7ebf7d0ca3c72 = []byte{
|
||||
// 374 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xb1, 0x8e, 0x9b, 0x40,
|
||||
0x10, 0x86, 0x0d, 0x4e, 0x9c, 0x78, 0x2d, 0x39, 0xc9, 0x86, 0x48, 0xc4, 0x05, 0x42, 0x2e, 0x22,
|
||||
0xd2, 0x40, 0x6c, 0xb7, 0xa9, 0x22, 0x1a, 0x2b, 0xb2, 0x14, 0x51, 0xa4, 0x48, 0x83, 0x60, 0x77,
|
||||
0x03, 0xab, 0x83, 0x1d, 0xc4, 0x2e, 0xdc, 0xf1, 0x16, 0xf7, 0x1a, 0xf7, 0x26, 0x57, 0xba, 0xbc,
|
||||
0xf2, 0x64, 0xbf, 0xc8, 0xc9, 0x80, 0x7d, 0x96, 0xdd, 0x0d, 0xdf, 0xff, 0xcf, 0xcf, 0xec, 0x0c,
|
||||
0x32, 0x28, 0xa7, 0x5e, 0xbd, 0xf0, 0x22, 0x42, 0xa0, 0x12, 0xca, 0x2d, 0x4a, 0x50, 0x80, 0x47,
|
||||
0x94, 0x53, 0xb7, 0x5e, 0xcc, 0xbe, 0x12, 0x90, 0x39, 0xc8, 0xb0, 0xa5, 0x5e, 0xf7, 0xd1, 0x59,
|
||||
0x66, 0x46, 0x02, 0x09, 0x74, 0xfc, 0x50, 0x1d, 0x69, 0x1f, 0x97, 0x30, 0xc1, 0x24, 0xef, 0xbd,
|
||||
0xf3, 0x07, 0x1d, 0x4d, 0xfc, 0xb5, 0xef, 0x03, 0xa9, 0x72, 0x26, 0x14, 0x9e, 0x22, 0x9d, 0x53,
|
||||
0x53, 0xb3, 0x35, 0x67, 0x1c, 0xe8, 0x9c, 0xe2, 0x0d, 0x32, 0x6a, 0x56, 0xf2, 0xff, 0x9c, 0x44,
|
||||
0x8a, 0x83, 0x08, 0x73, 0xa6, 0x52, 0xa0, 0xd2, 0xd4, 0xed, 0xa1, 0x33, 0x59, 0xce, 0xdc, 0x6e,
|
||||
0x1a, 0xf7, 0xef, 0x99, 0x67, 0xd3, 0x5a, 0x82, 0xcf, 0xf5, 0x15, 0x93, 0xf8, 0x1b, 0x9a, 0x46,
|
||||
0x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0x7a,
|
||||
0x87, 0xb1, 0x4f, 0x02, 0x00, 0x00,
|
||||
// 440 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xb1, 0x8e, 0xd3, 0x40,
|
||||
0x10, 0x86, 0x63, 0x87, 0x3b, 0xb8, 0x8d, 0xb8, 0x3b, 0x2d, 0x46, 0x32, 0x29, 0xac, 0x28, 0x05,
|
||||
0x0a, 0x05, 0x36, 0x77, 0xd7, 0x20, 0x44, 0x81, 0x50, 0x28, 0x0e, 0x14, 0x09, 0x45, 0x82, 0x82,
|
||||
0xc6, 0x5a, 0xaf, 0x07, 0x67, 0x89, 0xbd, 0x63, 0x79, 0xd7, 0x0e, 0x7e, 0x0a, 0x78, 0x0d, 0xde,
|
||||
0x84, 0x32, 0x25, 0x25, 0x4a, 0x5e, 0x04, 0xc5, 0x76, 0x82, 0x15, 0xeb, 0xba, 0xdd, 0xef, 0xff,
|
||||
0xe7, 0xdf, 0x9d, 0xd1, 0x10, 0x2b, 0x14, 0xa1, 0x57, 0x5c, 0x79, 0x8c, 0x73, 0xcc, 0xa5, 0x76,
|
||||
0xd3, 0x0c, 0x35, 0xd2, 0xd3, 0x50, 0x84, 0x6e, 0x71, 0x35, 0x7c, 0xc2, 0x51, 0x25, 0xa8, 0xfc,
|
||||
0x8a, 0x7a, 0xf5, 0xa5, 0xb6, 0x0c, 0xad, 0x08, 0x23, 0xac, 0xf9, 0xee, 0xb4, 0xa7, 0x4d, 0x5c,
|
||||
0x04, 0x12, 0x94, 0x68, 0xbc, 0xe3, 0x5f, 0x26, 0x19, 0x4c, 0x6f, 0xa7, 0x53, 0xe4, 0x79, 0x02,
|
||||
0x52, 0xd3, 0x73, 0x62, 0x8a, 0xd0, 0x36, 0x46, 0xc6, 0xe4, 0x6c, 0x6e, 0x8a, 0x90, 0xce, 0x88,
|
||||
0x55, 0x40, 0x26, 0xbe, 0x0a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d4, 0x59, 0x39, 0x7f, 0x98, 0xb6, 0xd9, 0xf0, 0x0d, 0xa1, 0x5d, 0x13, 0xbd, 0x24,
|
||||
0xfd, 0x25, 0x94, 0x4d, 0x3f, 0xbb, 0x23, 0xb5, 0xc8, 0x49, 0xc1, 0xe2, 0x1c, 0x9a, 0x5e, 0xea,
|
||||
0xcb, 0x2b, 0xf3, 0xa5, 0xf1, 0xf6, 0xf5, 0xef, 0x8d, 0x63, 0xac, 0x37, 0x8e, 0xf1, 0x77, 0xe3,
|
||||
0x18, 0x3f, 0xb7, 0x4e, 0x6f, 0xbd, 0x75, 0x7a, 0x7f, 0xb6, 0x4e, 0xef, 0xcb, 0x38, 0x12, 0x7a,
|
||||
0x91, 0x07, 0x2e, 0xc7, 0xc4, 0x43, 0xa9, 0x50, 0x66, 0xde, 0x62, 0xc5, 0x4a, 0xef, 0xbb, 0xb7,
|
||||
0x5b, 0x43, 0x5d, 0xa6, 0xa0, 0x82, 0xd3, 0x6a, 0x05, 0x6f, 0xfe, 0x05, 0x00, 0x00, 0xff, 0xff,
|
||||
0x27, 0xff, 0x98, 0x0b, 0xe9, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *DIDDocument) Marshal() (dAtA []byte, err error) {
|
||||
@@ -305,15 +333,29 @@ func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.PublicKey != nil {
|
||||
{
|
||||
size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintAccount(dAtA, i, uint64(size))
|
||||
if len(m.PublicKeyJwks) > 0 {
|
||||
for k := range m.PublicKeyJwks {
|
||||
v := m.PublicKeyJwks[k]
|
||||
baseI := i
|
||||
i -= len(v)
|
||||
copy(dAtA[i:], v)
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(v)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
i -= len(k)
|
||||
copy(dAtA[i:], k)
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(k)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
i = encodeVarintAccount(dAtA, i, uint64(baseI-i))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
}
|
||||
if len(m.PublicKeyMultibase) > 0 {
|
||||
i -= len(m.PublicKeyMultibase)
|
||||
copy(dAtA[i:], m.PublicKeyMultibase)
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(m.PublicKeyMultibase)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
@@ -345,6 +387,7 @@ func encodeVarintAccount(dAtA []byte, offset int, v uint64) int {
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
|
||||
func (m *DIDDocument) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -402,19 +445,29 @@ func (m *VerificationMethod) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovAccount(uint64(l))
|
||||
}
|
||||
if m.PublicKey != nil {
|
||||
l = m.PublicKey.Size()
|
||||
l = len(m.PublicKeyMultibase)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovAccount(uint64(l))
|
||||
}
|
||||
if len(m.PublicKeyJwks) > 0 {
|
||||
for k, v := range m.PublicKeyJwks {
|
||||
_ = k
|
||||
_ = v
|
||||
mapEntrySize := 1 + len(k) + sovAccount(uint64(len(k))) + 1 + len(v) + sovAccount(uint64(len(v)))
|
||||
n += mapEntrySize + 1 + sovAccount(uint64(mapEntrySize))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovAccount(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
|
||||
func sozAccount(x uint64) (n int) {
|
||||
return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
|
||||
func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
@@ -659,6 +712,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
@@ -754,7 +808,39 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyMultibase", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.PublicKeyMultibase = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyJwks", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@@ -781,12 +867,103 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.PublicKey == nil {
|
||||
m.PublicKey = &PublicKey{}
|
||||
if m.PublicKeyJwks == nil {
|
||||
m.PublicKeyJwks = make(map[string]string)
|
||||
}
|
||||
if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
var mapkey string
|
||||
var mapvalue string
|
||||
for iNdEx < postIndex {
|
||||
entryPreIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
if fieldNum == 1 {
|
||||
var stringLenmapkey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapkey |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapkey := int(stringLenmapkey)
|
||||
if intStringLenmapkey < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
}
|
||||
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||
if postStringIndexmapkey < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
}
|
||||
if postStringIndexmapkey > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
} else if fieldNum == 2 {
|
||||
var stringLenmapvalue uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapvalue |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapvalue := int(stringLenmapvalue)
|
||||
if intStringLenmapvalue < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
}
|
||||
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||
if postStringIndexmapvalue < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
}
|
||||
if postStringIndexmapvalue > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
|
||||
iNdEx = postStringIndexmapvalue
|
||||
} else {
|
||||
iNdEx = entryPreIndex
|
||||
skippy, err := skipAccount(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
}
|
||||
if (iNdEx + skippy) > postIndex {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
m.PublicKeyJwks[mapkey] = mapvalue
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@@ -809,6 +986,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func skipAccount(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
+23
-305
@@ -143,106 +143,37 @@ func (m *Params) GetEncryptionRewardRate() float64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// PublicKey is the struct that represents a public key
|
||||
type PublicKey struct {
|
||||
// Key is the public key
|
||||
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
// Type is the type of the public key
|
||||
KeyType string `protobuf:"bytes,2,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"`
|
||||
// DID is the DID of the public key
|
||||
Did string `protobuf:"bytes,3,opt,name=did,proto3" json:"did,omitempty"`
|
||||
}
|
||||
|
||||
func (m *PublicKey) Reset() { *m = PublicKey{} }
|
||||
func (*PublicKey) ProtoMessage() {}
|
||||
func (*PublicKey) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_fda181cae44f7c00, []int{2}
|
||||
}
|
||||
func (m *PublicKey) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *PublicKey) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PublicKey.Merge(m, src)
|
||||
}
|
||||
func (m *PublicKey) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *PublicKey) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PublicKey.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PublicKey proto.InternalMessageInfo
|
||||
|
||||
func (m *PublicKey) GetKey() []byte {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PublicKey) GetKeyType() string {
|
||||
if m != nil {
|
||||
return m.KeyType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PublicKey) GetDid() string {
|
||||
if m != nil {
|
||||
return m.Did
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*GenesisState)(nil), "did.v1.GenesisState")
|
||||
proto.RegisterType((*Params)(nil), "did.v1.Params")
|
||||
proto.RegisterType((*PublicKey)(nil), "did.v1.PublicKey")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("did/v1/genesis.proto", fileDescriptor_fda181cae44f7c00) }
|
||||
|
||||
var fileDescriptor_fda181cae44f7c00 = []byte{
|
||||
// 420 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xb1, 0x6e, 0x14, 0x31,
|
||||
0x10, 0x86, 0xd7, 0xb9, 0x70, 0x70, 0x26, 0x20, 0xe2, 0x1c, 0xb0, 0xa4, 0xd8, 0x3b, 0x9d, 0x28,
|
||||
0x56, 0x11, 0xac, 0x95, 0x40, 0x15, 0xa5, 0x21, 0x0d, 0x05, 0x05, 0xd1, 0x42, 0x45, 0xb3, 0xf2,
|
||||
0x9d, 0x87, 0x3d, 0x6b, 0xf7, 0xd6, 0x96, 0xed, 0x64, 0xf1, 0x2b, 0x50, 0x21, 0x2a, 0xca, 0x3c,
|
||||
0x42, 0x1e, 0x23, 0x65, 0x4a, 0x2a, 0x84, 0xee, 0x8a, 0x20, 0xf1, 0x12, 0xc8, 0xde, 0x84, 0x20,
|
||||
0xd1, 0x58, 0xe3, 0xff, 0x9b, 0xf9, 0xc7, 0x33, 0xc6, 0x43, 0x2e, 0x38, 0x3d, 0xd9, 0xa5, 0x25,
|
||||
0x34, 0x60, 0x84, 0xc9, 0x94, 0x96, 0x56, 0x92, 0x3e, 0x17, 0x3c, 0x3b, 0xd9, 0xdd, 0x1e, 0x96,
|
||||
0xb2, 0x94, 0x41, 0xa2, 0x3e, 0xea, 0xe8, 0xf6, 0x26, 0x5b, 0x88, 0x46, 0xd2, 0x70, 0x76, 0xd2,
|
||||
0xe4, 0x00, 0x6f, 0xbc, 0xee, 0x1c, 0xde, 0x59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15, 0xd6, 0x29, 0x88, 0xd7, 0xc6, 0x28, 0x1d, 0xe4, 0xb7, 0x2b,
|
||||
0x70, 0xef, 0x9d, 0x02, 0x9f, 0xcc, 0x05, 0x8f, 0x7b, 0x41, 0xf5, 0xe1, 0xfe, 0x53, 0xdf, 0xc4,
|
||||
0x37, 0xb8, 0x17, 0x1a, 0x04, 0xdb, 0x0a, 0xdc, 0xd7, 0xcb, 0xb3, 0x9d, 0x81, 0x77, 0xf9, 0x28,
|
||||
0xa0, 0xe6, 0x87, 0x07, 0xe7, 0xcb, 0x04, 0x5d, 0x2c, 0x13, 0xf4, 0x73, 0x99, 0xa0, 0x2f, 0xab,
|
||||
0x24, 0xba, 0x58, 0x25, 0xd1, 0xf7, 0x55, 0x12, 0x7d, 0x98, 0x94, 0xc2, 0xce, 0x8f, 0xa7, 0xd9,
|
||||
0x4c, 0x2e, 0xa8, 0x6c, 0x8c, 0x6c, 0x34, 0x9d, 0xb7, 0xcc, 0xd1, 0x4f, 0xd4, 0xfb, 0xf9, 0x37,
|
||||
0x98, 0x69, 0x3f, 0x7c, 0xf1, 0x8b, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x1a, 0x3c, 0x3c,
|
||||
0x2b, 0x02, 0x00, 0x00,
|
||||
// 338 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x31, 0x4f, 0x02, 0x31,
|
||||
0x14, 0xc7, 0xaf, 0x82, 0x97, 0x58, 0x8d, 0x09, 0x05, 0xf5, 0xc2, 0x70, 0x10, 0x26, 0x62, 0xf4,
|
||||
0x1a, 0xd0, 0xc9, 0xb0, 0xc8, 0xe2, 0xa8, 0x39, 0x37, 0x97, 0x4b, 0xe1, 0x9a, 0xa3, 0x09, 0xb4,
|
||||
0x97, 0xb6, 0x72, 0xde, 0x57, 0x70, 0x72, 0x74, 0xe4, 0x23, 0xf8, 0x31, 0x18, 0x19, 0x9d, 0x8c,
|
||||
0x81, 0x41, 0x13, 0xbf, 0x84, 0xb9, 0x56, 0xc4, 0xc4, 0xa5, 0xe9, 0xfb, 0xff, 0xde, 0xef, 0x25,
|
||||
0xef, 0xc1, 0x5a, 0xcc, 0x62, 0x3c, 0xed, 0xe0, 0x84, 0x72, 0xaa, 0x98, 0x0a, 0x52, 0x29, 0xb4,
|
||||
0x40, 0x6e, 0xcc, 0xe2, 0x60, 0xda, 0xa9, 0xd7, 0x12, 0x91, 0x08, 0x13, 0xe1, 0xe2, 0x67, 0x69,
|
||||
0xbd, 0x42, 0x26, 0x8c, 0x0b, 0x6c, 0x5e, 0x1b, 0xb5, 0x7a, 0x70, 0xef, 0xca, 0x4e, 0xb8, 0xd5,
|
||||
0x44, 0x53, 0x74, 0x02, 0xdd, 0x94, 0x48, 0x32, 0x51, 0x1e, 0x68, 0x82, 0xf6, 0x6e, 0x77, 0x3f,
|
||||
0xb0, 0x13, 0x83, 0x1b, 0x93, 0xf6, 0xcb, 0xf3, 0xb7, 0x86, 0x13, 0xfe, 0xf4, 0xb4, 0xbe, 0x00,
|
||||
0x74, 0x2d, 0x40, 0xa7, 0x10, 0xa5, 0x52, 0xa4, 0x54, 0xea, 0x3c, 0x22, 0xe3, 0xb1, 0xc8, 0xc6,
|
||||
0x4c, 0x69, 0x6f, 0xab, 0x59, 0x6a, 0xef, 0x84, 0x95, 0x35, 0xb9, 0x5c, 0x03, 0x84, 0x61, 0x35,
|
||||
0x1b, 0x31, 0x4d, 0x8b, 0x82, 0xc6, 0x91, 0x90, 0x2c, 0x61, 0x5c, 0x79, 0x25, 0xd3, 0x8f, 0xfe,
|
||||
0xa0, 0x6b, 0x4b, 0x50, 0x17, 0x1e, 0x10, 0xa5, 0xa8, 0xd4, 0x4c, 0xf0, 0x48, 0xd2, 0x8c, 0xc8,
|
||||
0x38, 0x92, 0x44, 0x53, 0xaf, 0xdc, 0x04, 0x6d, 0x10, 0x56, 0x7f, 0x61, 0x68, 0x58, 0x58, 0x2c,
|
||||
0x73, 0x0e, 0x0f, 0x29, 0x1f, 0xca, 0x3c, 0xfd, 0x27, 0x6d, 0x1b, 0xa9, 0xb6, 0xa1, 0x1b, 0xeb,
|
||||
0xe2, 0xe8, 0x79, 0xd6, 0x70, 0x3e, 0x67, 0x0d, 0xf0, 0xf8, 0xf1, 0x72, 0x0c, 0x8b, 0x33, 0xdb,
|
||||
0x6d, 0xfb, 0xbd, 0xf9, 0xd2, 0x07, 0x8b, 0xa5, 0x0f, 0xde, 0x97, 0x3e, 0x78, 0x5a, 0xf9, 0xce,
|
||||
0x62, 0xe5, 0x3b, 0xaf, 0x2b, 0xdf, 0xb9, 0x6b, 0x25, 0x4c, 0x8f, 0xee, 0x07, 0xc1, 0x50, 0x4c,
|
||||
0xb0, 0xe0, 0x4a, 0x70, 0x89, 0x47, 0x19, 0xc9, 0xf1, 0x03, 0x2e, 0x74, 0x9d, 0xa7, 0x54, 0x0d,
|
||||
0x5c, 0x73, 0xf0, 0xb3, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xc5, 0x76, 0x33, 0xb9, 0x01,
|
||||
0x00, 0x00,
|
||||
}
|
||||
|
||||
func (this *Params) Equal(that interface{}) bool {
|
||||
@@ -374,50 +305,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *PublicKey) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *PublicKey) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *PublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Did) > 0 {
|
||||
i -= len(m.Did)
|
||||
copy(dAtA[i:], m.Did)
|
||||
i = encodeVarintGenesis(dAtA, i, uint64(len(m.Did)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.KeyType) > 0 {
|
||||
i -= len(m.KeyType)
|
||||
copy(dAtA[i:], m.KeyType)
|
||||
i = encodeVarintGenesis(dAtA, i, uint64(len(m.KeyType)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Key) > 0 {
|
||||
i -= len(m.Key)
|
||||
copy(dAtA[i:], m.Key)
|
||||
i = encodeVarintGenesis(dAtA, i, uint64(len(m.Key)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovGenesis(v)
|
||||
base := offset
|
||||
@@ -467,27 +354,6 @@ func (m *Params) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *PublicKey) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Key)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovGenesis(uint64(l))
|
||||
}
|
||||
l = len(m.KeyType)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovGenesis(uint64(l))
|
||||
}
|
||||
l = len(m.Did)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovGenesis(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovGenesis(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
@@ -713,154 +579,6 @@ func (m *Params) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *PublicKey) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenesis
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: PublicKey: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: PublicKey: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenesis
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthGenesis
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGenesis
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.Key == nil {
|
||||
m.Key = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenesis
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGenesis
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGenesis
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.KeyType = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenesis
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGenesis
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGenesis
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Did = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenesis(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthGenesis
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipGenesis(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
+735
-72
@@ -23,6 +23,88 @@ var _ = math.Inf
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave)
|
||||
type Assertion struct {
|
||||
// The unique identifier of the attestation
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// Key type (e.g., "passkey", "ssh", "gpg", "native-secure-enclave")
|
||||
KeyType string `protobuf:"bytes,2,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"`
|
||||
// The value of the linked identifier
|
||||
Credential []byte `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"`
|
||||
// Metadata is optional additional information about the assertion
|
||||
Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// The controller of the attestation
|
||||
Controller string `protobuf:"bytes,5,opt,name=controller,proto3" json:"controller,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Assertion) Reset() { *m = Assertion{} }
|
||||
func (m *Assertion) String() string { return proto.CompactTextString(m) }
|
||||
func (*Assertion) ProtoMessage() {}
|
||||
func (*Assertion) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f44bb702879c34b4, []int{0}
|
||||
}
|
||||
func (m *Assertion) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *Assertion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_Assertion.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *Assertion) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Assertion.Merge(m, src)
|
||||
}
|
||||
func (m *Assertion) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *Assertion) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Assertion.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Assertion proto.InternalMessageInfo
|
||||
|
||||
func (m *Assertion) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Assertion) GetKeyType() string {
|
||||
if m != nil {
|
||||
return m.KeyType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Assertion) GetCredential() []byte {
|
||||
if m != nil {
|
||||
return m.Credential
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Assertion) GetMetadata() map[string]string {
|
||||
if m != nil {
|
||||
return m.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Assertion) GetController() string {
|
||||
if m != nil {
|
||||
return m.Controller
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Attestation represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone)
|
||||
type Attestation struct {
|
||||
// The unique identifier of the attestation
|
||||
@@ -41,7 +123,7 @@ func (m *Attestation) Reset() { *m = Attestation{} }
|
||||
func (m *Attestation) String() string { return proto.CompactTextString(m) }
|
||||
func (*Attestation) ProtoMessage() {}
|
||||
func (*Attestation) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f44bb702879c34b4, []int{0}
|
||||
return fileDescriptor_f44bb702879c34b4, []int{1}
|
||||
}
|
||||
func (m *Attestation) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -112,7 +194,7 @@ type Controller struct {
|
||||
// The DID of the controller
|
||||
Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"`
|
||||
// The public key of the controller
|
||||
PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
|
||||
PublicKeyMultibase string `protobuf:"bytes,3,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"`
|
||||
// The vault address or identifier
|
||||
VaultCid string `protobuf:"bytes,4,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"`
|
||||
// Fingerprint is the Accumulator of discrete credential identifiers
|
||||
@@ -123,7 +205,7 @@ func (m *Controller) Reset() { *m = Controller{} }
|
||||
func (m *Controller) String() string { return proto.CompactTextString(m) }
|
||||
func (*Controller) ProtoMessage() {}
|
||||
func (*Controller) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f44bb702879c34b4, []int{1}
|
||||
return fileDescriptor_f44bb702879c34b4, []int{2}
|
||||
}
|
||||
func (m *Controller) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -166,11 +248,11 @@ func (m *Controller) GetDid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Controller) GetPublicKey() []byte {
|
||||
func (m *Controller) GetPublicKeyMultibase() string {
|
||||
if m != nil {
|
||||
return m.PublicKey
|
||||
return m.PublicKeyMultibase
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Controller) GetVaultCid() string {
|
||||
@@ -200,16 +282,18 @@ type Delegation struct {
|
||||
// The controller DID
|
||||
ControllerDid string `protobuf:"bytes,5,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"`
|
||||
// The delegation proof or verification method
|
||||
PublicKey []byte `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
|
||||
PublicKeyMultibase string `protobuf:"bytes,6,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"`
|
||||
// Public Key JWKS is a map of the associated public keys
|
||||
PublicKeyJwks map[string]string `protobuf:"bytes,7,rep,name=public_key_jwks,json=publicKeyJwks,proto3" json:"public_key_jwks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// IBC Channel ID
|
||||
ChannelId uint64 `protobuf:"varint,7,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
|
||||
ChannelId uint64 `protobuf:"varint,8,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Delegation) Reset() { *m = Delegation{} }
|
||||
func (m *Delegation) String() string { return proto.CompactTextString(m) }
|
||||
func (*Delegation) ProtoMessage() {}
|
||||
func (*Delegation) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f44bb702879c34b4, []int{2}
|
||||
return fileDescriptor_f44bb702879c34b4, []int{3}
|
||||
}
|
||||
func (m *Delegation) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -273,9 +357,16 @@ func (m *Delegation) GetControllerDid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Delegation) GetPublicKey() []byte {
|
||||
func (m *Delegation) GetPublicKeyMultibase() string {
|
||||
if m != nil {
|
||||
return m.PublicKey
|
||||
return m.PublicKeyMultibase
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Delegation) GetPublicKeyJwks() map[string]string {
|
||||
if m != nil {
|
||||
return m.PublicKeyJwks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -303,7 +394,7 @@ func (m *Service) Reset() { *m = Service{} }
|
||||
func (m *Service) String() string { return proto.CompactTextString(m) }
|
||||
func (*Service) ProtoMessage() {}
|
||||
func (*Service) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f44bb702879c34b4, []int{3}
|
||||
return fileDescriptor_f44bb702879c34b4, []int{4}
|
||||
}
|
||||
func (m *Service) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -361,46 +452,128 @@ func (m *Service) GetControllerDid() string {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Assertion)(nil), "did.v1.Assertion")
|
||||
proto.RegisterMapType((map[string]string)(nil), "did.v1.Assertion.MetadataEntry")
|
||||
proto.RegisterType((*Attestation)(nil), "did.v1.Attestation")
|
||||
proto.RegisterType((*Controller)(nil), "did.v1.Controller")
|
||||
proto.RegisterType((*Delegation)(nil), "did.v1.Delegation")
|
||||
proto.RegisterMapType((map[string]string)(nil), "did.v1.Delegation.PublicKeyJwksEntry")
|
||||
proto.RegisterType((*Service)(nil), "did.v1.Service")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) }
|
||||
|
||||
var fileDescriptor_f44bb702879c34b4 = []byte{
|
||||
// 475 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0x3f, 0x6f, 0xd3, 0x40,
|
||||
0x18, 0xc6, 0x7b, 0x89, 0x9b, 0x3f, 0x6f, 0xd2, 0x50, 0x9d, 0x2a, 0x61, 0x8a, 0xb0, 0x82, 0x11,
|
||||
0x52, 0x59, 0x62, 0x55, 0x6c, 0x88, 0xa5, 0xb4, 0x0c, 0x88, 0x2d, 0x30, 0xb1, 0x58, 0x8e, 0xef,
|
||||
0x6d, 0x72, 0x8a, 0x73, 0x67, 0xdd, 0x5d, 0x0c, 0xfe, 0x12, 0x88, 0x81, 0x11, 0xf5, 0xf3, 0x30,
|
||||
0x56, 0x62, 0x61, 0x44, 0xc9, 0xc0, 0xce, 0x27, 0x40, 0xbe, 0x33, 0x34, 0x4a, 0xb2, 0xf9, 0x7e,
|
||||
0xef, 0xd9, 0xf7, 0x7b, 0x1e, 0xf9, 0x80, 0x32, 0xce, 0xa2, 0xe2, 0x3c, 0xd2, 0x26, 0x31, 0x38,
|
||||
0xca, 0x95, 0x34, 0x92, 0xb6, 0x18, 0x67, 0xa3, 0xe2, 0xfc, 0xf4, 0x7e, 0x2a, 0xf5, 0x42, 0xea,
|
||||
0x48, 0xaa, 0x45, 0xb5, 0x45, 0xaa, 0x85, 0xdb, 0x70, 0x7a, 0x52, 0xbf, 0x34, 0x45, 0x81, 0x9a,
|
||||
0x6b, 0x47, 0xc3, 0xaf, 0x04, 0x7a, 0x17, 0xc6, 0x60, 0xf5, 0x29, 0x2e, 0x05, 0x1d, 0x40, 0x83,
|
||||
0x33, 0x9f, 0x0c, 0xc9, 0x59, 0x77, 0xdc, 0xe0, 0x8c, 0x3e, 0x80, 0xce, 0x1c, 0xcb, 0xd8, 0x94,
|
||||
0x39, 0xfa, 0x0d, 0x4b, 0xdb, 0x73, 0x2c, 0xdf, 0x97, 0x39, 0xd2, 0x13, 0x38, 0x2c, 0x92, 0x6c,
|
||||
0x89, 0x7e, 0xd3, 0x72, 0xb7, 0xa8, 0x68, 0xae, 0xa4, 0xbc, 0xf6, 0x3d, 0x47, 0xed, 0x82, 0x06,
|
||||
0x00, 0xa9, 0x14, 0x46, 0xc9, 0x2c, 0x43, 0xe5, 0x1f, 0xda, 0xd1, 0x06, 0x79, 0x31, 0xf8, 0x73,
|
||||
0xf3, 0xe3, 0x73, 0xb3, 0x03, 0x9e, 0x3b, 0x3e, 0xfc, 0x46, 0x00, 0x2e, 0xff, 0x8f, 0x77, 0xac,
|
||||
0x8e, 0xa1, 0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0xe7, 0xed, 0x89, 0xb7, 0x25, 0xe8, 0xbd, 0x7a, 0xf9, 0x7d, 0x15, 0x90, 0xdb, 0x55, 0x40, 0x7e,
|
||||
0xad, 0x02, 0xf2, 0x65, 0x1d, 0x1c, 0xdc, 0xae, 0x83, 0x83, 0x9f, 0xeb, 0xe0, 0xe0, 0x43, 0x38,
|
||||
0xe5, 0x66, 0xb6, 0x9c, 0x8c, 0x52, 0xb9, 0x88, 0xa4, 0xd0, 0x52, 0xa8, 0x68, 0xf6, 0x31, 0x29,
|
||||
0xa3, 0x4f, 0x51, 0x75, 0x13, 0x2a, 0x63, 0x3d, 0x69, 0xd9, 0x5b, 0xf0, 0xfc, 0x6f, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0xa0, 0x45, 0x5a, 0xc7, 0x52, 0x03, 0x00, 0x00,
|
||||
// 618 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xc1, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0x86, 0xeb, 0x38, 0x6d, 0x93, 0x49, 0xd2, 0x56, 0xab, 0x4a, 0x98, 0x20, 0x4c, 0x08, 0xaa,
|
||||
0x14, 0x2e, 0x36, 0x85, 0x0b, 0x6a, 0x39, 0x50, 0xda, 0x1e, 0x00, 0x55, 0x42, 0x81, 0x13, 0x97,
|
||||
0xc8, 0xf1, 0x6e, 0xd3, 0x25, 0xf6, 0xae, 0xb5, 0xbb, 0x49, 0xf1, 0x8d, 0x3b, 0x12, 0xe2, 0xc0,
|
||||
0xb9, 0xaf, 0xc0, 0x6b, 0x70, 0xac, 0xc4, 0x85, 0x23, 0x6a, 0xdf, 0x80, 0x27, 0x40, 0xde, 0xb5,
|
||||
0x53, 0xd3, 0x14, 0x10, 0xe2, 0x66, 0x7f, 0x33, 0xe3, 0xf9, 0xe7, 0x9f, 0x91, 0x01, 0x61, 0x8a,
|
||||
0xfd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
|
||||
func (m *Assertion) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *Assertion) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *Assertion) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Controller) > 0 {
|
||||
i -= len(m.Controller)
|
||||
copy(dAtA[i:], m.Controller)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Controller)))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if len(m.Metadata) > 0 {
|
||||
for k := range m.Metadata {
|
||||
v := m.Metadata[k]
|
||||
baseI := i
|
||||
i -= len(v)
|
||||
copy(dAtA[i:], v)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(v)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
i -= len(k)
|
||||
copy(dAtA[i:], k)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(k)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
i = encodeVarintState(dAtA, i, uint64(baseI-i))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
}
|
||||
if len(m.Credential) > 0 {
|
||||
i -= len(m.Credential)
|
||||
copy(dAtA[i:], m.Credential)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Credential)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.KeyType) > 0 {
|
||||
i -= len(m.KeyType)
|
||||
copy(dAtA[i:], m.KeyType)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.KeyType)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Id) > 0 {
|
||||
i -= len(m.Id)
|
||||
copy(dAtA[i:], m.Id)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Id)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *Attestation) Marshal() (dAtA []byte, err error) {
|
||||
@@ -495,10 +668,10 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(m.PublicKey) > 0 {
|
||||
i -= len(m.PublicKey)
|
||||
copy(dAtA[i:], m.PublicKey)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.PublicKey)))
|
||||
if len(m.PublicKeyMultibase) > 0 {
|
||||
i -= len(m.PublicKeyMultibase)
|
||||
copy(dAtA[i:], m.PublicKeyMultibase)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.PublicKeyMultibase)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
@@ -542,12 +715,31 @@ func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
if m.ChannelId != 0 {
|
||||
i = encodeVarintState(dAtA, i, uint64(m.ChannelId))
|
||||
i--
|
||||
dAtA[i] = 0x38
|
||||
dAtA[i] = 0x40
|
||||
}
|
||||
if len(m.PublicKey) > 0 {
|
||||
i -= len(m.PublicKey)
|
||||
copy(dAtA[i:], m.PublicKey)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.PublicKey)))
|
||||
if len(m.PublicKeyJwks) > 0 {
|
||||
for k := range m.PublicKeyJwks {
|
||||
v := m.PublicKeyJwks[k]
|
||||
baseI := i
|
||||
i -= len(v)
|
||||
copy(dAtA[i:], v)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(v)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
i -= len(k)
|
||||
copy(dAtA[i:], k)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(k)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
i = encodeVarintState(dAtA, i, uint64(baseI-i))
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
}
|
||||
if len(m.PublicKeyMultibase) > 0 {
|
||||
i -= len(m.PublicKeyMultibase)
|
||||
copy(dAtA[i:], m.PublicKeyMultibase)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.PublicKeyMultibase)))
|
||||
i--
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
@@ -651,6 +843,39 @@ func encodeVarintState(dAtA []byte, offset int, v uint64) int {
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *Assertion) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Id)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
l = len(m.KeyType)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
l = len(m.Credential)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
if len(m.Metadata) > 0 {
|
||||
for k, v := range m.Metadata {
|
||||
_ = k
|
||||
_ = v
|
||||
mapEntrySize := 1 + len(k) + sovState(uint64(len(k))) + 1 + len(v) + sovState(uint64(len(v)))
|
||||
n += mapEntrySize + 1 + sovState(uint64(mapEntrySize))
|
||||
}
|
||||
}
|
||||
l = len(m.Controller)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *Attestation) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -694,7 +919,7 @@ func (m *Controller) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
l = len(m.PublicKey)
|
||||
l = len(m.PublicKeyMultibase)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
@@ -735,10 +960,18 @@ func (m *Delegation) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
l = len(m.PublicKey)
|
||||
l = len(m.PublicKeyMultibase)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
if len(m.PublicKeyJwks) > 0 {
|
||||
for k, v := range m.PublicKeyJwks {
|
||||
_ = k
|
||||
_ = v
|
||||
mapEntrySize := 1 + len(k) + sovState(uint64(len(k))) + 1 + len(v) + sovState(uint64(len(v)))
|
||||
n += mapEntrySize + 1 + sovState(uint64(mapEntrySize))
|
||||
}
|
||||
}
|
||||
if m.ChannelId != 0 {
|
||||
n += 1 + sovState(uint64(m.ChannelId))
|
||||
}
|
||||
@@ -776,6 +1009,313 @@ func sovState(x uint64) (n int) {
|
||||
func sozState(x uint64) (n int) {
|
||||
return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *Assertion) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: Assertion: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: Assertion: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Id = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.KeyType = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Credential", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Credential = append(m.Credential[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.Credential == nil {
|
||||
m.Credential = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Metadata == nil {
|
||||
m.Metadata = make(map[string]string)
|
||||
}
|
||||
var mapkey string
|
||||
var mapvalue string
|
||||
for iNdEx < postIndex {
|
||||
entryPreIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
if fieldNum == 1 {
|
||||
var stringLenmapkey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapkey |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapkey := int(stringLenmapkey)
|
||||
if intStringLenmapkey < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||
if postStringIndexmapkey < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postStringIndexmapkey > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
} else if fieldNum == 2 {
|
||||
var stringLenmapvalue uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapvalue |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapvalue := int(stringLenmapvalue)
|
||||
if intStringLenmapvalue < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||
if postStringIndexmapvalue < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postStringIndexmapvalue > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
|
||||
iNdEx = postStringIndexmapvalue
|
||||
} else {
|
||||
iNdEx = entryPreIndex
|
||||
skippy, err := skipState(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if (iNdEx + skippy) > postIndex {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
m.Metadata[mapkey] = mapvalue
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Controller = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipState(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *Attestation) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
@@ -1081,9 +1621,9 @@ func (m *Controller) Unmarshal(dAtA []byte) error {
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyMultibase", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
@@ -1093,25 +1633,23 @@ func (m *Controller) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.PublicKey == nil {
|
||||
m.PublicKey = []byte{}
|
||||
}
|
||||
m.PublicKeyMultibase = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
@@ -1391,9 +1929,9 @@ func (m *Delegation) Unmarshal(dAtA []byte) error {
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyMultibase", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
@@ -1403,27 +1941,152 @@ func (m *Delegation) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.PublicKey == nil {
|
||||
m.PublicKey = []byte{}
|
||||
}
|
||||
m.PublicKeyMultibase = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 7:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyJwks", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.PublicKeyJwks == nil {
|
||||
m.PublicKeyJwks = make(map[string]string)
|
||||
}
|
||||
var mapkey string
|
||||
var mapvalue string
|
||||
for iNdEx < postIndex {
|
||||
entryPreIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
if fieldNum == 1 {
|
||||
var stringLenmapkey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapkey |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapkey := int(stringLenmapkey)
|
||||
if intStringLenmapkey < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||
if postStringIndexmapkey < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postStringIndexmapkey > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
} else if fieldNum == 2 {
|
||||
var stringLenmapvalue uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapvalue |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapvalue := int(stringLenmapvalue)
|
||||
if intStringLenmapvalue < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||
if postStringIndexmapvalue < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postStringIndexmapvalue > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
|
||||
iNdEx = postStringIndexmapvalue
|
||||
} else {
|
||||
iNdEx = entryPreIndex
|
||||
skippy, err := skipState(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if (iNdEx + skippy) > postIndex {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
m.PublicKeyJwks[mapkey] = mapvalue
|
||||
iNdEx = postIndex
|
||||
case 8:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user