feature/1121 implement ucan validation (#1176)

- **refactor: remove unused auth components**
- **refactor: improve devbox configuration and deployment process**
- **refactor: improve devnet and testnet setup**
- **fix: update templ version to v0.2.778**
- **refactor: rename pkl/net.matrix to pkl/matrix.net**
- **refactor: migrate webapp components to nebula**
- **refactor: protobuf types**
- **chore: update dependencies for improved security and stability**
- **feat: implement landing page and vault gateway servers**
- **refactor: Migrate data models to new module structure and update
related files**
- **feature/1121-implement-ucan-validation**
- **refactor: Replace hardcoded constants with model types in attns.go**
- **feature/1121-implement-ucan-validation**
- **chore: add origin Host struct and update main function to handle
multiple hosts**
- **build: remove unused static files from dwn module**
- **build: remove unused static files from dwn module**
- **refactor: Move DWN models to common package**
- **refactor: move models to pkg/common**
- **refactor: move vault web app assets to embed module**
- **refactor: update session middleware import path**
- **chore: configure port labels and auto-forwarding behavior**
- **feat: enhance devcontainer configuration**
- **feat: Add UCAN middleware for Echo with flexible token validation**
- **feat: add JWT middleware for UCAN authentication**
- **refactor: update package URI and versioning in PklProject files**
- **fix: correct sonr.pkl import path**
- **refactor: move JWT related code to auth package**
- **feat: introduce vault configuration retrieval and management**
- **refactor: Move vault components to gateway module and update file
paths**
- **refactor: remove Dexie and SQLite database implementations**
- **feat: enhance frontend with PWA features and WASM integration**
- **feat: add Devbox features and streamline Dockerfile**
- **chore: update dependencies to include TigerBeetle**
- **chore(deps): update go version to 1.23**
- **feat: enhance devnet setup with PATH environment variable and
updated PWA manifest**
- **fix: upgrade tigerbeetle-go dependency and remove indirect
dependency**
- **feat: add PostgreSQL support to devnet and testnet deployments**
- **refactor: rename keyshare cookie to token cookie**
- **feat: upgrade Go version to 1.23.3 and update dependencies**
- **refactor: update devnet and testnet configurations**
- **feat: add IPFS configuration for devnet**
- **I'll help you update the ipfs.config.pkl to include all the peers
from the shell script. Here's the updated configuration:**
- **refactor: move mpc package to crypto directory**
- **feat: add BIP32 support for various cryptocurrencies**
- **feat: enhance ATN.pkl with additional capabilities**
- **refactor: simplify smart account and vault attenuation creation**
- **feat: add new capabilities to the Attenuation type**
- **refactor: Rename MPC files for clarity and consistency**
- **feat: add DIDKey support for cryptographic operations**
- **feat: add devnet and testnet deployment configurations**
- **fix: correct key derivation in bip32 package**
- **refactor: rename crypto/bip32 package to crypto/accaddr**
- **fix: remove duplicate indirect dependency**
- **refactor: move vault package to root directory**
- **refactor: update routes for gateway and vault**
- **refactor: remove obsolete web configuration file**
- **refactor: remove unused TigerBeetle imports and update host
configuration**
- **refactor: adjust styles directory path**
- **feat: add broadcastTx and simulateTx functions to gateway**
- **feat: add PinVault handler**
This commit is contained in:
Prad Nukala
2024-12-02 14:27:18 -05:00
committed by GitHub
parent 2a128af227
commit 31bcc21c35
535 changed files with 9357 additions and 10950 deletions
-54
View File
@@ -1,54 +0,0 @@
package controller
import (
"github.com/onsonr/sonr/pkg/crypto/mpc"
)
type ControllerI interface {
ChainID() string
// GetPubKey() *commonv1.PubKey
SonrAddress() string
RawPublicKey() []byte
}
func New(src mpc.KeyshareSource) (ControllerI, error) {
return &controller{
src: src,
address: src.Address(),
publicKey: src.PublicKey(),
did: src.Issuer(),
chainID: "sonr-testnet-1",
}, nil
}
type controller struct {
src mpc.KeyshareSource
address string
chainID string
publicKey []byte
did string
}
func (c *controller) ChainID() string {
return c.chainID
}
//
// func (c *controller) GetPubKey() *commonv1.PubKey {
// return &commonv1.PubKey{
// KeyType: "ecdsa",
// RawKey: &commonv1.RawKey{
// Algorithm: "secp256k1",
// Key: c.publicKey,
// },
// Role: "authentication",
// }
// }
func (c *controller) RawPublicKey() []byte {
return c.publicKey
}
func (c *controller) SonrAddress() string {
return c.address
}
-13
View File
@@ -1,13 +0,0 @@
package controller
// func LoadFromTableEntry(ctx sdk.Context, entry *didv1.Controller) (ControllerI, error) {
// k, err := hexutil.Decode(entry.PublicKeyHex)
// if err != nil {
// return nil, err
// }
// return &controller{
// address: entry.Did,
// chainID: ctx.ChainID(),
// publicKey: k,
// }, nil
// }
-14
View File
@@ -6,23 +6,9 @@ import (
"cosmossdk.io/log"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/onsonr/sonr/pkg/crypto/mpc"
"github.com/onsonr/sonr/x/did/controller"
"github.com/onsonr/sonr/x/did/types"
)
func (k Keeper) NewController(ctx sdk.Context) (controller.ControllerI, error) {
shares, err := mpc.NewKeyshareSource()
if err != nil {
return nil, err
}
controller, err := controller.New(shares)
if err != nil {
return nil, err
}
return controller, nil
}
// func (k Keeper) ResolveController(ctx sdk.Context, did string) (controller.ControllerI, error) {
// ct, err := k.OrmDB.ControllerTable().GetByDid(ctx, did)
// if err != nil {
@@ -1,4 +1,4 @@
package did
package crypto
import (
"crypto/ecdsa"
+108
View File
@@ -0,0 +1,108 @@
package crypto_test
import (
"crypto/elliptic"
"crypto/rand"
"testing"
"github.com/decred/dcrd/dcrec/secp256k1/v4"
libp2p_crypto "github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/crypto/pb"
"github.com/multiformats/go-multicodec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/onsonr/sonr/x/did/types/crypto"
)
const (
exampleDIDStr = "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
examplePubKeyStr = "Lm/M42cB3HkUiODQsXRcweM6TByfzEHGO9ND274JcOY="
)
func TestFromPubKey(t *testing.T) {
t.Parallel()
_, ecdsaP256, err := libp2p_crypto.GenerateECDSAKeyPairWithCurve(elliptic.P256(), rand.Reader)
require.NoError(t, err)
_, ecdsaP384, err := libp2p_crypto.GenerateECDSAKeyPairWithCurve(elliptic.P384(), rand.Reader)
require.NoError(t, err)
_, ecdsaP521, err := libp2p_crypto.GenerateECDSAKeyPairWithCurve(elliptic.P521(), rand.Reader)
require.NoError(t, err)
_, ecdsaSecp256k1, err := libp2p_crypto.GenerateECDSAKeyPairWithCurve(secp256k1.S256(), rand.Reader)
require.NoError(t, err)
_, ed25519, err := libp2p_crypto.GenerateEd25519Key(rand.Reader)
require.NoError(t, err)
_, rsa, err := libp2p_crypto.GenerateRSAKeyPair(2048, rand.Reader)
require.NoError(t, err)
_, secp256k1PubKey1, err := libp2p_crypto.GenerateSecp256k1Key(rand.Reader)
require.NoError(t, err)
test := func(pub libp2p_crypto.PubKey, code multicodec.Code) func(t *testing.T) {
t.Helper()
return func(t *testing.T) {
t.Parallel()
id, err := crypto.FromPubKey(pub)
require.NoError(t, err)
p, err := id.PubKey()
require.NoError(t, err)
assert.Equal(t, pub, p)
}
}
t.Run("ECDSA with P256 curve", test(ecdsaP256, crypto.P256))
t.Run("ECDSA with P384 curve", test(ecdsaP384, crypto.P384))
t.Run("ECDSA with P521 curve", test(ecdsaP521, crypto.P521))
t.Run("Ed25519", test(ed25519, crypto.Ed25519))
t.Run("RSA", test(rsa, crypto.RSA))
t.Run("secp256k1", test(secp256k1PubKey1, crypto.Secp256k1))
t.Run("ECDSA with secp256k1 curve (coerced)", func(t *testing.T) {
t.Parallel()
id, err := crypto.FromPubKey(ecdsaSecp256k1)
require.NoError(t, err)
p, err := id.PubKey()
require.NoError(t, err)
require.Equal(t, pb.KeyType_Secp256k1, p.Type())
})
t.Run("unmarshaled example key (secp256k1)", func(t *testing.T) {
t.Parallel()
id, err := crypto.FromPubKey(examplePubKey(t))
require.NoError(t, err)
require.Equal(t, exampleDID(t), id)
})
}
func TestToPubKey(t *testing.T) {
t.Parallel()
pubKey, err := crypto.ToPubKey(exampleDIDStr)
require.NoError(t, err)
require.Equal(t, examplePubKey(t), pubKey)
}
func exampleDID(t *testing.T) crypto.DID {
t.Helper()
id, err := crypto.Parse(exampleDIDStr)
require.NoError(t, err)
return id
}
func examplePubKey(t *testing.T) libp2p_crypto.PubKey {
t.Helper()
pubKeyCfg, err := libp2p_crypto.ConfigDecodeKey(examplePubKeyStr)
require.NoError(t, err)
pubKey, err := libp2p_crypto.UnmarshalEd25519PublicKey(pubKeyCfg)
require.NoError(t, err)
return pubKey
}
@@ -1,4 +1,4 @@
package did
package crypto
import (
"crypto/ecdsa"
@@ -1,4 +1,4 @@
package did
package crypto
import (
"testing"
-108
View File
@@ -1,108 +0,0 @@
package did_test
import (
"crypto/elliptic"
"crypto/rand"
"testing"
"github.com/decred/dcrd/dcrec/secp256k1/v4"
"github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/crypto/pb"
"github.com/multiformats/go-multicodec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/onsonr/sonr/x/did/types/did"
)
const (
exampleDIDStr = "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
examplePubKeyStr = "Lm/M42cB3HkUiODQsXRcweM6TByfzEHGO9ND274JcOY="
)
func TestFromPubKey(t *testing.T) {
t.Parallel()
_, ecdsaP256, err := crypto.GenerateECDSAKeyPairWithCurve(elliptic.P256(), rand.Reader)
require.NoError(t, err)
_, ecdsaP384, err := crypto.GenerateECDSAKeyPairWithCurve(elliptic.P384(), rand.Reader)
require.NoError(t, err)
_, ecdsaP521, err := crypto.GenerateECDSAKeyPairWithCurve(elliptic.P521(), rand.Reader)
require.NoError(t, err)
_, ecdsaSecp256k1, err := crypto.GenerateECDSAKeyPairWithCurve(secp256k1.S256(), rand.Reader)
require.NoError(t, err)
_, ed25519, err := crypto.GenerateEd25519Key(rand.Reader)
require.NoError(t, err)
_, rsa, err := crypto.GenerateRSAKeyPair(2048, rand.Reader)
require.NoError(t, err)
_, secp256k1PubKey1, err := crypto.GenerateSecp256k1Key(rand.Reader)
require.NoError(t, err)
test := func(pub crypto.PubKey, code multicodec.Code) func(t *testing.T) {
t.Helper()
return func(t *testing.T) {
t.Parallel()
id, err := did.FromPubKey(pub)
require.NoError(t, err)
p, err := id.PubKey()
require.NoError(t, err)
assert.Equal(t, pub, p)
}
}
t.Run("ECDSA with P256 curve", test(ecdsaP256, did.P256))
t.Run("ECDSA with P384 curve", test(ecdsaP384, did.P384))
t.Run("ECDSA with P521 curve", test(ecdsaP521, did.P521))
t.Run("Ed25519", test(ed25519, did.Ed25519))
t.Run("RSA", test(rsa, did.RSA))
t.Run("secp256k1", test(secp256k1PubKey1, did.Secp256k1))
t.Run("ECDSA with secp256k1 curve (coerced)", func(t *testing.T) {
t.Parallel()
id, err := did.FromPubKey(ecdsaSecp256k1)
require.NoError(t, err)
p, err := id.PubKey()
require.NoError(t, err)
require.Equal(t, pb.KeyType_Secp256k1, p.Type())
})
t.Run("unmarshaled example key (secp256k1)", func(t *testing.T) {
t.Parallel()
id, err := did.FromPubKey(examplePubKey(t))
require.NoError(t, err)
require.Equal(t, exampleDID(t), id)
})
}
func TestToPubKey(t *testing.T) {
t.Parallel()
pubKey, err := did.ToPubKey(exampleDIDStr)
require.NoError(t, err)
require.Equal(t, examplePubKey(t), pubKey)
}
func exampleDID(t *testing.T) did.DID {
t.Helper()
id, err := did.Parse(exampleDIDStr)
require.NoError(t, err)
return id
}
func examplePubKey(t *testing.T) crypto.PubKey {
t.Helper()
pubKeyCfg, err := crypto.ConfigDecodeKey(examplePubKeyStr)
require.NoError(t, err)
pubKey, err := crypto.UnmarshalEd25519PublicKey(pubKeyCfg)
require.NoError(t, err)
return pubKey
}
+1
View File
@@ -0,0 +1 @@
package types
+165 -23
View File
@@ -163,39 +163,99 @@ func (m *Document) GetService() []string {
return nil
}
// Params defines the set of module parameters.
type Params struct {
}
func (m *Params) Reset() { *m = Params{} }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_fda181cae44f7c00, []int{2}
}
func (m *Params) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) {
xxx_messageInfo_Params.Merge(m, src)
}
func (m *Params) XXX_Size() int {
return m.Size()
}
func (m *Params) XXX_DiscardUnknown() {
xxx_messageInfo_Params.DiscardUnknown(m)
}
var xxx_messageInfo_Params proto.InternalMessageInfo
func init() {
proto.RegisterType((*GenesisState)(nil), "did.v1.GenesisState")
proto.RegisterType((*Document)(nil), "did.v1.Document")
proto.RegisterType((*Params)(nil), "did.v1.Params")
}
func init() { proto.RegisterFile("did/v1/genesis.proto", fileDescriptor_fda181cae44f7c00) }
var fileDescriptor_fda181cae44f7c00 = []byte{
// 344 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xc1, 0x6a, 0xea, 0x40,
0x14, 0x86, 0x93, 0xe8, 0x8d, 0xd7, 0xb9, 0x17, 0xdb, 0x4e, 0x2d, 0x04, 0x17, 0xa9, 0xb8, 0x28,
0x16, 0x4a, 0x06, 0xeb, 0xd6, 0x95, 0x08, 0xa5, 0x8b, 0x42, 0xb1, 0xbb, 0x6e, 0x64, 0xcc, 0x0c,
0x71, 0x20, 0x99, 0x13, 0x66, 0xc6, 0x50, 0xdf, 0xa2, 0x7d, 0x2b, 0x97, 0x2e, 0xbb, 0x2a, 0x45,
0x5f, 0xa4, 0x38, 0x49, 0x6d, 0x71, 0x73, 0x38, 0xe7, 0xfb, 0xff, 0xff, 0xcc, 0xc0, 0x41, 0x6d,
0x26, 0x18, 0x29, 0x06, 0x24, 0xe1, 0x92, 0x6b, 0xa1, 0xa3, 0x5c, 0x81, 0x01, 0xec, 0x33, 0xc1,
0xa2, 0x62, 0xd0, 0x39, 0xa3, 0x99, 0x90, 0x40, 0x6c, 0x2d, 0xa5, 0xce, 0x79, 0x15, 0xc8, 0xa9,
0xa2, 0x59, 0xe5, 0xef, 0xb4, 0x13, 0x48, 0xc0, 0xb6, 0x64, 0xdf, 0x95, 0xb4, 0x37, 0x42, 0xff,
0xef, 0xca, 0xb5, 0x4f, 0x86, 0x1a, 0x8e, 0x6f, 0x90, 0x5f,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, 0xab, 0x9c, 0xeb, 0xb9, 0x6f, 0xcf, 0x32, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff,
0x44, 0xa7, 0x3d, 0xf3, 0xf4, 0x01, 0x00, 0x00,
// 371 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xc1, 0x4e, 0xea, 0x40,
0x14, 0x86, 0xdb, 0xc2, 0x2d, 0x97, 0xb9, 0x37, 0xdc, 0xeb, 0x04, 0x63, 0xc3, 0xa2, 0x60, 0x17,
0x06, 0x8d, 0x69, 0x83, 0xec, 0x0c, 0x2b, 0x42, 0x62, 0x5c, 0x98, 0x18, 0xdc, 0xb9, 0x21, 0x43,
0x67, 0x52, 0x26, 0x69, 0x67, 0x9a, 0xce, 0xd0, 0xc8, 0x2b, 0xb8, 0xd2, 0x9d, 0x4b, 0x1e, 0xc1,
0xc7, 0x60, 0xc9, 0xd2, 0x95, 0x31, 0xb0, 0xd0, 0xc7, 0x30, 0x9d, 0x41, 0x34, 0x6c, 0x26, 0xe7,
0x7c, 0xff, 0xff, 0x9f, 0x4c, 0xce, 0x01, 0x75, 0x4c, 0x71, 0x90, 0x77, 0x82, 0x88, 0x30, 0x22,
0xa8, 0xf0, 0xd3, 0x8c, 0x4b, 0x0e, 0x6d, 0x4c, 0xb1, 0x9f, 0x77, 0x1a, 0x7b, 0x28, 0xa1, 0x8c,
0x07, 0xea, 0xd5, 0x52, 0xa3, 0x1e, 0xf1, 0x88, 0xab, 0x32, 0x28, 0x2a, 0x4d, 0xbd, 0x1e, 0xf8,
0x7b, 0xa1, 0x27, 0xdc, 0x48, 0x24, 0x09, 0x3c, 0x05, 0x76, 0x8a, 0x32, 0x94, 0x08, 0xc7, 0x6c,
0x99, 0xed, 0x3f, 0x67, 0x35, 0x5f, 0x4f, 0xf4, 0xaf, 0x15, 0xed, 0x97, 0x17, 0xaf, 0x4d, 0x63,
0xb8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e, 0xbb, 0xa0, 0x88, 0xcb, 0x59, 0x4a,
0xc4, 0xd8, 0x56, 0x97, 0xeb, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x43, 0x9f, 0x66, 0x22, 0x02,
0x02, 0x00, 0x00,
}
func (this *Params) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Params)
if !ok {
that2, ok := that.(Params)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
return true
}
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -311,6 +371,29 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
offset -= sovGenesis(v)
base := offset
@@ -380,6 +463,15 @@ func (m *Document) Size() (n int) {
return n
}
func (m *Params) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func sovGenesis(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -743,6 +835,56 @@ func (m *Document) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *Params) 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: Params: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
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
+1 -80
View File
@@ -3,20 +3,11 @@ package types
import (
"encoding/json"
fmt "fmt"
"github.com/onsonr/sonr/pkg/common/models/keyalgorithm"
"github.com/onsonr/sonr/pkg/common/models/keycurve"
"github.com/onsonr/sonr/pkg/common/models/keyencoding"
"github.com/onsonr/sonr/pkg/common/models/keyrole"
)
// DefaultParams returns default module parameters.
func DefaultParams() Params {
return Params{
AllowedPublicKeys: DefaultKeyInfos(),
ConveyancePreference: "direct",
AttestationFormats: []string{"packed", "android-key", "fido-u2f", "apple"},
}
return Params{}
}
// DefaultSeedMessage returns the default seed message
@@ -28,66 +19,6 @@ func DefaultSeedMessage() string {
return fmt.Sprintf("%s %s %s %s", l1, l2, l3, l4)
}
func DefaultKeyInfos() map[string]*KeyInfo {
return map[string]*KeyInfo{
// Identity Key Info
// Sonr Controller Key Info - From MPC
"auth.dwn": {
Role: keyrole.Invocation.String(),
Curve: keycurve.P256.String(),
Algorithm: keyalgorithm.Ecdsa.String(),
Encoding: keyencoding.Hex.String(),
},
// Sonr Vault Shared Key Info - From Registration
"auth.zk": {
Role: keyrole.Assertion.String(),
Curve: keycurve.Bls12381.String(),
Algorithm: keyalgorithm.Es256k.String(),
Encoding: keyencoding.Multibase.String(),
},
// Blockchain Key Info
// Ethereum Key Info
"auth.ethereum": {
Role: keyrole.Delegation.String(),
Curve: keycurve.Keccak256.String(),
Algorithm: keyalgorithm.Ecdsa.String(),
Encoding: keyencoding.Hex.String(),
},
// Bitcoin/IBC Key Info
"auth.bitcoin": {
Role: keyrole.Delegation.String(),
Curve: keycurve.Secp256k1.String(),
Algorithm: keyalgorithm.Ecdsa.String(),
Encoding: keyencoding.Hex.String(),
},
// Authentication Key Info
// Browser based WebAuthn
"webauthn.browser": {
Role: keyrole.Authentication.String(),
Curve: keycurve.P256.String(),
Algorithm: keyalgorithm.Es256.String(),
Encoding: keyencoding.Raw.String(),
},
// FIDO U2F
"webauthn.fido": {
Role: keyrole.Authentication.String(),
Curve: keycurve.P256.String(),
Algorithm: keyalgorithm.Es256.String(),
Encoding: keyencoding.Raw.String(),
},
// Cross-Platform Passkeys
"webauthn.passkey": {
Role: keyrole.Authentication.String(),
Curve: keycurve.Ed25519.String(),
Algorithm: keyalgorithm.Eddsa.String(),
Encoding: keyencoding.Raw.String(),
},
}
}
// Stringer method for Params.
func (p Params) String() string {
bz, err := json.Marshal(p)
@@ -103,13 +34,3 @@ func (p Params) Validate() error {
// TODO:
return nil
}
// # Genesis Structures
//
// Equal returns true if two key infos are equal
func (k *KeyInfo) Equal(b *KeyInfo) bool {
if k == nil && b == nil {
return true
}
return false
}
-931
View File
@@ -1,931 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: did/v1/params.proto
package types
import (
fmt "fmt"
_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/proto"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = 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.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// Params defines the set of module parameters.
type Params struct {
// Whitelisted Key Types
AllowedPublicKeys map[string]*KeyInfo `protobuf:"bytes,2,rep,name=allowed_public_keys,json=allowedPublicKeys,proto3" json:"allowed_public_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// ConveyancePreference defines the conveyance preference
ConveyancePreference string `protobuf:"bytes,3,opt,name=conveyance_preference,json=conveyancePreference,proto3" json:"conveyance_preference,omitempty"`
// AttestationFormats defines the attestation formats
AttestationFormats []string `protobuf:"bytes,4,rep,name=attestation_formats,json=attestationFormats,proto3" json:"attestation_formats,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_9d62d07335ae093e, []int{0}
}
func (m *Params) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) {
xxx_messageInfo_Params.Merge(m, src)
}
func (m *Params) XXX_Size() int {
return m.Size()
}
func (m *Params) XXX_DiscardUnknown() {
xxx_messageInfo_Params.DiscardUnknown(m)
}
var xxx_messageInfo_Params proto.InternalMessageInfo
func (m *Params) GetAllowedPublicKeys() map[string]*KeyInfo {
if m != nil {
return m.AllowedPublicKeys
}
return nil
}
func (m *Params) GetConveyancePreference() string {
if m != nil {
return m.ConveyancePreference
}
return ""
}
func (m *Params) GetAttestationFormats() []string {
if m != nil {
return m.AttestationFormats
}
return nil
}
// KeyInfo defines information for accepted PubKey types
type KeyInfo struct {
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"`
Encoding string `protobuf:"bytes,3,opt,name=encoding,proto3" json:"encoding,omitempty"`
Curve string `protobuf:"bytes,4,opt,name=curve,proto3" json:"curve,omitempty"`
}
func (m *KeyInfo) Reset() { *m = KeyInfo{} }
func (m *KeyInfo) String() string { return proto.CompactTextString(m) }
func (*KeyInfo) ProtoMessage() {}
func (*KeyInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_9d62d07335ae093e, []int{1}
}
func (m *KeyInfo) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *KeyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_KeyInfo.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 *KeyInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyInfo.Merge(m, src)
}
func (m *KeyInfo) XXX_Size() int {
return m.Size()
}
func (m *KeyInfo) XXX_DiscardUnknown() {
xxx_messageInfo_KeyInfo.DiscardUnknown(m)
}
var xxx_messageInfo_KeyInfo proto.InternalMessageInfo
func (m *KeyInfo) GetRole() string {
if m != nil {
return m.Role
}
return ""
}
func (m *KeyInfo) GetAlgorithm() string {
if m != nil {
return m.Algorithm
}
return ""
}
func (m *KeyInfo) GetEncoding() string {
if m != nil {
return m.Encoding
}
return ""
}
func (m *KeyInfo) GetCurve() string {
if m != nil {
return m.Curve
}
return ""
}
func init() {
proto.RegisterType((*Params)(nil), "did.v1.Params")
proto.RegisterMapType((map[string]*KeyInfo)(nil), "did.v1.Params.AllowedPublicKeysEntry")
proto.RegisterType((*KeyInfo)(nil), "did.v1.KeyInfo")
}
func init() { proto.RegisterFile("did/v1/params.proto", fileDescriptor_9d62d07335ae093e) }
var fileDescriptor_9d62d07335ae093e = []byte{
// 412 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00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7, 0xc8, 0xa4, 0xb9, 0xac, 0x57, 0x61, 0x82, 0x05, 0x47, 0x55, 0xa1, 0xd2,
0xdc, 0x86, 0x0f, 0xbc, 0xdb, 0xd6, 0xb4, 0x25, 0x54, 0xab, 0x91, 0xfd, 0xeb, 0xd3, 0xdf, 0x01,
0x00, 0x00, 0xff, 0xff, 0xd2, 0xa2, 0x88, 0x53, 0x33, 0x02, 0x00, 0x00,
}
func (this *Params) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Params)
if !ok {
that2, ok := that.(Params)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if len(this.AllowedPublicKeys) != len(that1.AllowedPublicKeys) {
return false
}
for i := range this.AllowedPublicKeys {
if !this.AllowedPublicKeys[i].Equal(that1.AllowedPublicKeys[i]) {
return false
}
}
if this.ConveyancePreference != that1.ConveyancePreference {
return false
}
if len(this.AttestationFormats) != len(that1.AttestationFormats) {
return false
}
for i := range this.AttestationFormats {
if this.AttestationFormats[i] != that1.AttestationFormats[i] {
return false
}
}
return true
}
func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.AttestationFormats) > 0 {
for iNdEx := len(m.AttestationFormats) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.AttestationFormats[iNdEx])
copy(dAtA[i:], m.AttestationFormats[iNdEx])
i = encodeVarintParams(dAtA, i, uint64(len(m.AttestationFormats[iNdEx])))
i--
dAtA[i] = 0x22
}
}
if len(m.ConveyancePreference) > 0 {
i -= len(m.ConveyancePreference)
copy(dAtA[i:], m.ConveyancePreference)
i = encodeVarintParams(dAtA, i, uint64(len(m.ConveyancePreference)))
i--
dAtA[i] = 0x1a
}
if len(m.AllowedPublicKeys) > 0 {
for k := range m.AllowedPublicKeys {
v := m.AllowedPublicKeys[k]
baseI := i
if v != nil {
{
size, err := v.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintParams(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
i -= len(k)
copy(dAtA[i:], k)
i = encodeVarintParams(dAtA, i, uint64(len(k)))
i--
dAtA[i] = 0xa
i = encodeVarintParams(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0x12
}
}
return len(dAtA) - i, nil
}
func (m *KeyInfo) 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 *KeyInfo) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *KeyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Curve) > 0 {
i -= len(m.Curve)
copy(dAtA[i:], m.Curve)
i = encodeVarintParams(dAtA, i, uint64(len(m.Curve)))
i--
dAtA[i] = 0x22
}
if len(m.Encoding) > 0 {
i -= len(m.Encoding)
copy(dAtA[i:], m.Encoding)
i = encodeVarintParams(dAtA, i, uint64(len(m.Encoding)))
i--
dAtA[i] = 0x1a
}
if len(m.Algorithm) > 0 {
i -= len(m.Algorithm)
copy(dAtA[i:], m.Algorithm)
i = encodeVarintParams(dAtA, i, uint64(len(m.Algorithm)))
i--
dAtA[i] = 0x12
}
if len(m.Role) > 0 {
i -= len(m.Role)
copy(dAtA[i:], m.Role)
i = encodeVarintParams(dAtA, i, uint64(len(m.Role)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintParams(dAtA []byte, offset int, v uint64) int {
offset -= sovParams(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Params) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.AllowedPublicKeys) > 0 {
for k, v := range m.AllowedPublicKeys {
_ = k
_ = v
l = 0
if v != nil {
l = v.Size()
l += 1 + sovParams(uint64(l))
}
mapEntrySize := 1 + len(k) + sovParams(uint64(len(k))) + l
n += mapEntrySize + 1 + sovParams(uint64(mapEntrySize))
}
}
l = len(m.ConveyancePreference)
if l > 0 {
n += 1 + l + sovParams(uint64(l))
}
if len(m.AttestationFormats) > 0 {
for _, s := range m.AttestationFormats {
l = len(s)
n += 1 + l + sovParams(uint64(l))
}
}
return n
}
func (m *KeyInfo) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Role)
if l > 0 {
n += 1 + l + sovParams(uint64(l))
}
l = len(m.Algorithm)
if l > 0 {
n += 1 + l + sovParams(uint64(l))
}
l = len(m.Encoding)
if l > 0 {
n += 1 + l + sovParams(uint64(l))
}
l = len(m.Curve)
if l > 0 {
n += 1 + l + sovParams(uint64(l))
}
return n
}
func sovParams(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozParams(x uint64) (n int) {
return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Params) 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 ErrIntOverflowParams
}
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: Params: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AllowedPublicKeys", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthParams
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.AllowedPublicKeys == nil {
m.AllowedPublicKeys = make(map[string]*KeyInfo)
}
var mapkey string
var mapvalue *KeyInfo
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
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 ErrIntOverflowParams
}
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 ErrInvalidLengthParams
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthParams
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var mapmsglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapmsglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if mapmsglen < 0 {
return ErrInvalidLengthParams
}
postmsgIndex := iNdEx + mapmsglen
if postmsgIndex < 0 {
return ErrInvalidLengthParams
}
if postmsgIndex > l {
return io.ErrUnexpectedEOF
}
mapvalue = &KeyInfo{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err
}
iNdEx = postmsgIndex
} else {
iNdEx = entryPreIndex
skippy, err := skipParams(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthParams
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.AllowedPublicKeys[mapkey] = mapvalue
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ConveyancePreference", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
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 ErrInvalidLengthParams
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ConveyancePreference = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AttestationFormats", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
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 ErrInvalidLengthParams
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.AttestationFormats = append(m.AttestationFormats, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipParams(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthParams
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *KeyInfo) 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 ErrIntOverflowParams
}
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: KeyInfo: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: KeyInfo: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
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 ErrInvalidLengthParams
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Role = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
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 ErrInvalidLengthParams
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Algorithm = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
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 ErrInvalidLengthParams
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Encoding = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Curve", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
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 ErrInvalidLengthParams
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Curve = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipParams(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthParams
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipParams(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowParams
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowParams
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowParams
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthParams
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupParams
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthParams
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowParams = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
+30 -30
View File
@@ -456,37 +456,37 @@ func init() {
func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) }
var fileDescriptor_ae1fa9bb626e2869 = []byte{
// 478 bytes of a gzipped FileDescriptorProto
// 474 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x53, 0xc1, 0x6e, 0xd3, 0x40,
0x10, 0x8d, 0x53, 0xe2, 0xb6, 0x03, 0x94, 0xb0, 0x35, 0x91, 0x15, 0x22, 0x0b, 0xed, 0x01, 0x21,
0x81, 0x6c, 0xa5, 0x5c, 0xe1, 0x82, 0xfa, 0x01, 0xe0, 0x22, 0x0e, 0x5c, 0xc0, 0xed, 0x0e, 0x66,
0xd5, 0x64, 0xd7, 0xf5, 0xae, 0x2d, 0x2c, 0x04, 0x07, 0xbe, 0x00, 0xa9, 0x77, 0xbe, 0x87, 0x63,
0x25, 0x2e, 0x1c, 0x51, 0xc2, 0x87, 0xa0, 0xac, 0xd7, 0x25, 0x1b, 0x89, 0x23, 0xea, 0xc5, 0xf2,
0xbc, 0x79, 0xf3, 0xe6, 0x8d, 0x67, 0x0c, 0x84, 0x71, 0x96, 0xd4, 0xd3, 0xe4, 0xac, 0xc2, 0xb2,
0x89, 0x8b, 0x52, 0x6a, 0x49, 0x7c, 0xc6, 0x59, 0x5c, 0x4f, 0xc7, 0x81, 0xcd, 0xe5, 0x28, 0x50,
0x71, 0xd5, 0x66, 0xc7, 0xfb, 0x16, 0x2d, 0xb2, 0x32, 0x9b, 0x77, 0xe0, 0x24, 0x97, 0x32, 0x9f,
0x61, 0x92, 0x15, 0x3c, 0xc9, 0x84, 0x90, 0x3a, 0xd3, 0x5c, 0x0a, 0x9b, 0xa5, 0x6f, 0xe1, 0xc6,
0x8b, 0x95, 0x7e, 0x8a, 0x67, 0x15, 0x2a, 0x4d, 0x86, 0xb0, 0xc5, 0x38, 0x0b, 0xbd, 0x7b, 0xde,
0x83, 0xdd, 0x74, 0xf5, 0x4a, 0x46, 0xe0, 0xcb, 0x92, 0xe7, 0x5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 0xcb, 0xc4,
0x3e, 0xde, 0x5b, 0x1d, 0xd3, 0x14, 0xa8, 0x8f, 0x7c, 0xfb, 0x0b, 0x3f, 0xfa, 0x1d, 0x00, 0x00,
0xff, 0xff, 0x3f, 0xf8, 0xe6, 0x18, 0x14, 0x04, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
+49 -50
View File
@@ -783,56 +783,55 @@ func init() {
func init() { proto.RegisterFile("did/v1/tx.proto", fileDescriptor_d73284df019ff211) }
var fileDescriptor_d73284df019ff211 = []byte{
// 775 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x4e, 0xdb, 0x4a,
0x14, 0x8e, 0x09, 0x04, 0x72, 0x48, 0x08, 0x77, 0x6e, 0xae, 0x62, 0x2c, 0x48, 0x22, 0x23, 0x74,
0x11, 0x2a, 0x89, 0xa0, 0x52, 0x85, 0x68, 0xd5, 0x0a, 0x54, 0x2a, 0x10, 0x8d, 0xd4, 0xba, 0x74,
0xc3, 0x26, 0x35, 0xf6, 0xc8, 0x71, 0x49, 0x3c, 0x91, 0x67, 0x82, 0x92, 0x5d, 0xd5, 0x27, 0xe8,
0x0b, 0xf4, 0x09, 0xba, 0x61, 0xd1, 0x55, 0xd5, 0x07, 0x60, 0x89, 0xba, 0xea, 0xaa, 0xaa, 0x40,
0x2a, 0x4f, 0xd0, 0x65, 0xa5, 0x6a, 0xfc, 0x17, 0x3b, 0x3f, 0x05, 0x01, 0xea, 0x26, 0xf2, 0x39,
0xdf, 0x39, 0xdf, 0x7c, 0xe7, 0xf3, 0xcc, 0xc4, 0x90, 0xd1, 0x4d, 0xbd, 0x7c, 0xb4, 0x52, 0x66,
0xed, 0x52, 0xd3, 0x26, 0x8c, 0xa0, 0x84, 0x6e, 0xea, 0xa5, 0xa3, 0x15, 0x29, 0xa7, 0x11, 0xda,
0x20, 0xb4, 0xdc, 0xa0,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, 0x36, 0xa4, 0x22, 0xbb,
0x2b, 0x17, 0x6e, 0x0c, 0x01, 0x52, 0x61, 0x08, 0xe0, 0x33, 0x49, 0x63, 0x6f, 0x2e, 0x8e, 0x97,
0x84, 0xcd, 0x07, 0x27, 0x67, 0x79, 0xe1, 0xf4, 0x2c, 0x2f, 0x7c, 0x3f, 0xcb, 0x0b, 0xef, 0xce,
0xf3, 0xb1, 0xd3, 0xf3, 0x7c, 0xec, 0xeb, 0x79, 0x3e, 0xb6, 0x2f, 0x1b, 0x26, 0xab, 0xb5, 0x0e,
0x4a, 0x1a, 0x69, 0x94, 0x89, 0x45, 0x89, 0x65, 0x97, 0x9d, 0x9f, 0x76, 0x99, 0x7f, 0x9c, 0xb0,
0x4e, 0x13, 0xd3, 0x83, 0x84, 0xf3, 0x0d, 0x72, 0xf7, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35,
0x86, 0x16, 0x4d, 0x13, 0x09, 0x00, 0x00,
// 767 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x4e, 0xdb, 0x4c,
0x14, 0xcd, 0x10, 0x08, 0xe4, 0x92, 0x10, 0xbe, 0x51, 0x3e, 0xc5, 0x58, 0x90, 0x44, 0x46, 0xa8,
0x08, 0x95, 0x44, 0x50, 0xa9, 0x42, 0xb4, 0x6a, 0x05, 0x2a, 0x15, 0x88, 0x46, 0x6a, 0x5d, 0xba,
0x61, 0x93, 0x1a, 0x7b, 0xe4, 0xb8, 0x24, 0x9e, 0xc8, 0x33, 0x41, 0xc9, 0xae, 0xea, 0x13, 0xf4,
0x05, 0xfa, 0x04, 0xdd, 0xb0, 0xe8, 0xaa, 0xea, 0x03, 0xb0, 0x44, 0x5d, 0x75, 0x55, 0x55, 0x20,
0x95, 0x27, 0xe8, 0xb2, 0x52, 0x35, 0x76, 0xe2, 0xd8, 0xf9, 0x29, 0x08, 0x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, 0x05, 0xa4, 0x7a, 0x0f, 0xab, 0x1c, 0xe8, 0xec, 0xc1,
0x64, 0x65, 0x38, 0xe6, 0x53, 0xbe, 0x86, 0xf4, 0xc0, 0x73, 0x90, 0xeb, 0xef, 0x0d, 0x4b, 0xbe,
0x73, 0x49, 0x81, 0xbf, 0xc2, 0x36, 0x24, 0x42, 0xbb, 0x2b, 0x13, 0x6c, 0x0c, 0x00, 0x72, 0x6e,
0x08, 0xd0, 0x61, 0x92, 0xc7, 0xde, 0x5e, 0x1c, 0x2f, 0xa1, 0xcd, 0x87, 0x27, 0x67, 0x59, 0x74,
0x7a, 0x96, 0x45, 0x3f, 0xce, 0xb2, 0xe8, 0xfd, 0x79, 0x36, 0x72, 0x7a, 0x9e, 0x8d, 0x7c, 0x3b,
0xcf, 0x46, 0xf6, 0x15, 0xd3, 0xe2, 0x95, 0xc6, 0x41, 0x41, 0xa7, 0xb5, 0x22, 0xb5, 0x19, 0xb5,
0x9d, 0xa2, 0xfb, 0xd3, 0x2c, 0x8a, 0xaf, 0x13, 0xde, 0xaa, 0x13, 0x76, 0x10, 0x73, 0xbf, 0x41,
0xee, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x93, 0x06, 0x64, 0x08, 0xfe, 0x08, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.