mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
(no commit message provided)
This commit is contained in:
committed by
Prad Nukala (aider)
parent
9b93e39a30
commit
ae35fcee58
@@ -3,7 +3,6 @@ package keeper
|
||||
import (
|
||||
"context"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
|
||||
"cosmossdk.io/errors"
|
||||
@@ -21,12 +20,6 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer {
|
||||
return &msgServer{k: keeper}
|
||||
}
|
||||
|
||||
// InitializeController implements types.MsgServer.
|
||||
func (ms msgServer) InitializeController(goCtx context.Context, msg *types.MsgInitializeController) (*types.MsgInitializeControllerResponse, error) {
|
||||
_ = sdk.UnwrapSDKContext(goCtx)
|
||||
return &types.MsgInitializeControllerResponse{}, nil
|
||||
}
|
||||
|
||||
// UpdateParams updates the x/did module parameters.
|
||||
func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
|
||||
if ms.k.authority != msg.Authority {
|
||||
@@ -42,3 +35,10 @@ func (ms msgServer) AuthenticateController(ctx context.Context, msg *types.MsgAu
|
||||
panic("AuthenticateController is unimplemented")
|
||||
return &types.MsgAuthenticateControllerResponse{}, nil
|
||||
}
|
||||
|
||||
// RegisterController implements types.MsgServer.
|
||||
func (ms msgServer) RegisterController(ctx context.Context, msg *types.MsgInitializeController) (*types.MsgInitializeControllerResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
panic("RegisterController is unimplemented")
|
||||
return &types.MsgInitializeControllerResponse{}, nil
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"crypto/hmac"
|
||||
"crypto/sha512"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"math/big"
|
||||
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
)
|
||||
|
||||
// ComputePublicKey computes the public key of a child key given the extended public key, chain code, and index.
|
||||
func ComputePublicKey(extPubKey []byte, chainCode uint32, index int) ([]byte, error) {
|
||||
// Check if the index is a hardened child key
|
||||
if chainCode&0x80000000 != 0 && index < 0 {
|
||||
return nil, errors.New("invalid index")
|
||||
}
|
||||
|
||||
// Serialize the public key
|
||||
pubKey, err := btcec.ParsePubKey(extPubKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pubKeyBytes := pubKey.SerializeCompressed()
|
||||
|
||||
// Serialize the index
|
||||
indexBytes := make([]byte, 4)
|
||||
binary.BigEndian.PutUint32(indexBytes, uint32(index))
|
||||
|
||||
// Compute the HMAC-SHA512
|
||||
mac := hmac.New(sha512.New, []byte{byte(chainCode)})
|
||||
mac.Write(pubKeyBytes)
|
||||
mac.Write(indexBytes)
|
||||
I := mac.Sum(nil)
|
||||
|
||||
// Split I into two 32-byte sequences
|
||||
IL := I[:32]
|
||||
|
||||
// Convert IL to a big integer
|
||||
ilNum := new(big.Int).SetBytes(IL)
|
||||
|
||||
// Check if parse256(IL) >= n
|
||||
curve := btcec.S256()
|
||||
if ilNum.Cmp(curve.N) >= 0 {
|
||||
return nil, errors.New("invalid child key")
|
||||
}
|
||||
|
||||
// Compute the child public key
|
||||
ilx, ily := curve.ScalarBaseMult(IL)
|
||||
childX, childY := curve.Add(ilx, ily, pubKey.X(), pubKey.Y())
|
||||
lx := newBigIntFieldVal(childX)
|
||||
ly := newBigIntFieldVal(childY)
|
||||
|
||||
// Create the child public key
|
||||
childPubKey := btcec.NewPublicKey(lx, ly)
|
||||
childPubKeyBytes := childPubKey.SerializeCompressed()
|
||||
return childPubKeyBytes, nil
|
||||
}
|
||||
|
||||
// newBigIntFieldVal creates a new field value from a big integer.
|
||||
func newBigIntFieldVal(val *big.Int) *btcec.FieldVal {
|
||||
lx := new(btcec.FieldVal)
|
||||
lx.SetByteSlice(val.Bytes())
|
||||
return lx
|
||||
}
|
||||
+1
-12
@@ -25,18 +25,7 @@ func (gs GenesisState) Validate() error {
|
||||
|
||||
// DefaultParams returns default module parameters.
|
||||
func DefaultParams() Params {
|
||||
return Params{
|
||||
PropertyAllowlist: []string{
|
||||
"email",
|
||||
"phone",
|
||||
},
|
||||
AssertionRewardRate: 0.35,
|
||||
EncryptionRewardRate: 0.5,
|
||||
WhitelistedOrigins: []string{
|
||||
"sonr.local",
|
||||
"sonr.id",
|
||||
},
|
||||
}
|
||||
return Params{}
|
||||
}
|
||||
|
||||
// Stringer method for Params.
|
||||
|
||||
+2234
-154
File diff suppressed because it is too large
Load Diff
+39
-4
@@ -1,15 +1,19 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
"math/big"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
"github.com/onsonr/crypto/core/curves"
|
||||
"github.com/onsonr/crypto/signatures/ecdsa"
|
||||
"golang.org/x/crypto/sha3"
|
||||
|
||||
ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1"
|
||||
)
|
||||
|
||||
var (
|
||||
// ParamsKey saves the current module params.
|
||||
ParamsKey = collections.NewPrefix(0)
|
||||
)
|
||||
// ParamsKey saves the current module params.
|
||||
var ParamsKey = collections.NewPrefix(0)
|
||||
|
||||
const (
|
||||
ModuleName = "did"
|
||||
@@ -25,3 +29,34 @@ var ORMModuleSchema = ormv1alpha1.ModuleSchemaDescriptor{
|
||||
},
|
||||
Prefix: []byte{0},
|
||||
}
|
||||
|
||||
// VerifySignature verifies the signature of a message
|
||||
func VerifySignature(key []byte, msg []byte, sig []byte) bool {
|
||||
pp, err := BuildEcPoint(key)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
sigEd, err := ecdsa.DeserializeSecp256k1Signature(sig)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
hash := sha3.New256()
|
||||
_, err = hash.Write(msg)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
digest := hash.Sum(nil)
|
||||
return curves.VerifyEcdsa(pp, digest[:], sigEd)
|
||||
}
|
||||
|
||||
// BuildEcPoint builds an elliptic curve point from a compressed byte slice
|
||||
func BuildEcPoint(pubKey []byte) (*curves.EcPoint, error) {
|
||||
crv := curves.K256()
|
||||
x := new(big.Int).SetBytes(pubKey[1:33])
|
||||
y := new(big.Int).SetBytes(pubKey[33:])
|
||||
ecCurve, err := crv.ToEllipticCurve()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error converting curve: %v", err)
|
||||
}
|
||||
return &curves.EcPoint{X: x, Y: y, Curve: ecCurve}, nil
|
||||
}
|
||||
|
||||
+44
-43
@@ -547,49 +547,50 @@ func init() {
|
||||
func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) }
|
||||
|
||||
var fileDescriptor_f44bb702879c34b4 = []byte{
|
||||
// 672 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xbf, 0x6e, 0x13, 0x4f,
|
||||
0x10, 0xc7, 0x73, 0x3e, 0xff, 0x1d, 0xdb, 0x49, 0xb4, 0x8a, 0x7e, 0xbf, 0xc3, 0x08, 0x63, 0x8c,
|
||||
0x22, 0x85, 0xc6, 0x47, 0xa0, 0x41, 0x09, 0x05, 0x26, 0x49, 0x01, 0x28, 0x12, 0x32, 0x54, 0x34,
|
||||
0xd6, 0xfa, 0x76, 0x63, 0x2f, 0x3e, 0xef, 0x9e, 0x76, 0xd7, 0x4e, 0xae, 0xa3, 0x47, 0x42, 0x14,
|
||||
0x34, 0x34, 0x79, 0x05, 0x5e, 0x83, 0x32, 0x12, 0x0d, 0x25, 0x4a, 0xde, 0x80, 0x27, 0x40, 0x77,
|
||||
0x7b, 0x8e, 0x8f, 0x73, 0x00, 0x21, 0x3a, 0xef, 0x77, 0x76, 0x3c, 0x9f, 0xf9, 0xce, 0xdc, 0x02,
|
||||
0x22, 0x8c, 0xb8, 0xb3, 0x6d, 0x57, 0x69, 0xac, 0x69, 0x27, 0x90, 0x42, 0x0b, 0x54, 0x24, 0x8c,
|
||||
0x74, 0x66, 0xdb, 0x8d, 0xff, 0x3d, 0xa1, 0x26, 0x42, 0xb9, 0x42, 0x4e, 0xa2, 0x2b, 0x42, 0x4e,
|
||||
0xcc, 0x85, 0xc6, 0x46, 0x92, 0x34, 0xa4, 0x9c, 0x2a, 0xa6, 0x8c, 0xda, 0xfe, 0x68, 0x41, 0xa9,
|
||||
0xeb, 0x33, 0xac, 0xa8, 0x42, 0xab, 0x90, 0x63, 0xc4, 0xb1, 0x5a, 0xd6, 0x56, 0xa5, 0x97, 0x63,
|
||||
0x04, 0xfd, 0x07, 0x45, 0x21, 0xd9, 0x90, 0x71, 0x27, 0x17, 0x6b, 0xc9, 0x29, 0xd2, 0x47, 0x98,
|
||||
0x13, 0x9f, 0x3a, 0xb6, 0xd1, 0xcd, 0x09, 0x35, 0x01, 0x3c, 0xc1, 0xb5, 0x14, 0xbe, 0x4f, 0xa5,
|
||||
0x93, 0x8f, 0x63, 0x29, 0x25, 0x8a, 0xd3, 0x93, 0x80, 0x49, 0xac, 0x99, 0xe0, 0x4e, 0xa1, 0x65,
|
||||
0x6d, 0xe5, 0x7b, 0x29, 0x65, 0x67, 0xf5, 0xfb, 0xe9, 0x97, 0x77, 0x76, 0x19, 0xf2, 0x86, 0xa3,
|
||||
0xfd, 0x26, 0x07, 0x95, 0xae, 0x52, 0x54, 0x46, 0xd1, 0x25, 0xba, 0x6b, 0x50, 0x1e, 0xd3, 0xb0,
|
||||
0xaf, 0xc3, 0x80, 0x26, 0x7c, 0xa5, 0x31, 0x0d, 0x5f, 0x86, 0x81, 0x01, 0x91, 0x94, 0x50, 0xae,
|
||||
0x19, 0xf6, 0x63, 0xc8, 0x5a, 0x2f, 0xa5, 0xa0, 0x5d, 0x28, 0x4f, 0xa8, 0xc6, 0x04, 0x6b, 0xec,
|
||||
0xe4, 0x5b, 0xf6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99, 0xf8, 0x06, 0x80, 0x37, 0xc2, 0x8c, 0x1b, 0x6f, 0x0d, 0x67, 0x25, 0x56, 0x62, 0x77,
|
||||
0x6f, 0x43, 0xdd, 0x84, 0x31, 0x21, 0x92, 0x2a, 0x95, 0x20, 0xd6, 0x62, 0xb1, 0x6b, 0x34, 0xb4,
|
||||
0x09, 0xab, 0x0b, 0x13, 0xfb, 0x51, 0x01, 0x63, 0x6d, 0x7d, 0xa1, 0xee, 0xff, 0xc6, 0x9c, 0xe2,
|
||||
0x2f, 0xcd, 0x39, 0x84, 0xb5, 0x54, 0xc6, 0xeb, 0xe3, 0xb1, 0x72, 0x4a, 0xf1, 0x1e, 0x6f, 0xce,
|
||||
0xf7, 0x78, 0xd1, 0x6b, 0xe7, 0xf9, 0x3c, 0xff, 0xe9, 0xf1, 0x58, 0x99, 0x6d, 0xae, 0x07, 0x69,
|
||||
0x2d, 0xe9, 0x95, 0x73, 0xea, 0xf7, 0x19, 0x71, 0xca, 0xf1, 0x87, 0x59, 0x49, 0x94, 0x27, 0xa4,
|
||||
0xf1, 0x08, 0xd0, 0xf2, 0x7f, 0xfc, 0xc3, 0x5a, 0x17, 0xda, 0xa7, 0x16, 0x94, 0x5e, 0x50, 0x39,
|
||||
0x63, 0x1e, 0x5d, 0x1a, 0xc5, 0x2d, 0xa8, 0x29, 0x13, 0x4a, 0xaf, 0x75, 0x35, 0xd1, 0x62, 0xf3,
|
||||
0xef, 0xc0, 0xfa, 0xfc, 0x0a, 0xe5, 0x24, 0x10, 0xd1, 0x0e, 0x98, 0x09, 0xad, 0x25, 0xfa, 0x41,
|
||||
0x22, 0x5f, 0x31, 0x82, 0xfc, 0x15, 0x23, 0xc8, 0x00, 0x16, 0x1f, 0x3f, 0xfc, 0x7c, 0xde, 0xb4,
|
||||
0xce, 0xce, 0x9b, 0xd6, 0xb7, 0xf3, 0xa6, 0xf5, 0xfe, 0xa2, 0xb9, 0x72, 0x76, 0xd1, 0x5c, 0xf9,
|
||||
0x7a, 0xd1, 0x5c, 0x79, 0xd5, 0x1e, 0x32, 0x3d, 0x9a, 0x0e, 0x3a, 0x9e, 0x98, 0xb8, 0x82, 0x2b,
|
||||
0xc1, 0xa5, 0x3b, 0x3a, 0xc6, 0xa1, 0x7b, 0xe2, 0x46, 0xef, 0x6b, 0x44, 0xac, 0x06, 0xc5, 0xf8,
|
||||
0x6d, 0xbd, 0xff, 0x23, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x24, 0xdd, 0x73, 0xa8, 0x05, 0x00, 0x00,
|
||||
// 685 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x3f, 0x6f, 0x13, 0x4d,
|
||||
0x10, 0xc6, 0x73, 0x3e, 0xff, 0x1d, 0xdb, 0x89, 0xb5, 0x8a, 0xf2, 0xde, 0x6b, 0xc0, 0x18, 0xa3,
|
||||
0x48, 0xa1, 0xb1, 0x09, 0x34, 0x28, 0xa1, 0xc0, 0x24, 0x29, 0x00, 0x45, 0x42, 0x86, 0x8a, 0xc6,
|
||||
0x5a, 0x7b, 0x37, 0xf6, 0xe2, 0xf3, 0xee, 0x69, 0x77, 0xed, 0xe4, 0x3a, 0x7a, 0x24, 0x44, 0x41,
|
||||
0x9d, 0x96, 0x92, 0xaf, 0x41, 0x19, 0x89, 0x86, 0x12, 0x25, 0xdf, 0x80, 0x4f, 0x80, 0xf6, 0xf6,
|
||||
0x1c, 0x1f, 0x76, 0x00, 0x21, 0xba, 0xec, 0x33, 0x33, 0x99, 0xdf, 0x3c, 0x33, 0x3e, 0x40, 0x84,
|
||||
0x91, 0xd6, 0x74, 0xbb, 0xa5, 0x34, 0xd6, 0xb4, 0x19, 0x48, 0xa1, 0x05, 0xca, 0x12, 0x46, 0x9a,
|
||||
0xd3, 0xed, 0xea, 0x7f, 0x7d, 0xa1, 0xc6, 0x42, 0xb5, 0x84, 0x1c, 0x9b, 0x14, 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0b, 0x91, 0x12, 0xb9, 0x7b, 0x1b, 0xca, 0x36,
|
||||
0x8c, 0x09, 0x91, 0x54, 0xa9, 0x18, 0xb1, 0x14, 0x89, 0x6d, 0xab, 0xa1, 0x4d, 0x58, 0x9d, 0x9b,
|
||||
0xd8, 0x35, 0x0d, 0xac, 0xb5, 0xe5, 0xb9, 0xba, 0xff, 0x1b, 0x73, 0xb2, 0xbf, 0x34, 0xe7, 0x10,
|
||||
0xd6, 0x12, 0x15, 0xaf, 0x8f, 0x47, 0xca, 0xcb, 0x45, 0x77, 0xbc, 0x39, 0xbb, 0xe3, 0xf9, 0xac,
|
||||
0xcd, 0xe7, 0xb3, 0xfa, 0xa7, 0xc7, 0x23, 0x65, 0xaf, 0xb9, 0x1c, 0x24, 0xb5, 0x78, 0x56, 0xce,
|
||||
0xa9, 0xdf, 0x65, 0xc4, 0xcb, 0x47, 0x3f, 0xd3, 0x42, 0xac, 0x3c, 0x21, 0xd5, 0x47, 0x80, 0x96,
|
||||
0xff, 0xc7, 0x3f, 0x9c, 0x75, 0xa6, 0x71, 0xea, 0x40, 0xee, 0x05, 0x95, 0x53, 0xd6, 0xa7, 0x4b,
|
||||
0xab, 0xb8, 0x05, 0x25, 0x65, 0x43, 0xc9, 0xb3, 0x2e, 0xc6, 0x5a, 0x64, 0xfe, 0x1d, 0xa8, 0xcc,
|
||||
0x52, 0x28, 0x27, 0x81, 0x30, 0x37, 0x60, 0x37, 0xb4, 0x16, 0xeb, 0x07, 0xb1, 0x7c, 0xc5, 0x0a,
|
||||
0xd2, 0x57, 0xac, 0x60, 0x01, 0x30, 0xfb, 0xf8, 0xe1, 0xe7, 0xf3, 0x9a, 0x73, 0x76, 0x5e, 0x73,
|
||||
0xbe, 0x9d, 0xd7, 0x9c, 0xf7, 0x17, 0xb5, 0x95, 0xb3, 0x8b, 0xda, 0xca, 0xd7, 0x8b, 0xda, 0xca,
|
||||
0xab, 0xc6, 0x80, 0xe9, 0xe1, 0xa4, 0xd7, 0xec, 0x8b, 0x71, 0x4b, 0x70, 0x25, 0xb8, 0x6c, 0x0d,
|
||||
0x8f, 0x71, 0xd8, 0x3a, 0x69, 0x99, 0xaf, 0xad, 0x21, 0x56, 0xbd, 0x6c, 0xf4, 0xa5, 0xbd, 0xff,
|
||||
0x23, 0x00, 0x00, 0xff, 0xff, 0x12, 0x6f, 0x94, 0xba, 0xb6, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Aliases) Marshal() (dAtA []byte, err error) {
|
||||
|
||||
+48
-48
@@ -370,40 +370,40 @@ func init() {
|
||||
func init() { proto.RegisterFile("did/v1/tx.proto", fileDescriptor_d73284df019ff211) }
|
||||
|
||||
var fileDescriptor_d73284df019ff211 = []byte{
|
||||
// 519 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x6b, 0x53, 0x4f,
|
||||
0x14, 0xcd, 0x24, 0xf9, 0xe5, 0x47, 0xae, 0xb5, 0x85, 0x47, 0x68, 0x5e, 0x1e, 0xf2, 0xd2, 0x46,
|
||||
0xc1, 0x58, 0x34, 0x8f, 0x46, 0x10, 0x11, 0x37, 0x8d, 0x1b, 0x5d, 0x04, 0x24, 0xe2, 0x46, 0x17,
|
||||
0x3a, 0xcd, 0x9b, 0x4e, 0x06, 0x93, 0x99, 0x30, 0x77, 0x12, 0x1b, 0x57, 0xe2, 0xc6, 0xad, 0x1f,
|
||||
0xc1, 0x8f, 0xd0, 0x85, 0x5f, 0x41, 0xe8, 0xb2, 0xb8, 0x72, 0x25, 0x92, 0x2c, 0x8a, 0xdf, 0x42,
|
||||
0xde, 0xbf, 0xfc, 0x69, 0x13, 0x22, 0xe2, 0x6e, 0xe6, 0x9e, 0x73, 0xee, 0x9c, 0x33, 0x73, 0x19,
|
||||
0xd8, 0xf2, 0x85, 0xef, 0x0d, 0xf7, 0x3d, 0x73, 0x5c, 0xeb, 0x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, 0xa3, 0x35, 0x57, 0xb1, 0xae, 0x41, 0xfe,
|
||||
0x0d, 0x1b, 0x61, 0x87, 0x6a, 0x86, 0x76, 0x26, 0x84, 0x67, 0x05, 0xeb, 0x06, 0x5c, 0x1d, 0x32,
|
||||
0x2d, 0x8e, 0x44, 0x9b, 0x46, 0x0d, 0xb2, 0x21, 0x63, 0xb1, 0x78, 0x29, 0xe2, 0x4b, 0x28, 0xaf,
|
||||
0x88, 0x91, 0x44, 0xb5, 0xee, 0x03, 0xb4, 0xa7, 0xd5, 0xb5, 0x79, 0xe6, 0xb8, 0x95, 0x5f, 0x04,
|
||||
0x4a, 0x4d, 0xe4, 0x07, 0x03, 0xd3, 0x61, 0xd2, 0x04, 0x1e, 0xfe, 0xc5, 0x35, 0x2d, 0xfa, 0x49,
|
||||
0xff, 0xb9, 0x1f, 0xab, 0x0e, 0xff, 0xd3, 0x08, 0xb4, 0x33, 0x6b, 0x64, 0x09, 0xd1, 0xda, 0x86,
|
||||
0x9c, 0xd2, 0x82, 0x0b, 0x69, 0x67, 0x03, 0x49, 0x2b, 0xde, 0x5d, 0xba, 0xc8, 0xeb, 0xb0, 0xbb,
|
||||
0x32, 0x6a, 0x72, 0x95, 0xf5, 0xcf, 0x69, 0xc8, 0x34, 0x91, 0x5b, 0x8f, 0x61, 0x63, 0x61, 0xbc,
|
||||
0x8b, 0xc9, 0x58, 0x5e, 0x18, 0x37, 0xa7, 0xbc, 0x02, 0x98, 0x3e, 0xce, 0x6b, 0x28, 0x2c, 0x9d,
|
||||
0xc1, 0x79, 0xe1, 0x32, 0x82, 0x73, 0x73, 0x0d, 0x61, 0x7a, 0xc2, 0x11, 0x6c, 0xaf, 0x78, 0xc0,
|
||||
0xdd, 0xb9, 0x16, 0xcb, 0x29, 0xce, 0xad, 0xb5, 0x94, 0xe4, 0x1c, 0xe7, 0xbf, 0xf7, 0xe7, 0x27,
|
||||
0x7b, 0xa4, 0xf1, 0xf0, 0x74, 0xec, 0x92, 0xb3, 0xb1, 0x4b, 0x7e, 0x8e, 0x5d, 0xf2, 0x69, 0xe2,
|
||||
0xa6, 0xce, 0x26, 0x6e, 0xea, 0xfb, 0xc4, 0x4d, 0xbd, 0xa8, 0x70, 0x61, 0x3a, 0x83, 0xc3, 0x5a,
|
||||
0x5b, 0xf5, 0x3c, 0x25, 0x51, 0x49, 0xed, 0x75, 0xde, 0xd2, 0x91, 0x77, 0xec, 0x05, 0xff, 0x8e,
|
||||
0x19, 0xf5, 0x19, 0x1e, 0xe6, 0xc2, 0x2f, 0xe4, 0xee, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57,
|
||||
0x4f, 0xb3, 0x3a, 0xbd, 0x04, 0x00, 0x00,
|
||||
// 525 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xc1, 0x6b, 0x13, 0x4f,
|
||||
0x14, 0xce, 0x26, 0xf9, 0xe5, 0x47, 0x9e, 0xb5, 0x85, 0xa1, 0x34, 0x9b, 0x45, 0x36, 0x6d, 0x14,
|
||||
0x8c, 0x45, 0xb3, 0x34, 0x82, 0x88, 0x78, 0x69, 0xbc, 0xe8, 0x21, 0x20, 0x2b, 0x5e, 0x14, 0x94,
|
||||
0x69, 0x76, 0x3a, 0x19, 0x4c, 0x66, 0xc2, 0xbc, 0x49, 0x6c, 0x3c, 0x89, 0x17, 0xaf, 0xfe, 0x05,
|
||||
0xfe, 0x0d, 0x3d, 0xf8, 0x2f, 0x08, 0x3d, 0x16, 0x4f, 0x9e, 0x44, 0x92, 0x43, 0xf1, 0xbf, 0x90,
|
||||
0xdd, 0xcd, 0x26, 0x9b, 0xb6, 0x21, 0x22, 0xde, 0x76, 0xde, 0xf7, 0xbd, 0x6f, 0xbf, 0xef, 0xcd,
|
||||
0x63, 0x60, 0x23, 0x10, 0x81, 0x37, 0xdc, 0xf3, 0xcc, 0x51, 0xbd, 0xaf, 0x95, 0x51, 0xa4, 0x10,
|
||||
0x88, 0xa0, 0x3e, 0xdc, 0x73, 0x4a, 0x6d, 0x85, 0x3d, 0x85, 0x5e, 0x0f, 0x79, 0x88, 0xf7, 0x90,
|
||||
0xc7, 0x04, 0x67, 0x73, 0xda, 0xc1, 0x99, 0x64, 0x28, 0x30, 0xa9, 0x72, 0xc5, 0x55, 0xf4, 0xe9,
|
||||
0x85, 0x5f, 0xd3, 0x6a, 0x39, 0x16, 0x79, 0x1d, 0x03, 0xf1, 0x21, 0x86, 0xaa, 0x1f, 0x2d, 0xd8,
|
||||
0x68, 0x21, 0x7f, 0xde, 0x0f, 0xa8, 0x61, 0x4f, 0xa9, 0xa6, 0x3d, 0x24, 0xf7, 0xa0, 0x48, 0x07,
|
||||
0xa6, 0xa3, 0xb4, 0x30, 0x23, 0xdb, 0xda, 0xb6, 0x6a, 0xc5, 0xa6, 0xfd, 0xed, 0xcb, 0x9d, 0xcd,
|
||||
0x69, 0xe3, 0x7e, 0x10, 0x68, 0x86, 0xf8, 0xcc, 0x68, 0x21, 0xb9, 0x3f, 0xa7, 0x92, 0xdb, 0x50,
|
||||
0xe8, 0x47, 0x0a, 0x76, 0x76, 0xdb, 0xaa, 0x5d, 0x69, 0xac, 0xd7, 0xe3, 0x10, 0xf5, 0x58, 0xb7,
|
||||
0x99, 0x3f, 0xf9, 0x51, 0xc9, 0xf8, 0x53, 0xce, 0x83, 0xf5, 0x0f, 0x67, 0xc7, 0xbb, 0xf3, 0xee,
|
||||
0x6a, 0x19, 0x4a, 0xe7, 0x8c, 0xf8, 0x0c, 0xfb, 0x4a, 0x22, 0xab, 0x7e, 0xb5, 0x22, 0xec, 0x89,
|
||||
0x14, 0x46, 0xd0, 0xae, 0x78, 0xc7, 0x1e, 0x29, 0x69, 0xb4, 0xea, 0x76, 0x99, 0xfe, 0x6b, 0xb3,
|
||||
0x2e, 0x00, 0x45, 0x64, 0xda, 0x08, 0x25, 0x43, 0xc3, 0xb9, 0xda, 0x9a, 0x9f, 0xaa, 0x90, 0x6b,
|
||||
0x50, 0x7c, 0xc3, 0x46, 0xd8, 0xa1, 0x9a, 0xa1, 0x9d, 0x8b, 0xe0, 0x79, 0x81, 0xdc, 0x80, 0xab,
|
||||
0x43, 0xa6, 0xc5, 0xa1, 0x68, 0xd3, 0x58, 0x20, 0x1f, 0x31, 0x16, 0x8b, 0x17, 0x22, 0xbe, 0x84,
|
||||
0xca, 0x92, 0x18, 0x49, 0x54, 0x72, 0x1f, 0xa0, 0x3d, 0xab, 0xae, 0xcc, 0x93, 0xe2, 0x56, 0x7f,
|
||||
0x59, 0x50, 0x6e, 0x21, 0xdf, 0x1f, 0x98, 0x0e, 0x93, 0x26, 0xf4, 0xf0, 0x2f, 0xc6, 0xb4, 0xe8,
|
||||
0x27, 0xfb, 0xe7, 0x7e, 0x48, 0x03, 0xfe, 0xa7, 0x31, 0x68, 0xe7, 0x56, 0xb4, 0x25, 0x44, 0xb2,
|
||||
0x05, 0x05, 0xa5, 0x05, 0x17, 0xd2, 0xce, 0x87, 0x2d, 0xfe, 0xf4, 0x74, 0x61, 0x90, 0xd7, 0x61,
|
||||
0x67, 0x69, 0xd4, 0x64, 0x94, 0x8d, 0xcf, 0x59, 0xc8, 0xb5, 0x90, 0x93, 0xc7, 0xb0, 0xb6, 0xb0,
|
||||
0xde, 0xa5, 0x64, 0x2d, 0xcf, 0xad, 0x9b, 0x53, 0x59, 0x02, 0xcc, 0x2e, 0xe7, 0x15, 0x10, 0x9f,
|
||||
0x71, 0x81, 0x86, 0xe9, 0xd4, 0x68, 0xd3, 0x6d, 0x97, 0xdd, 0xad, 0x73, 0x73, 0x05, 0x61, 0xa6,
|
||||
0x7f, 0x08, 0x5b, 0x4b, 0xae, 0x6f, 0x27, 0x25, 0x71, 0x39, 0xc5, 0xb9, 0xb5, 0x92, 0x92, 0xfc,
|
||||
0xc7, 0xf9, 0xef, 0xfd, 0xd9, 0xf1, 0xae, 0xd5, 0x7c, 0x78, 0x32, 0x76, 0xad, 0xd3, 0xb1, 0x6b,
|
||||
0xfd, 0x1c, 0xbb, 0xd6, 0xa7, 0x89, 0x9b, 0x39, 0x9d, 0xb8, 0x99, 0xef, 0x13, 0x37, 0xf3, 0xa2,
|
||||
0xca, 0x85, 0xe9, 0x0c, 0x0e, 0xea, 0x6d, 0xd5, 0xf3, 0x94, 0x44, 0x25, 0xb5, 0xd7, 0x79, 0x4b,
|
||||
0x47, 0xde, 0x91, 0x17, 0xbe, 0x3a, 0x66, 0xd4, 0x67, 0x78, 0x50, 0x88, 0x1e, 0x90, 0xbb, 0xbf,
|
||||
0x03, 0x00, 0x00, 0xff, 0xff, 0x74, 0x50, 0x71, 0x32, 0xbb, 0x04, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -422,8 +422,8 @@ type MsgClient interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||
// InitializeController initializes a controller with the given assertions, keyshares, and verifications.
|
||||
InitializeController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error)
|
||||
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
|
||||
RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error)
|
||||
// AuthenticateController asserts the given controller is the owner of the given address.
|
||||
AuthenticateController(ctx context.Context, in *MsgAuthenticateController, opts ...grpc.CallOption) (*MsgAuthenticateControllerResponse, error)
|
||||
}
|
||||
@@ -445,9 +445,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) InitializeController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) {
|
||||
func (c *msgClient) RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) {
|
||||
out := new(MsgInitializeControllerResponse)
|
||||
err := c.cc.Invoke(ctx, "/did.v1.Msg/InitializeController", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/did.v1.Msg/RegisterController", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -469,8 +469,8 @@ type MsgServer interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
// InitializeController initializes a controller with the given assertions, keyshares, and verifications.
|
||||
InitializeController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error)
|
||||
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
|
||||
RegisterController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error)
|
||||
// AuthenticateController asserts the given controller is the owner of the given address.
|
||||
AuthenticateController(context.Context, *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error)
|
||||
}
|
||||
@@ -482,8 +482,8 @@ type UnimplementedMsgServer struct {
|
||||
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (*UnimplementedMsgServer) InitializeController(ctx context.Context, req *MsgInitializeController) (*MsgInitializeControllerResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method InitializeController not implemented")
|
||||
func (*UnimplementedMsgServer) RegisterController(ctx context.Context, req *MsgInitializeController) (*MsgInitializeControllerResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented")
|
||||
}
|
||||
func (*UnimplementedMsgServer) AuthenticateController(ctx context.Context, req *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AuthenticateController not implemented")
|
||||
@@ -511,20 +511,20 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_InitializeController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgInitializeController)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).InitializeController(ctx, in)
|
||||
return srv.(MsgServer).RegisterController(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/did.v1.Msg/InitializeController",
|
||||
FullMethod: "/did.v1.Msg/RegisterController",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).InitializeController(ctx, req.(*MsgInitializeController))
|
||||
return srv.(MsgServer).RegisterController(ctx, req.(*MsgInitializeController))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -556,8 +556,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "InitializeController",
|
||||
Handler: _Msg_InitializeController_Handler,
|
||||
MethodName: "RegisterController",
|
||||
Handler: _Msg_RegisterController_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AuthenticateController",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: did/v1/account.proto
|
||||
// source: did/v1/types.proto
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/cosmos/cosmos-proto"
|
||||
_ "github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/cosmos/gogoproto/proto"
|
||||
io "io"
|
||||
@@ -24,8 +25,8 @@ var _ = math.Inf
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// DIDDocument defines a DID document
|
||||
type DIDDocument struct {
|
||||
// BaseDocument defines a DID document
|
||||
type BaseDocument struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
VerificationMethods []*VerificationMethod `protobuf:"bytes,2,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"`
|
||||
Authentication []string `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"`
|
||||
@@ -34,18 +35,18 @@ type DIDDocument struct {
|
||||
CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DIDDocument) Reset() { *m = DIDDocument{} }
|
||||
func (m *DIDDocument) String() string { return proto.CompactTextString(m) }
|
||||
func (*DIDDocument) ProtoMessage() {}
|
||||
func (*DIDDocument) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f1c7ebf7d0ca3c72, []int{0}
|
||||
func (m *BaseDocument) Reset() { *m = BaseDocument{} }
|
||||
func (m *BaseDocument) String() string { return proto.CompactTextString(m) }
|
||||
func (*BaseDocument) ProtoMessage() {}
|
||||
func (*BaseDocument) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e3176cd2dbe76ac1, []int{0}
|
||||
}
|
||||
func (m *DIDDocument) XXX_Unmarshal(b []byte) error {
|
||||
func (m *BaseDocument) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *DIDDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
func (m *BaseDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_DIDDocument.Marshal(b, m, deterministic)
|
||||
return xxx_messageInfo_BaseDocument.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
@@ -55,54 +56,54 @@ 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 *BaseDocument) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BaseDocument.Merge(m, src)
|
||||
}
|
||||
func (m *DIDDocument) XXX_Size() int {
|
||||
func (m *BaseDocument) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *DIDDocument) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DIDDocument.DiscardUnknown(m)
|
||||
func (m *BaseDocument) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BaseDocument.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DIDDocument proto.InternalMessageInfo
|
||||
var xxx_messageInfo_BaseDocument proto.InternalMessageInfo
|
||||
|
||||
func (m *DIDDocument) GetId() string {
|
||||
func (m *BaseDocument) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DIDDocument) GetVerificationMethods() []*VerificationMethod {
|
||||
func (m *BaseDocument) GetVerificationMethods() []*VerificationMethod {
|
||||
if m != nil {
|
||||
return m.VerificationMethods
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DIDDocument) GetAuthentication() []string {
|
||||
func (m *BaseDocument) GetAuthentication() []string {
|
||||
if m != nil {
|
||||
return m.Authentication
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DIDDocument) GetAssertionMethod() []string {
|
||||
func (m *BaseDocument) GetAssertionMethod() []string {
|
||||
if m != nil {
|
||||
return m.AssertionMethod
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DIDDocument) GetCapabilityDelegation() []string {
|
||||
func (m *BaseDocument) GetCapabilityDelegation() []string {
|
||||
if m != nil {
|
||||
return m.CapabilityDelegation
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DIDDocument) GetCapabilityInvocation() []string {
|
||||
func (m *BaseDocument) GetCapabilityInvocation() []string {
|
||||
if m != nil {
|
||||
return m.CapabilityInvocation
|
||||
}
|
||||
@@ -123,7 +124,7 @@ func (m *VerificationMethod) Reset() { *m = VerificationMethod{} }
|
||||
func (m *VerificationMethod) String() string { return proto.CompactTextString(m) }
|
||||
func (*VerificationMethod) ProtoMessage() {}
|
||||
func (*VerificationMethod) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f1c7ebf7d0ca3c72, []int{1}
|
||||
return fileDescriptor_e3176cd2dbe76ac1, []int{1}
|
||||
}
|
||||
func (m *VerificationMethod) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -181,46 +182,47 @@ func (m *VerificationMethod) GetPublicKeyJwks() map[string]string {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*DIDDocument)(nil), "did.v1.DIDDocument")
|
||||
proto.RegisterType((*BaseDocument)(nil), "did.v1.BaseDocument")
|
||||
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) }
|
||||
func init() { proto.RegisterFile("did/v1/types.proto", fileDescriptor_e3176cd2dbe76ac1) }
|
||||
|
||||
var fileDescriptor_f1c7ebf7d0ca3c72 = []byte{
|
||||
// 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, 0xce, 0xb4, 0x40, 0xe9, 0x27, 0xa0,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9, 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,
|
||||
var fileDescriptor_e3176cd2dbe76ac1 = []byte{
|
||||
// 449 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0x86, 0x63, 0x87, 0x16, 0xba, 0x85, 0xb6, 0x5a, 0x8c, 0x30, 0x39, 0x58, 0x51, 0x0e, 0x28,
|
||||
0x1c, 0xb0, 0x69, 0x7b, 0x41, 0x88, 0x03, 0xaa, 0xca, 0x01, 0x50, 0x24, 0x14, 0x09, 0x0e, 0x5c,
|
||||
0xac, 0xb5, 0x3d, 0x38, 0x4b, 0xec, 0x5d, 0xcb, 0xb3, 0x76, 0xf0, 0x53, 0xc0, 0x73, 0xf0, 0x24,
|
||||
0x1c, 0x7b, 0xe4, 0x88, 0x92, 0x17, 0x41, 0xd9, 0x75, 0x82, 0x95, 0xa8, 0xb7, 0xd9, 0xff, 0xff,
|
||||
0x66, 0x76, 0x66, 0x34, 0x84, 0x26, 0x3c, 0x09, 0xea, 0xf3, 0x40, 0x35, 0x05, 0xa0, 0x5f, 0x94,
|
||||
0x52, 0x49, 0x7a, 0x98, 0xf0, 0xc4, 0xaf, 0xcf, 0x07, 0x8f, 0x63, 0x89, 0xb9, 0xc4, 0x20, 0xc7,
|
||||
0x74, 0x8d, 0xe4, 0x98, 0x1a, 0x60, 0xe0, 0xb4, 0x49, 0x29, 0x08, 0x40, 0x8e, 0x1b, 0x35, 0x95,
|
||||
0xa9, 0xd4, 0x61, 0xb0, 0x8e, 0x5a, 0xf5, 0x89, 0x29, 0x12, 0x1a, 0xc3, 0x3c, 0x8c, 0x35, 0xfa,
|
||||
0x65, 0x93, 0xfb, 0x57, 0x0c, 0xe1, 0x5a, 0xc6, 0x55, 0x0e, 0x42, 0xd1, 0x13, 0x62, 0xf3, 0xc4,
|
||||
0xb5, 0x86, 0xd6, 0xf8, 0x68, 0x6a, 0xf3, 0x84, 0x4e, 0x88, 0x53, 0x43, 0xc9, 0xbf, 0xf2, 0x98,
|
||||
0x29, 0x2e, 0x45, 0x98, 0x83, 0x9a, 0xc9, 0x04, 0x5d, 0x7b, 0xd8, 0x1f, 0x1f, 0x5f, 0x0c, 0x7c,
|
||||
0xd3, 0xa7, 0xff, 0xb9, 0xc3, 0x4c, 0x34, 0x32, 0x7d, 0x58, 0xef, 0x69, 0x48, 0x9f, 0x92, 0x13,
|
||||
0x56, 0xa9, 0x19, 0x08, 0xd5, 0x1a, 0xee, 0x9d, 0x61, 0x7f, 0x7c, 0x34, 0xdd, 0x51, 0xe9, 0x33,
|
||||
0x72, 0xc6, 0x10, 0xa1, 0xec, 0xfc, 0xe9, 0x1e, 0x68, 0xf2, 0x74, 0xab, 0x9b, 0x9a, 0xf4, 0x92,
|
||||
0x3c, 0x8a, 0x59, 0xc1, 0x22,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0x0c, 0x66, 0x0b, 0xd6, 0x04, 0xdf, 0x83, 0xf5, 0xe1, 0xea, 0x53, 0x8f, 0x0e,
|
||||
0xf5, 0x0d, 0x5e, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x30, 0x32, 0xf6, 0x01, 0x03, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
func (m *DIDDocument) Marshal() (dAtA []byte, err error) {
|
||||
func (m *BaseDocument) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
@@ -230,12 +232,12 @@ func (m *DIDDocument) Marshal() (dAtA []byte, err error) {
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *DIDDocument) MarshalTo(dAtA []byte) (int, error) {
|
||||
func (m *BaseDocument) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
func (m *BaseDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
@@ -244,7 +246,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
for iNdEx := len(m.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(m.CapabilityInvocation[iNdEx])
|
||||
copy(dAtA[i:], m.CapabilityInvocation[iNdEx])
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx])))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx])))
|
||||
i--
|
||||
dAtA[i] = 0x42
|
||||
}
|
||||
@@ -253,7 +255,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
for iNdEx := len(m.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(m.CapabilityDelegation[iNdEx])
|
||||
copy(dAtA[i:], m.CapabilityDelegation[iNdEx])
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx])))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx])))
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
@@ -262,7 +264,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
for iNdEx := len(m.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(m.AssertionMethod[iNdEx])
|
||||
copy(dAtA[i:], m.AssertionMethod[iNdEx])
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(m.AssertionMethod[iNdEx])))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.AssertionMethod[iNdEx])))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
@@ -271,7 +273,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(m.Authentication[iNdEx])
|
||||
copy(dAtA[i:], m.Authentication[iNdEx])
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(m.Authentication[iNdEx])))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.Authentication[iNdEx])))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
@@ -284,7 +286,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintAccount(dAtA, i, uint64(size))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
@@ -293,7 +295,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
if len(m.Id) > 0 {
|
||||
i -= len(m.Id)
|
||||
copy(dAtA[i:], m.Id)
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(m.Id)))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.Id)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
@@ -326,15 +328,15 @@ func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
baseI := i
|
||||
i -= len(v)
|
||||
copy(dAtA[i:], v)
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(v)))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(v)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
i -= len(k)
|
||||
copy(dAtA[i:], k)
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(k)))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(k)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
i = encodeVarintAccount(dAtA, i, uint64(baseI-i))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(baseI-i))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
@@ -342,29 +344,29 @@ func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
if len(m.PublicKeyMultibase) > 0 {
|
||||
i -= len(m.PublicKeyMultibase)
|
||||
copy(dAtA[i:], m.PublicKeyMultibase)
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(m.PublicKeyMultibase)))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.PublicKeyMultibase)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.Controller) > 0 {
|
||||
i -= len(m.Controller)
|
||||
copy(dAtA[i:], m.Controller)
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(m.Controller)))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Id) > 0 {
|
||||
i -= len(m.Id)
|
||||
copy(dAtA[i:], m.Id)
|
||||
i = encodeVarintAccount(dAtA, i, uint64(len(m.Id)))
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.Id)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintAccount(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovAccount(v)
|
||||
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovTypes(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
@@ -374,7 +376,7 @@ func encodeVarintAccount(dAtA []byte, offset int, v uint64) int {
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *DIDDocument) Size() (n int) {
|
||||
func (m *BaseDocument) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
@@ -382,36 +384,36 @@ func (m *DIDDocument) Size() (n int) {
|
||||
_ = l
|
||||
l = len(m.Id)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovAccount(uint64(l))
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
if len(m.VerificationMethods) > 0 {
|
||||
for _, e := range m.VerificationMethods {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovAccount(uint64(l))
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
}
|
||||
if len(m.Authentication) > 0 {
|
||||
for _, s := range m.Authentication {
|
||||
l = len(s)
|
||||
n += 1 + l + sovAccount(uint64(l))
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
}
|
||||
if len(m.AssertionMethod) > 0 {
|
||||
for _, s := range m.AssertionMethod {
|
||||
l = len(s)
|
||||
n += 1 + l + sovAccount(uint64(l))
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
}
|
||||
if len(m.CapabilityDelegation) > 0 {
|
||||
for _, s := range m.CapabilityDelegation {
|
||||
l = len(s)
|
||||
n += 1 + l + sovAccount(uint64(l))
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
}
|
||||
if len(m.CapabilityInvocation) > 0 {
|
||||
for _, s := range m.CapabilityInvocation {
|
||||
l = len(s)
|
||||
n += 1 + l + sovAccount(uint64(l))
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
}
|
||||
return n
|
||||
@@ -425,34 +427,34 @@ func (m *VerificationMethod) Size() (n int) {
|
||||
_ = l
|
||||
l = len(m.Id)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovAccount(uint64(l))
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
l = len(m.Controller)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovAccount(uint64(l))
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
l = len(m.PublicKeyMultibase)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovAccount(uint64(l))
|
||||
n += 1 + l + sovTypes(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))
|
||||
mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
|
||||
n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovAccount(x uint64) (n int) {
|
||||
func sovTypes(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 sozTypes(x uint64) (n int) {
|
||||
return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
func (m *BaseDocument) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -460,7 +462,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -475,10 +477,10 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: DIDDocument: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: BaseDocument: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: DIDDocument: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: BaseDocument: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
@@ -488,7 +490,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -502,11 +504,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -520,7 +522,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -533,11 +535,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -554,7 +556,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -568,11 +570,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -586,7 +588,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -600,11 +602,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -618,7 +620,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -632,11 +634,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -650,7 +652,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -664,11 +666,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -677,12 +679,12 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error {
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipAccount(dAtA[iNdEx:])
|
||||
skippy, err := skipTypes(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -704,7 +706,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -732,7 +734,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -746,11 +748,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -764,7 +766,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -778,11 +780,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -796,7 +798,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -810,11 +812,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -828,7 +830,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -841,11 +843,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -860,7 +862,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -877,7 +879,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
var stringLenmapkey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -891,11 +893,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
intStringLenmapkey := int(stringLenmapkey)
|
||||
if intStringLenmapkey < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||
if postStringIndexmapkey < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postStringIndexmapkey > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -906,7 +908,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
var stringLenmapvalue uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowAccount
|
||||
return ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -920,11 +922,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
intStringLenmapvalue := int(stringLenmapvalue)
|
||||
if intStringLenmapvalue < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||
if postStringIndexmapvalue < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if postStringIndexmapvalue > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -933,12 +935,12 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
iNdEx = postStringIndexmapvalue
|
||||
} else {
|
||||
iNdEx = entryPreIndex
|
||||
skippy, err := skipAccount(dAtA[iNdEx:])
|
||||
skippy, err := skipTypes(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > postIndex {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -950,12 +952,12 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipAccount(dAtA[iNdEx:])
|
||||
skippy, err := skipTypes(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthAccount
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
@@ -969,7 +971,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipAccount(dAtA []byte) (n int, err error) {
|
||||
func skipTypes(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
depth := 0
|
||||
@@ -977,7 +979,7 @@ func skipAccount(dAtA []byte) (n int, err error) {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowAccount
|
||||
return 0, ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
@@ -994,7 +996,7 @@ func skipAccount(dAtA []byte) (n int, err error) {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowAccount
|
||||
return 0, ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
@@ -1010,7 +1012,7 @@ func skipAccount(dAtA []byte) (n int, err error) {
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowAccount
|
||||
return 0, ErrIntOverflowTypes
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
@@ -1023,14 +1025,14 @@ func skipAccount(dAtA []byte) (n int, err error) {
|
||||
}
|
||||
}
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthAccount
|
||||
return 0, ErrInvalidLengthTypes
|
||||
}
|
||||
iNdEx += length
|
||||
case 3:
|
||||
depth++
|
||||
case 4:
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupAccount
|
||||
return 0, ErrUnexpectedEndOfGroupTypes
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
@@ -1039,7 +1041,7 @@ func skipAccount(dAtA []byte) (n int, err error) {
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthAccount
|
||||
return 0, ErrInvalidLengthTypes
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
@@ -1049,7 +1051,7 @@ func skipAccount(dAtA []byte) (n int, err error) {
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group")
|
||||
ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
||||
Reference in New Issue
Block a user