feature/did accounts (#23)

* feat: add support for DID number as primary key for Controllers

* refactor: rename pkg/proxy to app/proxy

* feat: add vault module keeper tests

* feat(vault): add DID keeper to vault module

* refactor: move vault client code to its own package

* refactor(vault): extract schema definition

* refactor: use vaulttypes for MsgAllocateVault

* refactor: update vault assembly logic to use new methods

* feat: add dwn-proxy command

* refactor: remove unused context.go file

* refactor: remove unused web-related code

* feat: add DWN proxy server

* feat: add BuildTx RPC to vault module

* fix: Implement BuildTx endpoint

* feat: add devbox integration to project
This commit is contained in:
Prad Nukala
2024-09-25 19:45:28 -04:00
committed by GitHub
parent 97b3f9836a
commit 60c48d2409
216 changed files with 18162 additions and 9232 deletions
-165
View File
@@ -1,165 +0,0 @@
package keeper
import (
"context"
"crypto/sha256"
"fmt"
"time"
nftkeeper "cosmossdk.io/x/nft/keeper"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/ipfs/boxo/path"
"github.com/ipfs/kubo/client/rpc"
"github.com/ipfs/kubo/core/coreiface/options"
"github.com/onsonr/sonr/pkg/vault"
"github.com/onsonr/sonr/x/did/types"
"google.golang.org/grpc/peer"
"gopkg.in/macaroon.v2"
)
func (k Keeper) UnwrapCtx(goCtx context.Context) Context {
ctx := sdk.UnwrapSDKContext(goCtx)
peer, _ := peer.FromContext(goCtx)
return Context{SDKCtx: ctx, Peer: peer, Keeper: k}
}
type Context struct {
SDKCtx sdk.Context
Keeper Keeper
Peer *peer.Peer
NFTKeeper nftkeeper.Keeper
}
// AssembleVault assembles the initial vault
func (k Keeper) AssembleVault(ctx Context, subject string, origin string) (string, int64, error) {
v, err := vault.New(subject, origin, "sonr-testnet")
if err != nil {
return "", 0, err
}
cid, err := k.ipfsClient.Unixfs().Add(context.Background(), v.FS)
if err != nil {
return "", 0, err
}
return cid.String(), ctx.CalculateExpiration(time.Second * 15), nil
}
// AverageBlockTime returns the average block time in seconds
func (c Context) AverageBlockTime() float64 {
return float64(c.SDK().BlockTime().Sub(c.SDK().BlockTime()).Seconds())
}
// GetExpirationBlockHeight returns the block height at which the given duration will have passed
func (c Context) CalculateExpiration(duration time.Duration) int64 {
return c.SDKCtx.BlockHeight() + int64(duration.Seconds()/c.AverageBlockTime())
}
// IPFSConnected returns true if the IPFS client is initialized
func (c Context) IPFSConnected() bool {
if c.Keeper.ipfsClient == nil {
ipfsClient, err := rpc.NewLocalApi()
if err != nil {
return false
}
c.Keeper.ipfsClient = ipfsClient
}
return c.Keeper.ipfsClient != nil
}
func (c Context) IsAnonymous() bool {
if c.Peer == nil {
return true
}
return c.Peer.Addr == nil
}
// IssueMacaroon creates a macaroon with the specified parameters.
func (c Context) IssueMacaroon(sharedMPCPubKey, location, id string, blockExpiry uint64) (*macaroon.Macaroon, error) {
// Derive the root key by hashing the shared MPC public key
rootKey := sha256.Sum256([]byte(sharedMPCPubKey))
// Create the macaroon
m, err := macaroon.New(rootKey[:], []byte(id), location, macaroon.LatestVersion)
if err != nil {
return nil, err
}
// Add the block expiry caveat
caveat := fmt.Sprintf("block-expiry=%d", blockExpiry)
err = m.AddFirstPartyCaveat([]byte(caveat))
if err != nil {
return nil, err
}
return m, nil
}
func (c Context) Params() *types.Params {
p, err := c.Keeper.Params.Get(c.SDK())
if err != nil {
p = types.DefaultParams()
}
params := p.ActiveParams(c.IPFSConnected())
return &params
}
func (c Context) PeerID() string {
if c.Peer == nil {
return ""
}
return c.Peer.Addr.String()
}
// PinVaultController pins the initial vault to the local IPFS node
func (k Keeper) PinVaultController(_ sdk.Context, cid string, address string) (bool, error) {
// Resolve the path
path, err := path.NewPath(cid)
if err != nil {
return false, err
}
// 1. Initialize vault.db sqlite database in local IPFS with Mount
// 2. Insert the InitialWalletAccounts
// 3. Publish the path to the IPNS
_, err = k.ipfsClient.Name().Publish(context.Background(), path, options.Name.Key(address))
if err != nil {
return false, err
}
// 4. Insert the accounts into x/auth
// 5. Insert the controller into state
return true, nil
}
func (c Context) SDK() sdk.Context {
return c.SDKCtx
}
// ValidateOrigin checks if a service origin is valid
func (c Context) ValidateOrigin(origin string) error {
if origin == "localhost" {
return nil
}
return types.ErrInvalidServiceOrigin
}
// VerifyMinimumStake checks if a validator has a minimum stake
func (c Context) VerifyMinimumStake(addr string) bool {
address, err := sdk.AccAddressFromBech32(addr)
if err != nil {
return false
}
addval, err := sdk.ValAddressFromBech32(addr)
if err != nil {
return false
}
del, err := c.Keeper.StakingKeeper.GetDelegation(c.SDK(), address, addval)
if err != nil {
return false
}
if del.Shares.IsZero() {
return false
}
return del.Shares.IsPositive()
}
+27
View File
@@ -0,0 +1,27 @@
package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/onsonr/crypto/mpc"
"github.com/onsonr/sonr/x/did/types"
)
func (k Keeper) NewController(ctx sdk.Context) (uint64, types.ControllerI, error) {
shares, err := mpc.GenerateKeyshares()
if err != nil {
return 0, nil, err
}
controller, err := types.NewController(shares)
if err != nil {
return 0, nil, err
}
entry, err := controller.GetTableEntry()
if err != nil {
return 0, nil, err
}
num, err := k.OrmDB.ControllerTable().InsertReturningNumber(ctx, entry)
if err != nil {
return 0, nil, err
}
return num, controller, nil
}
+6 -32
View File
@@ -4,9 +4,8 @@ import (
"context"
"cosmossdk.io/log"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/ipfs/boxo/path"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/onsonr/sonr/x/did/types"
)
@@ -32,41 +31,16 @@ func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState {
}
// this line is used by starport scaffolding # genesis/module/export
return &types.GenesisState{
Params: params,
}
}
// CheckValidatorExists checks if a validator exists
func (k Keeper) CheckValidatorExists(ctx sdk.Context, addr string) bool {
address, err := sdk.ValAddressFromBech32(addr)
// CurrentSchema returns the current schema
func (k Keeper) CurrentParams(ctx sdk.Context) (*types.Params, error) {
p, err := k.Params.Get(ctx)
if err != nil {
return false
return nil, err
}
ok, err := k.StakingKeeper.Validator(ctx, address)
if err != nil {
return false
}
if ok != nil {
return true
}
return false
}
// HasPathInIPFS checks if a file is in the local IPFS node
func (k Keeper) HasPathInIPFS(ctx sdk.Context, cid string) (bool, error) {
path, err := path.NewPath(cid)
if err != nil {
return false, err
}
v, err := k.ipfsClient.Unixfs().Get(ctx, path)
if err != nil {
return false, err
}
if v == nil {
return false, nil
}
return true, nil
return &p, nil
}
+3 -18
View File
@@ -7,13 +7,11 @@ import (
"cosmossdk.io/orm/model/ormdb"
nftkeeper "cosmossdk.io/x/nft/keeper"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
stakkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
"github.com/ipfs/kubo/client/rpc"
apiv1 "github.com/onsonr/sonr/api/did/v1"
"github.com/onsonr/sonr/x/did/types"
@@ -34,8 +32,7 @@ type Keeper struct {
NftKeeper nftkeeper.Keeper
StakingKeeper *stakkeeper.Keeper
authority string
ipfsClient *rpc.HttpApi
authority string
}
// NewKeeper creates a new poa Keeper instance
@@ -66,11 +63,9 @@ func NewKeeper(
}
// Initialize IPFS client
ipfsClient, _ := rpc.NewLocalApi()
k := Keeper{
ipfsClient: ipfsClient,
cdc: cdc,
logger: logger,
cdc: cdc,
logger: logger,
Params: collections.NewItem(
sb,
types.ParamsKey,
@@ -91,13 +86,3 @@ func NewKeeper(
k.Schema = schema
return k
}
// VerifyServicePermissions checks if a service has permission
func (k Keeper) VerifyServicePermissions(
ctx sdk.Context,
addr string,
service string,
permissions string,
) bool {
return false
}
+29
View File
@@ -0,0 +1,29 @@
package keeper
import (
"crypto/sha256"
"fmt"
sdk "github.com/cosmos/cosmos-sdk/types"
"gopkg.in/macaroon.v2"
)
// IssueMacaroon creates a macaroon with the specified parameters.
func (k Keeper) IssueMacaroon(ctx sdk.Context, sharedMPCPubKey, location, id string, blockExpiry uint64) (*macaroon.Macaroon, error) {
// Derive the root key by hashing the shared MPC public key
rootKey := sha256.Sum256([]byte(sharedMPCPubKey))
// Create the macaroon
m, err := macaroon.New(rootKey[:], []byte(id), location, macaroon.LatestVersion)
if err != nil {
return nil, err
}
// Add the block expiry caveat
caveat := fmt.Sprintf("block-expiry=%d", blockExpiry)
err = m.AddFirstPartyCaveat([]byte(caveat))
if err != nil {
return nil, err
}
return m, nil
}
+9 -17
View File
@@ -3,6 +3,7 @@ package keeper
import (
"context"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/onsonr/sonr/x/did/types"
)
@@ -17,25 +18,16 @@ func NewQuerier(keeper Keeper) Querier {
}
// Params returns the total set of did parameters.
func (k Querier) Params(
goCtx context.Context,
req *types.QueryRequest,
) (*types.QueryParamsResponse, error) {
ctx := k.UnwrapCtx(goCtx)
return &types.QueryParamsResponse{Params: ctx.Params()}, nil
func (k Querier) Params(goCtx context.Context, req *types.QueryRequest) (*types.QueryParamsResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
p, err := k.Keeper.CurrentParams(ctx)
if err != nil {
return nil, err
}
return &types.QueryParamsResponse{Params: p}, nil
}
// Resolve implements types.QueryServer.
func (k Querier) Resolve(
goCtx context.Context,
req *types.QueryRequest,
) (*types.QueryResolveResponse, error) {
_ = k.UnwrapCtx(goCtx)
func (k Querier) Resolve(goCtx context.Context, req *types.QueryRequest) (*types.QueryResolveResponse, error) {
return &types.QueryResolveResponse{}, nil
}
// Sync implements types.QueryServer.
func (k Querier) Sync(goCtx context.Context, req *types.SyncRequest) (*types.SyncResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx)
return &types.SyncResponse{}, nil
}
+3 -47
View File
@@ -21,50 +21,14 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer {
return &msgServer{k: keeper}
}
// # AllocateVault
//
// AllocateVault implements types.MsgServer.
func (ms msgServer) AllocateVault(
goCtx context.Context,
msg *types.MsgAllocateVault,
) (*types.MsgAllocateVaultResponse, error) {
// 1.Check if the service origin is valid
ctx := ms.k.UnwrapCtx(goCtx)
if err := ctx.ValidateOrigin(msg.Origin); err != nil {
return nil, err
}
// 2.Allocate the vault
cid, expiryBlock, err := ms.k.AssembleVault(ctx, msg.GetSubject(), msg.GetOrigin())
if err != nil {
return nil, err
}
// 3.Return the response
return &types.MsgAllocateVaultResponse{
ExpiryBlock: expiryBlock,
Cid: cid,
}, nil
}
// # RegisterController
//
// RegisterController implements types.MsgServer.
func (ms msgServer) RegisterController(
goCtx context.Context,
msg *types.MsgRegisterController,
) (*types.MsgRegisterControllerResponse, error) {
func (ms msgServer) RegisterController(goCtx context.Context, msg *types.MsgRegisterController) (*types.MsgRegisterControllerResponse, error) {
_ = sdk.UnwrapSDKContext(goCtx)
return &types.MsgRegisterControllerResponse{}, nil
}
// # RegisterService
//
// RegisterService implements types.MsgServer.
func (ms msgServer) RegisterService(
goCtx context.Context,
msg *types.MsgRegisterService,
) (*types.MsgRegisterServiceResponse, error) {
func (ms msgServer) RegisterService(goCtx context.Context, msg *types.MsgRegisterService) (*types.MsgRegisterServiceResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx)
// 1.Check if the service origin is valid
@@ -74,8 +38,6 @@ func (ms msgServer) RegisterService(
return nil, errors.Wrapf(types.ErrInvalidServiceOrigin, "invalid service origin")
}
// # AuthorizeService
//
// AuthorizeService implements types.MsgServer.
func (ms msgServer) AuthorizeService(goCtx context.Context, msg *types.MsgAuthorizeService) (*types.MsgAuthorizeServiceResponse, error) {
if ms.k.authority != msg.Controller {
@@ -89,13 +51,8 @@ func (ms msgServer) AuthorizeService(goCtx context.Context, msg *types.MsgAuthor
return &types.MsgAuthorizeServiceResponse{}, nil
}
// # UpdateParams
//
// UpdateParams updates the x/did module parameters.
func (ms msgServer) UpdateParams(
ctx context.Context,
msg *types.MsgUpdateParams,
) (*types.MsgUpdateParamsResponse, error) {
func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
if ms.k.authority != msg.Authority {
return nil, errors.Wrapf(
govtypes.ErrInvalidSigner,
@@ -110,6 +67,5 @@ func (ms msgServer) UpdateParams(
// ExecuteTx implements types.MsgServer.
func (ms msgServer) ExecuteTx(ctx context.Context, msg *types.MsgExecuteTx) (*types.MsgExecuteTxResponse, error) {
// ctx := sdk.UnwrapSDKContext(goCtx)
panic("ExecuteTx is unimplemented")
return &types.MsgExecuteTxResponse{}, nil
}
+11
View File
@@ -1 +1,12 @@
package types
type SonrAccount struct {
ID string
Name string
Address string
PublicKey string
ChainCode string
Index string
Controller string
CreatedAt string
}
+55
View File
@@ -1 +1,56 @@
package types
import (
"crypto/ecdsa"
"strings"
"github.com/cosmos/cosmos-sdk/types/bech32"
ethcrypto "github.com/ethereum/go-ethereum/crypto"
"golang.org/x/crypto/sha3"
)
// ComputeSonrAddress computes the Sonr address from a public key
func ComputeSonrAddress(pk []byte) (string, error) {
sonrAddr, err := bech32.ConvertAndEncode("idx", pk)
if err != nil {
return "", err
}
return sonrAddr, nil
}
// ComputeBitcoinAddress computes the Bitcoin address from a public key
func ComputeBitcoinAddress(pk []byte) (string, error) {
btcAddr, err := bech32.ConvertAndEncode("bc", pk)
if err != nil {
return "", err
}
return btcAddr, nil
}
// ComputeEthAddress computes the Ethereum address from a public key
func ComputeEthAddress(pk *ecdsa.PublicKey) string {
// Generate Ethereum address
address := ethcrypto.PubkeyToAddress(*pk)
// Apply ERC-55 checksum encoding
addr := address.Hex()
addr = strings.ToLower(addr)
addr = strings.TrimPrefix(addr, "0x")
hash := sha3.NewLegacyKeccak256()
hash.Write([]byte(addr))
hashBytes := hash.Sum(nil)
result := "0x"
for i, c := range addr {
if c >= '0' && c <= '9' {
result += string(c)
} else {
if hashBytes[i/2]>>(4-i%2*4)&0xf >= 8 {
result += strings.ToUpper(string(c))
} else {
result += string(c)
}
}
}
return result
}
-35
View File
@@ -1,12 +1,6 @@
package types
import (
"crypto/ecdsa"
"strings"
ethcrypto "github.com/ethereum/go-ethereum/crypto"
"golang.org/x/crypto/sha3"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
@@ -32,7 +26,6 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgUpdateParams{}, ModuleName+"/MsgUpdateParams", nil)
cdc.RegisterConcrete(&MsgRegisterController{}, ModuleName+"/MsgRegisterController", nil)
cdc.RegisterConcrete(&MsgRegisterService{}, ModuleName+"/MsgRegisterService", nil)
cdc.RegisterConcrete(&MsgAllocateVault{}, ModuleName+"/MsgAllocateVault", nil)
}
func RegisterInterfaces(registry types.InterfaceRegistry) {
@@ -46,34 +39,6 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
&MsgUpdateParams{},
&MsgRegisterController{},
&MsgRegisterService{},
&MsgAllocateVault{},
)
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
func ComputeEthAddress(pk ecdsa.PublicKey) string {
// Generate Ethereum address
address := ethcrypto.PubkeyToAddress(pk)
// Apply ERC-55 checksum encoding
addr := address.Hex()
addr = strings.ToLower(addr)
addr = strings.TrimPrefix(addr, "0x")
hash := sha3.NewLegacyKeccak256()
hash.Write([]byte(addr))
hashBytes := hash.Sum(nil)
result := "0x"
for i, c := range addr {
if c >= '0' && c <= '9' {
result += string(c)
} else {
if hashBytes[i/2]>>(4-i%2*4)&0xf >= 8 {
result += strings.ToUpper(string(c))
} else {
result += string(c)
}
}
}
return result
}
+101
View File
@@ -0,0 +1,101 @@
package types
import (
fmt "fmt"
"github.com/onsonr/crypto/mpc"
didv1 "github.com/onsonr/sonr/api/did/v1"
)
type controller struct {
userKs mpc.Share
valKs mpc.Share
address string
chainID string
ethAddr string
btcAddr string
publicKey []byte
}
func (c *controller) GetTableEntry() (*didv1.Controller, error) {
valKs, err := c.valKs.Marshal()
if err != nil {
return nil, err
}
return &didv1.Controller{
KsVal: valKs,
Did: fmt.Sprintf("did:sonr:%s", c.address),
SonrAddress: c.address,
EthAddress: c.ethAddr,
BtcAddress: c.btcAddr,
PublicKey: c.publicKey,
}, nil
}
func (c *controller) ExportUserKs() (string, error) {
return c.userKs.Marshal()
}
func (c *controller) ChainID() string {
return c.chainID
}
func (c *controller) SonrAddress() string {
return c.address
}
func (c *controller) EthAddress() string {
return c.ethAddr
}
func (c *controller) BtcAddress() string {
return c.btcAddr
}
func (c *controller) PublicKey() []byte {
return c.publicKey
}
type ControllerI interface {
ChainID() string
SonrAddress() string
EthAddress() string
BtcAddress() string
PublicKey() []byte
GetTableEntry() (*didv1.Controller, error)
ExportUserKs() (string, error)
}
func NewController(shares []mpc.Share) (ControllerI, error) {
var (
valKs = shares[0]
userKs = shares[1]
)
pbBz := valKs.GetPublicKey()
sonrAddr, err := ComputeSonrAddress(pbBz)
if err != nil {
return nil, err
}
btcAddr, err := ComputeBitcoinAddress(pbBz)
if err != nil {
return nil, err
}
ecdsaPub, err := valKs.ECDSAPublicKey()
if err != nil {
return nil, err
}
ethAddr := ComputeEthAddress(ecdsaPub)
return &controller{
valKs: valKs,
userKs: userKs,
address: sonrAddr,
btcAddr: btcAddr,
ethAddr: ethAddr,
chainID: "sonr-testnet-1",
publicKey: pbBz,
}, nil
}
+10 -25
View File
@@ -6,12 +6,12 @@ import (
ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1"
"cosmossdk.io/collections"
"github.com/onsonr/sonr/internal/orm/assettype"
"github.com/onsonr/sonr/internal/orm/keyalgorithm"
"github.com/onsonr/sonr/internal/orm/keycurve"
"github.com/onsonr/sonr/internal/orm/keyencoding"
"github.com/onsonr/sonr/internal/orm/keyrole"
"github.com/onsonr/sonr/internal/orm/keytype"
"github.com/onsonr/sonr/x/did/types/orm/assettype"
"github.com/onsonr/sonr/x/did/types/orm/keyalgorithm"
"github.com/onsonr/sonr/x/did/types/orm/keycurve"
"github.com/onsonr/sonr/x/did/types/orm/keyencoding"
"github.com/onsonr/sonr/x/did/types/orm/keyrole"
"github.com/onsonr/sonr/x/did/types/orm/keytype"
)
// ParamsKey saves the current module params.
@@ -53,23 +53,13 @@ func (gs GenesisState) Validate() error {
return gs.Params.Validate()
}
// // DefaultNFTClasses configures the Initial DIDNamespace NFT classes
//
// func DefaultNFTClasses(nftGenesis *nft.GenesisState) error {
// for _, n := range DIDNamespace_value {
// nftGenesis.Classes = append(nftGenesis.Classes, DIDNamespace(n).GetNFTClass())
// }
// return nil
// }
//
// DefaultParams returns default module parameters.
func DefaultParams() Params {
return Params{
WhitelistedAssets: DefaultAssets(),
AllowedPublicKeys: DefaultKeyInfos(),
LocalhostRegistrationEnabled: true,
ConveyancePreference: "direct",
AttestationFormats: []string{"packed", "android-key", "fido-u2f", "apple"},
WhitelistedAssets: DefaultAssets(),
AllowedPublicKeys: DefaultKeyInfos(),
ConveyancePreference: "direct",
AttestationFormats: []string{"packed", "android-key", "fido-u2f", "apple"},
}
}
@@ -179,11 +169,6 @@ func DefaultKeyInfos() map[string]*KeyInfo {
}
}
func (p Params) ActiveParams(ipfsActive bool) Params {
p.IpfsActive = ipfsActive
return p
}
// Stringer method for Params.
func (p Params) String() string {
bz, err := json.Marshal(p)
+67 -159
View File
@@ -76,14 +76,10 @@ type Params struct {
WhitelistedAssets []*AssetInfo `protobuf:"bytes,1,rep,name=whitelisted_assets,json=whitelistedAssets,proto3" json:"whitelisted_assets,omitempty"`
// 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"`
// IpfsActive is a flag to enable/disable ipfs
IpfsActive bool `protobuf:"varint,3,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"`
// Localhost Registration Enabled
LocalhostRegistrationEnabled bool `protobuf:"varint,4,opt,name=localhost_registration_enabled,json=localhostRegistrationEnabled,proto3" json:"localhost_registration_enabled,omitempty"`
// ConveyancePreference defines the conveyance preference
ConveyancePreference string `protobuf:"bytes,5,opt,name=conveyance_preference,json=conveyancePreference,proto3" json:"conveyance_preference,omitempty"`
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,6,rep,name=attestation_formats,json=attestationFormats,proto3" json:"attestation_formats,omitempty"`
AttestationFormats []string `protobuf:"bytes,4,rep,name=attestation_formats,json=attestationFormats,proto3" json:"attestation_formats,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
@@ -132,20 +128,6 @@ func (m *Params) GetAllowedPublicKeys() map[string]*KeyInfo {
return nil
}
func (m *Params) GetIpfsActive() bool {
if m != nil {
return m.IpfsActive
}
return false
}
func (m *Params) GetLocalhostRegistrationEnabled() bool {
if m != nil {
return m.LocalhostRegistrationEnabled
}
return false
}
func (m *Params) GetConveyancePreference() string {
if m != nil {
return m.ConveyancePreference
@@ -350,7 +332,8 @@ type KeyInfo struct {
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"`
Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
// "Ed25519", "Ed448", "secp256k1"
Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
}
func (m *KeyInfo) Reset() { *m = KeyInfo{} }
@@ -709,69 +692,66 @@ func init() {
func init() { proto.RegisterFile("did/v1/genesis.proto", fileDescriptor_fda181cae44f7c00) }
var fileDescriptor_fda181cae44f7c00 = []byte{
// 983 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55,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 0xef, 0xf5, 0x65, 0xdb, 0xfb, 0xe3, 0xb2, 0xed, 0x7d, 0x7f, 0xd5, 0xde, 0x7a, 0x7d, 0xd5,
0xde, 0xfa, 0xed, 0xaa, 0xbd, 0xf5, 0x75, 0x77, 0xcc, 0xf4, 0x64, 0x36, 0xea, 0x45, 0x22, 0xed,
0x0b, 0xae, 0x04, 0x97, 0x7d, 0xfb, 0xb9, 0xe8, 0x9b, 0xb7, 0xd4, 0x90, 0xa8, 0x46, 0x65, 0xfb,
0x4f, 0x78, 0xff, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x47, 0x39, 0xad, 0x38, 0x52, 0x07, 0x00,
0x00,
}
func (this *Params) Equal(that interface{}) bool {
@@ -809,12 +789,6 @@ func (this *Params) Equal(that interface{}) bool {
return false
}
}
if this.IpfsActive != that1.IpfsActive {
return false
}
if this.LocalhostRegistrationEnabled != that1.LocalhostRegistrationEnabled {
return false
}
if this.ConveyancePreference != that1.ConveyancePreference {
return false
}
@@ -887,7 +861,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
copy(dAtA[i:], m.AttestationFormats[iNdEx])
i = encodeVarintGenesis(dAtA, i, uint64(len(m.AttestationFormats[iNdEx])))
i--
dAtA[i] = 0x32
dAtA[i] = 0x22
}
}
if len(m.ConveyancePreference) > 0 {
@@ -895,27 +869,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
copy(dAtA[i:], m.ConveyancePreference)
i = encodeVarintGenesis(dAtA, i, uint64(len(m.ConveyancePreference)))
i--
dAtA[i] = 0x2a
}
if m.LocalhostRegistrationEnabled {
i--
if m.LocalhostRegistrationEnabled {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x20
}
if m.IpfsActive {
i--
if m.IpfsActive {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x18
dAtA[i] = 0x1a
}
if len(m.AllowedPublicKeys) > 0 {
for k := range m.AllowedPublicKeys {
@@ -1448,12 +1402,6 @@ func (m *Params) Size() (n int) {
n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize))
}
}
if m.IpfsActive {
n += 2
}
if m.LocalhostRegistrationEnabled {
n += 2
}
l = len(m.ConveyancePreference)
if l > 0 {
n += 1 + l + sovGenesis(uint64(l))
@@ -1972,46 +1920,6 @@ func (m *Params) Unmarshal(dAtA []byte) error {
m.AllowedPublicKeys[mapkey] = mapvalue
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.IpfsActive = bool(v != 0)
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field LocalhostRegistrationEnabled", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.LocalhostRegistrationEnabled = bool(v != 0)
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ConveyancePreference", wireType)
}
@@ -2043,7 +1951,7 @@ func (m *Params) Unmarshal(dAtA []byte) error {
}
m.ConveyancePreference = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AttestationFormats", wireType)
}
-33
View File
@@ -83,39 +83,6 @@ func (msg *MsgRegisterService) Validate() error {
return nil
}
//
// [AllocateVault]
//
// NewMsgAllocateVault creates a new instance of MsgAllocateVault
func NewMsgAllocateVault(
sender sdk.Address,
) (*MsgAllocateVault, error) {
return &MsgAllocateVault{}, nil
}
// GetSigners returns the expected signers for a MsgUpdateParams message.
func (msg *MsgAllocateVault) GetSigners() []sdk.AccAddress {
addr, _ := sdk.AccAddressFromBech32(msg.Authority)
return []sdk.AccAddress{addr}
}
// Route returns the name of the module
func (msg MsgAllocateVault) Route() string { return ModuleName }
// Type returns the the action
func (msg MsgAllocateVault) Type() string { return "allocate_vault" }
// GetSignBytes implements the LegacyMsg interface.
func (msg MsgAllocateVault) GetSignBytes() []byte {
return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg))
}
// Vaalidate does a sanity check on the provided data.
func (msg *MsgAllocateVault) Validate() error {
return nil
}
//
// [RegisterController]
//
+20
View File
@@ -0,0 +1,20 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package orm
type Account struct {
Id string `pkl:"id" json:"id,omitempty" query:"id"`
Name string `pkl:"name" json:"name,omitempty"`
Address any `pkl:"address" json:"address,omitempty"`
PublicKey string `pkl:"publicKey" json:"publicKey,omitempty"`
ChainCode uint `pkl:"chainCode" json:"chainCode,omitempty"`
Index int `pkl:"index" json:"index,omitempty"`
Controller string `pkl:"controller" json:"controller,omitempty"`
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
}
+16
View File
@@ -0,0 +1,16 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package orm
type Asset struct {
Id string `pkl:"id" json:"id,omitempty" query:"id"`
Name string `pkl:"name" json:"name,omitempty"`
Symbol string `pkl:"symbol" json:"symbol,omitempty"`
Decimals int `pkl:"decimals" json:"decimals,omitempty"`
ChainCode uint `pkl:"chainCode" json:"chainCode,omitempty"`
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
}
+14
View File
@@ -0,0 +1,14 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package orm
type Chain struct {
Id string `pkl:"id" json:"id,omitempty" query:"id"`
Name string `pkl:"name" json:"name,omitempty"`
NetworkId string `pkl:"networkId" json:"networkId,omitempty"`
ChainCode uint `pkl:"chainCode" json:"chainCode,omitempty"`
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
}
+40
View File
@@ -0,0 +1,40 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package orm
type Credential struct {
Id string `pkl:"id" json:"id,omitempty" query:"id"`
Subject string `pkl:"subject" json:"subject,omitempty"`
Controller string `pkl:"controller" json:"controller,omitempty"`
AttestationType string `pkl:"attestationType" json:"attestationType,omitempty"`
Origin string `pkl:"origin" json:"origin,omitempty"`
Label *string `pkl:"label" json:"label,omitempty"`
DeviceId *string `pkl:"deviceId" json:"deviceId,omitempty"`
CredentialId string `pkl:"credentialId" json:"credentialId,omitempty"`
PublicKey string `pkl:"publicKey" json:"publicKey,omitempty"`
Transport []string `pkl:"transport" json:"transport,omitempty"`
SignCount uint `pkl:"signCount" json:"signCount,omitempty"`
UserPresent bool `pkl:"userPresent" json:"userPresent,omitempty"`
UserVerified bool `pkl:"userVerified" json:"userVerified,omitempty"`
BackupEligible bool `pkl:"backupEligible" json:"backupEligible,omitempty"`
BackupState bool `pkl:"backupState" json:"backupState,omitempty"`
CloneWarning bool `pkl:"cloneWarning" json:"cloneWarning,omitempty"`
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"`
}
+20
View File
@@ -0,0 +1,20 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package orm
type Grant struct {
Id uint `pkl:"id" json:"id,omitempty" query:"id"`
Subject string `pkl:"subject" json:"subject,omitempty"`
Controller string `pkl:"controller" json:"controller,omitempty"`
Origin string `pkl:"origin" json:"origin,omitempty"`
Token string `pkl:"token" json:"token,omitempty"`
Scopes []string `pkl:"scopes" json:"scopes,omitempty"`
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"`
}
+16
View File
@@ -0,0 +1,16 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package orm
type JWK struct {
Kty string `pkl:"kty" json:"kty,omitempty"`
Crv string `pkl:"crv" json:"crv,omitempty"`
X string `pkl:"x" json:"x,omitempty"`
Y string `pkl:"y" json:"y,omitempty"`
N string `pkl:"n" json:"n,omitempty"`
E string `pkl:"e" json:"e,omitempty"`
}
+14
View File
@@ -0,0 +1,14 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package orm
type Keyshare struct {
Id string `pkl:"id" json:"id,omitempty" query:"id"`
Data string `pkl:"data" json:"data,omitempty"`
Role int `pkl:"role" json:"role,omitempty"`
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
LastRefreshed *string `pkl:"lastRefreshed" json:"lastRefreshed,omitempty"`
}
+39
View File
@@ -0,0 +1,39 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package orm
import (
"context"
"github.com/apple/pkl-go/pkl"
)
type Models struct {
DbName string `pkl:"db_name"`
DbVersion int `pkl:"db_version"`
}
// LoadFromPath loads the pkl module at the given path and evaluates it into a Models
func LoadFromPath(ctx context.Context, path string) (ret *Models, err error) {
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
if err != nil {
return nil, err
}
defer func() {
cerr := evaluator.Close()
if err == nil {
err = cerr
}
}()
ret, err = Load(ctx, evaluator, pkl.FileSource(path))
return ret, err
}
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Models
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Models, error) {
var ret Models
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
return nil, err
}
return &ret, nil
}
+20
View File
@@ -0,0 +1,20 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package orm
type Profile struct {
Id string `pkl:"id" json:"id,omitempty" query:"id"`
Subject string `pkl:"subject" json:"subject,omitempty"`
Controller string `pkl:"controller" json:"controller,omitempty"`
OriginUri *string `pkl:"originUri" json:"originUri,omitempty"`
PublicMetadata *string `pkl:"publicMetadata" json:"publicMetadata,omitempty"`
PrivateMetadata *string `pkl:"privateMetadata" json:"privateMetadata,omitempty"`
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"`
}
+26
View File
@@ -0,0 +1,26 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package orm
import (
"github.com/onsonr/sonr/x/did/types/orm/keyalgorithm"
"github.com/onsonr/sonr/x/did/types/orm/keycurve"
"github.com/onsonr/sonr/x/did/types/orm/keyencoding"
"github.com/onsonr/sonr/x/did/types/orm/keyrole"
"github.com/onsonr/sonr/x/did/types/orm/keytype"
)
type PublicKey struct {
Role keyrole.KeyRole `pkl:"role" json:"role,omitempty" query:"role"`
Algorithm keyalgorithm.KeyAlgorithm `pkl:"algorithm"`
Encoding keyencoding.KeyEncoding `pkl:"encoding"`
Curve keycurve.KeyCurve `pkl:"curve"`
KeyType keytype.KeyType `pkl:"key_type"`
Raw string `pkl:"raw"`
Jwk *JWK `pkl:"jwk"`
}
@@ -0,0 +1,46 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package assettype
import (
"encoding"
"fmt"
)
type AssetType string
const (
Native AssetType = "native"
Wrapped AssetType = "wrapped"
Staking AssetType = "staking"
Pool AssetType = "pool"
Ibc AssetType = "ibc"
Cw20 AssetType = "cw20"
)
// String returns the string representation of AssetType
func (rcv AssetType) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(AssetType)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for AssetType.
func (rcv *AssetType) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "native":
*rcv = Native
case "wrapped":
*rcv = Wrapped
case "staking":
*rcv = Staking
case "pool":
*rcv = Pool
case "ibc":
*rcv = Ibc
case "cw20":
*rcv = Cw20
default:
return fmt.Errorf(`illegal: "%s" is not a valid AssetType`, str)
}
return nil
}
@@ -0,0 +1,52 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package didmethod
import (
"encoding"
"fmt"
)
type DIDMethod string
const (
Ipfs DIDMethod = "ipfs"
Sonr DIDMethod = "sonr"
Bitcoin DIDMethod = "bitcoin"
Ethereum DIDMethod = "ethereum"
Ibc DIDMethod = "ibc"
Webauthn DIDMethod = "webauthn"
Dwn DIDMethod = "dwn"
Service DIDMethod = "service"
)
// String returns the string representation of DIDMethod
func (rcv DIDMethod) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(DIDMethod)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for DIDMethod.
func (rcv *DIDMethod) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "ipfs":
*rcv = Ipfs
case "sonr":
*rcv = Sonr
case "bitcoin":
*rcv = Bitcoin
case "ethereum":
*rcv = Ethereum
case "ibc":
*rcv = Ibc
case "webauthn":
*rcv = Webauthn
case "dwn":
*rcv = Dwn
case "service":
*rcv = Service
default:
return fmt.Errorf(`illegal: "%s" is not a valid DIDMethod`, str)
}
return nil
}
+17
View File
@@ -0,0 +1,17 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package orm
import "github.com/apple/pkl-go/pkl"
func init() {
pkl.RegisterMapping("models", Models{})
pkl.RegisterMapping("models#Account", Account{})
pkl.RegisterMapping("models#Asset", Asset{})
pkl.RegisterMapping("models#Chain", Chain{})
pkl.RegisterMapping("models#Credential", Credential{})
pkl.RegisterMapping("models#JWK", JWK{})
pkl.RegisterMapping("models#Grant", Grant{})
pkl.RegisterMapping("models#Keyshare", Keyshare{})
pkl.RegisterMapping("models#PublicKey", PublicKey{})
pkl.RegisterMapping("models#Profile", Profile{})
}
@@ -0,0 +1,46 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package keyalgorithm
import (
"encoding"
"fmt"
)
type KeyAlgorithm string
const (
Es256 KeyAlgorithm = "es256"
Es384 KeyAlgorithm = "es384"
Es512 KeyAlgorithm = "es512"
Eddsa KeyAlgorithm = "eddsa"
Es256k KeyAlgorithm = "es256k"
Ecdsa KeyAlgorithm = "ecdsa"
)
// String returns the string representation of KeyAlgorithm
func (rcv KeyAlgorithm) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(KeyAlgorithm)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyAlgorithm.
func (rcv *KeyAlgorithm) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "es256":
*rcv = Es256
case "es384":
*rcv = Es384
case "es512":
*rcv = Es512
case "eddsa":
*rcv = Eddsa
case "es256k":
*rcv = Es256k
case "ecdsa":
*rcv = Ecdsa
default:
return fmt.Errorf(`illegal: "%s" is not a valid KeyAlgorithm`, str)
}
return nil
}
+58
View File
@@ -0,0 +1,58 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package keycurve
import (
"encoding"
"fmt"
)
type KeyCurve string
const (
P256 KeyCurve = "p256"
P384 KeyCurve = "p384"
P521 KeyCurve = "p521"
X25519 KeyCurve = "x25519"
X448 KeyCurve = "x448"
Ed25519 KeyCurve = "ed25519"
Ed448 KeyCurve = "ed448"
Secp256k1 KeyCurve = "secp256k1"
Bls12381 KeyCurve = "bls12381"
Keccak256 KeyCurve = "keccak256"
)
// String returns the string representation of KeyCurve
func (rcv KeyCurve) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(KeyCurve)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyCurve.
func (rcv *KeyCurve) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "p256":
*rcv = P256
case "p384":
*rcv = P384
case "p521":
*rcv = P521
case "x25519":
*rcv = X25519
case "x448":
*rcv = X448
case "ed25519":
*rcv = Ed25519
case "ed448":
*rcv = Ed448
case "secp256k1":
*rcv = Secp256k1
case "bls12381":
*rcv = Bls12381
case "keccak256":
*rcv = Keccak256
default:
return fmt.Errorf(`illegal: "%s" is not a valid KeyCurve`, str)
}
return nil
}
@@ -0,0 +1,37 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package keyencoding
import (
"encoding"
"fmt"
)
type KeyEncoding string
const (
Raw KeyEncoding = "raw"
Hex KeyEncoding = "hex"
Multibase KeyEncoding = "multibase"
)
// String returns the string representation of KeyEncoding
func (rcv KeyEncoding) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(KeyEncoding)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyEncoding.
func (rcv *KeyEncoding) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "raw":
*rcv = Raw
case "hex":
*rcv = Hex
case "multibase":
*rcv = Multibase
default:
return fmt.Errorf(`illegal: "%s" is not a valid KeyEncoding`, str)
}
return nil
}
+40
View File
@@ -0,0 +1,40 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package keyrole
import (
"encoding"
"fmt"
)
type KeyRole string
const (
Authentication KeyRole = "authentication"
Assertion KeyRole = "assertion"
Delegation KeyRole = "delegation"
Invocation KeyRole = "invocation"
)
// String returns the string representation of KeyRole
func (rcv KeyRole) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(KeyRole)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyRole.
func (rcv *KeyRole) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "authentication":
*rcv = Authentication
case "assertion":
*rcv = Assertion
case "delegation":
*rcv = Delegation
case "invocation":
*rcv = Invocation
default:
return fmt.Errorf(`illegal: "%s" is not a valid KeyRole`, str)
}
return nil
}
@@ -0,0 +1,34 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package keysharerole
import (
"encoding"
"fmt"
)
type KeyShareRole string
const (
User KeyShareRole = "user"
Validator KeyShareRole = "validator"
)
// String returns the string representation of KeyShareRole
func (rcv KeyShareRole) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(KeyShareRole)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyShareRole.
func (rcv *KeyShareRole) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "user":
*rcv = User
case "validator":
*rcv = Validator
default:
return fmt.Errorf(`illegal: "%s" is not a valid KeyShareRole`, str)
}
return nil
}
+55
View File
@@ -0,0 +1,55 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package keytype
import (
"encoding"
"fmt"
)
type KeyType string
const (
Octet KeyType = "octet"
Elliptic KeyType = "elliptic"
Rsa KeyType = "rsa"
Symmetric KeyType = "symmetric"
Hmac KeyType = "hmac"
Mpc KeyType = "mpc"
Zk KeyType = "zk"
Webauthn KeyType = "webauthn"
Bip32 KeyType = "bip32"
)
// String returns the string representation of KeyType
func (rcv KeyType) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(KeyType)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyType.
func (rcv *KeyType) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "octet":
*rcv = Octet
case "elliptic":
*rcv = Elliptic
case "rsa":
*rcv = Rsa
case "symmetric":
*rcv = Symmetric
case "hmac":
*rcv = Hmac
case "mpc":
*rcv = Mpc
case "zk":
*rcv = Zk
case "webauthn":
*rcv = Webauthn
case "bip32":
*rcv = Bip32
default:
return fmt.Errorf(`illegal: "%s" is not a valid KeyType`, str)
}
return nil
}
@@ -0,0 +1,46 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package permissiongrant
import (
"encoding"
"fmt"
)
type PermissionGrant string
const (
None PermissionGrant = "none"
Read PermissionGrant = "read"
Write PermissionGrant = "write"
Verify PermissionGrant = "verify"
Broadcast PermissionGrant = "broadcast"
Admin PermissionGrant = "admin"
)
// String returns the string representation of PermissionGrant
func (rcv PermissionGrant) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(PermissionGrant)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for PermissionGrant.
func (rcv *PermissionGrant) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "none":
*rcv = None
case "read":
*rcv = Read
case "write":
*rcv = Write
case "verify":
*rcv = Verify
case "broadcast":
*rcv = Broadcast
case "admin":
*rcv = Admin
default:
return fmt.Errorf(`illegal: "%s" is not a valid PermissionGrant`, str)
}
return nil
}
@@ -0,0 +1,49 @@
// Code generated from Pkl module `models`. DO NOT EDIT.
package permissionscope
import (
"encoding"
"fmt"
)
type PermissionScope string
const (
Profile PermissionScope = "profile"
Metadata PermissionScope = "metadata"
Permissions PermissionScope = "permissions"
Wallets PermissionScope = "wallets"
Transactions PermissionScope = "transactions"
User PermissionScope = "user"
Validator PermissionScope = "validator"
)
// String returns the string representation of PermissionScope
func (rcv PermissionScope) String() string {
return string(rcv)
}
var _ encoding.BinaryUnmarshaler = new(PermissionScope)
// UnmarshalBinary implements encoding.BinaryUnmarshaler for PermissionScope.
func (rcv *PermissionScope) UnmarshalBinary(data []byte) error {
switch str := string(data); str {
case "profile":
*rcv = Profile
case "metadata":
*rcv = Metadata
case "permissions":
*rcv = Permissions
case "wallets":
*rcv = Wallets
case "transactions":
*rcv = Transactions
case "user":
*rcv = User
case "validator":
*rcv = Validator
default:
return fmt.Errorf(`illegal: "%s" is not a valid PermissionScope`, str)
}
return nil
}
+26 -733
View File
@@ -97,75 +97,6 @@ func (m *QueryRequest) GetAsset() string {
return ""
}
// QueryResolveResponse is the response type for the Query/Resolve RPC method.
type QueryResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
Document *Document `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"`
Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"`
}
func (m *QueryResponse) Reset() { *m = QueryResponse{} }
func (m *QueryResponse) String() string { return proto.CompactTextString(m) }
func (*QueryResponse) ProtoMessage() {}
func (*QueryResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ae1fa9bb626e2869, []int{1}
}
func (m *QueryResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryResponse.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 *QueryResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryResponse.Merge(m, src)
}
func (m *QueryResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryResponse proto.InternalMessageInfo
func (m *QueryResponse) GetSuccess() bool {
if m != nil {
return m.Success
}
return false
}
func (m *QueryResponse) GetQuery() string {
if m != nil {
return m.Query
}
return ""
}
func (m *QueryResponse) GetDocument() *Document {
if m != nil {
return m.Document
}
return nil
}
func (m *QueryResponse) GetParams() *Params {
if m != nil {
return m.Params
}
return nil
}
// QueryParamsResponse is the response type for the Query/Params RPC method.
type QueryParamsResponse struct {
// params defines the parameters of the module.
@@ -176,7 +107,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} }
func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryParamsResponse) ProtoMessage() {}
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ae1fa9bb626e2869, []int{2}
return fileDescriptor_ae1fa9bb626e2869, []int{1}
}
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -222,7 +153,7 @@ func (m *QueryResolveResponse) Reset() { *m = QueryResolveResponse{} }
func (m *QueryResolveResponse) String() string { return proto.CompactTextString(m) }
func (*QueryResolveResponse) ProtoMessage() {}
func (*QueryResolveResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ae1fa9bb626e2869, []int{3}
return fileDescriptor_ae1fa9bb626e2869, []int{2}
}
func (m *QueryResolveResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -258,137 +189,39 @@ func (m *QueryResolveResponse) GetDocument() *Document {
return nil
}
// SyncRequest is the request type for the Sync RPC method.
type SyncRequest struct {
Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"`
}
func (m *SyncRequest) Reset() { *m = SyncRequest{} }
func (m *SyncRequest) String() string { return proto.CompactTextString(m) }
func (*SyncRequest) ProtoMessage() {}
func (*SyncRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ae1fa9bb626e2869, []int{4}
}
func (m *SyncRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_SyncRequest.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 *SyncRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncRequest.Merge(m, src)
}
func (m *SyncRequest) XXX_Size() int {
return m.Size()
}
func (m *SyncRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SyncRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SyncRequest proto.InternalMessageInfo
func (m *SyncRequest) GetDid() string {
if m != nil {
return m.Did
}
return ""
}
// SyncResponse is the response type for the Sync RPC method.
type SyncResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
}
func (m *SyncResponse) Reset() { *m = SyncResponse{} }
func (m *SyncResponse) String() string { return proto.CompactTextString(m) }
func (*SyncResponse) ProtoMessage() {}
func (*SyncResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ae1fa9bb626e2869, []int{5}
}
func (m *SyncResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *SyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_SyncResponse.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 *SyncResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncResponse.Merge(m, src)
}
func (m *SyncResponse) XXX_Size() int {
return m.Size()
}
func (m *SyncResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SyncResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SyncResponse proto.InternalMessageInfo
func (m *SyncResponse) GetSuccess() bool {
if m != nil {
return m.Success
}
return false
}
func init() {
proto.RegisterType((*QueryRequest)(nil), "did.v1.QueryRequest")
proto.RegisterType((*QueryResponse)(nil), "did.v1.QueryResponse")
proto.RegisterType((*QueryParamsResponse)(nil), "did.v1.QueryParamsResponse")
proto.RegisterType((*QueryResolveResponse)(nil), "did.v1.QueryResolveResponse")
proto.RegisterType((*SyncRequest)(nil), "did.v1.SyncRequest")
proto.RegisterType((*SyncResponse)(nil), "did.v1.SyncResponse")
}
func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) }
var fileDescriptor_ae1fa9bb626e2869 = []byte{
// 446 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x4f, 0x6b, 0xd4, 0x40,
0x14, 0xdf, 0x69, 0xbb, 0xd9, 0xf6, 0x75, 0xab, 0xe5, 0x35, 0x48, 0x58, 0x4b, 0x94, 0x39, 0x48,
0x0f, 0x92, 0xa1, 0xf5, 0xaa, 0x20, 0xd2, 0xa3, 0x07, 0x1b, 0x6f, 0x9e, 0x4c, 0x33, 0x43, 0x1c,
0xda, 0x9d, 0x49, 0x33, 0xc9, 0x62, 0x10, 0x2f, 0x7e, 0x02, 0x41, 0xfc, 0x4e, 0x1e, 0x0b, 0x5e,
0x3c, 0xca, 0xae, 0x27, 0x3f, 0x85, 0x64, 0x66, 0x52, 0x77, 0x85, 0xba, 0x97, 0x65, 0xdf, 0xef,
0xbd, 0xf7, 0xfb, 0xf3, 0x32, 0x80, 0x5c, 0x72, 0x36, 0x3b, 0x66, 0x57, 0x8d, 0xa8, 0xda, 0xa4,
0xac, 0x74, 0xad,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, 0x01, 0xec, 0xbe, 0x6e,
0x55, 0x7e, 0xeb, 0xf5, 0xe9, 0x11, 0x8c, 0xdd, 0xc0, 0xba, 0xdb, 0x9d, 0xfc, 0x26, 0x30, 0xb4,
0x8e, 0xf0, 0x25, 0x04, 0xce, 0x2c, 0x86, 0xbd, 0xf4, 0xf2, 0x37, 0x9e, 0xdc, 0x5f, 0x41, 0x57,
0xf3, 0xd3, 0xbb, 0x9f, 0xbe, 0xff, 0xfa, 0xb2, 0xb1, 0x83, 0x23, 0xe6, 0x82, 0xe2, 0x19, 0x8c,
0x7c, 0xc6, 0x5b, 0xe8, 0x0e, 0xff, 0x41, 0x57, 0xee, 0x41, 0xd1, 0xf2, 0x8d, 0x11, 0x58, 0xf7,
0x3a, 0x3f, 0x70, 0xc9, 0x3f, 0xe2, 0x73, 0xd8, 0xea, 0x42, 0xe1, 0x41, 0xbf, 0xb9, 0x74, 0x83,
0x49, 0xb8, 0x0a, 0x7a, 0x9a, 0x3d, 0x4b, 0x33, 0xa2, 0x43, 0x66, 0x5a, 0x95, 0xbf, 0x78, 0xfa,
0x6d, 0x1e, 0x93, 0xeb, 0x79, 0x4c, 0x7e, 0xce, 0x63, 0xf2, 0x79, 0x11, 0x0f, 0xae, 0x17, 0xf1,
0xe0, 0xc7, 0x22, 0x1e, 0xbc, 0xa1, 0x85, 0xac, 0xdf, 0x35, 0xe7, 0x49, 0xae, 0xa7, 0x4c, 0x2b,
0xa3, 0x55, 0xc5, 0xec, 0xcf, 0x7b, 0xab, 0x5f, 0xb7, 0xa5, 0x30, 0xe7, 0x81, 0x7d, 0xfb, 0x4f,
0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x31, 0x4b, 0x75, 0xe8, 0x4d, 0x03, 0x00, 0x00,
// 362 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x51, 0xc1, 0x4e, 0xea, 0x40,
0x14, 0xa5, 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xfa, 0xd3, 0xff, 0x1b,
0x94, 0x5b, 0x04, 0x46, 0x67, 0x58, 0x7f, 0x80, 0x1c, 0x13, 0x50, 0x8a, 0xe9, 0x02, 0xb6, 0xfd,
0xc7, 0xe8, 0x37, 0x15, 0xe3, 0x6c, 0x06, 0x5c, 0x19, 0x87, 0xf6, 0xc6, 0x61, 0x60, 0xf0, 0x70,
0xab, 0xe8, 0x3f, 0x5b, 0xa8, 0xae, 0x6d, 0xf0, 0x05, 0xb2, 0xcb, 0x09, 0xd8, 0xd9, 0xe8, 0xbf,
0x3e, 0x40, 0x67, 0x7f, 0x07, 0xdd, 0x0d, 0xed, 0xff, 0x7b, 0x78, 0xfd, 0x78, 0xaa, 0x36, 0x71,
0x83, 0x94, 0xe9, 0xf0, 0x10, 0x35, 0x4c, 0xb0, 0x1f, 0xec, 0xba, 0xdf, 0xd0, 0x9d, 0x25, 0x7c,
0xac, 0xfd, 0x5a, 0x18, 0x91, 0xe2, 0x74, 0x77, 0x94, 0xd1, 0xfb, 0xf3, 0xd3, 0x97, 0x95, 0x67,
0x2d, 0x57, 0x9e, 0xf5, 0xbe, 0xf2, 0xac, 0xc7, 0xb5, 0x57, 0x59, 0xae, 0xbd, 0xca, 0xdb, 0xda,
0xab, 0x5c, 0xf9, 0x31, 0x53, 0x37, 0xd9, 0x28, 0x18, 0x8b, 0x19, 0x11, 0x5c, 0x0a, 0x9e, 0x12,
0xfd, 0xb9, 0xd5, 0xdd, 0x2a, 0x4f, 0x40, 0x8e, 0x6c, 0x7d, 0xd6, 0x93, 0xcf, 0x00, 0x00, 0x00,
0xff, 0xff, 0x7d, 0xbe, 0x9f, 0x67, 0x28, 0x02, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -407,8 +240,6 @@ type QueryClient interface {
Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// Resolve queries the DID document by its id.
Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error)
// Sync queries the DID document by its id. And returns the required PKL information
Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error)
}
type queryClient struct {
@@ -437,23 +268,12 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grp
return out, nil
}
func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) {
out := new(SyncResponse)
err := c.cc.Invoke(ctx, "/did.v1.Query/Sync", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
type QueryServer interface {
// Params queries all parameters of the module.
Params(context.Context, *QueryRequest) (*QueryParamsResponse, error)
// Resolve queries the DID document by its id.
Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error)
// Sync queries the DID document by its id. And returns the required PKL information
Sync(context.Context, *SyncRequest) (*SyncResponse, error)
}
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
@@ -466,9 +286,6 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryRequest)
func (*UnimplementedQueryServer) Resolve(ctx context.Context, req *QueryRequest) (*QueryResolveResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented")
}
func (*UnimplementedQueryServer) Sync(ctx context.Context, req *SyncRequest) (*SyncResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented")
}
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv)
@@ -510,24 +327,6 @@ func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(inter
return interceptor(ctx, in, info, handler)
}
func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SyncRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Sync(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/did.v1.Query/Sync",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Sync(ctx, req.(*SyncRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "did.v1.Query",
HandlerType: (*QueryServer)(nil),
@@ -540,10 +339,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "Resolve",
Handler: _Query_Resolve_Handler,
},
{
MethodName: "Sync",
Handler: _Query_Sync_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "did/v1/query.proto",
@@ -600,70 +395,6 @@ func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *QueryResponse) 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 *QueryResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Params != nil {
{
size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x2a
}
if m.Document != nil {
{
size, err := m.Document.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
if len(m.Query) > 0 {
i -= len(m.Query)
copy(dAtA[i:], m.Query)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Query)))
i--
dAtA[i] = 0x12
}
if m.Success {
i--
if m.Success {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -734,69 +465,6 @@ func (m *QueryResolveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *SyncRequest) 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 *SyncRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *SyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Did) > 0 {
i -= len(m.Did)
copy(dAtA[i:], m.Did)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Did)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *SyncResponse) 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 *SyncResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *SyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Success {
i--
if m.Success {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
offset -= sovQuery(v)
base := offset
@@ -833,30 +501,6 @@ func (m *QueryRequest) Size() (n int) {
return n
}
func (m *QueryResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Success {
n += 2
}
l = len(m.Query)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
if m.Document != nil {
l = m.Document.Size()
n += 1 + l + sovQuery(uint64(l))
}
if m.Params != nil {
l = m.Params.Size()
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryParamsResponse) Size() (n int) {
if m == nil {
return 0
@@ -883,31 +527,6 @@ func (m *QueryResolveResponse) Size() (n int) {
return n
}
func (m *SyncRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Did)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *SyncResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Success {
n += 2
}
return n
}
func sovQuery(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -1092,180 +711,6 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *QueryResponse) 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 ErrIntOverflowQuery
}
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: QueryResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Success = bool(v != 0)
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
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 ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Query = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Document == nil {
m.Document = &Document{}
}
if err := m.Document.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Params == nil {
m.Params = &Params{}
}
if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -1438,158 +883,6 @@ func (m *QueryResolveResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *SyncRequest) 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 ErrIntOverflowQuery
}
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: SyncRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: SyncRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
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 ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Did = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *SyncResponse) 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 ErrIntOverflowQuery
}
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: SyncResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: SyncResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Success = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipQuery(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
-83
View File
@@ -141,42 +141,6 @@ func local_request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marsha
}
var (
filter_Query_Sync_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Sync_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.Sync(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Sync_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.Sync(ctx, &protoReq)
return msg, metadata, err
}
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
// UnaryRPC :call QueryServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -229,29 +193,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
})
mux.Handle("POST", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Query_Sync_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_Sync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -333,26 +274,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
})
mux.Handle("POST", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Query_Sync_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_Sync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -360,14 +281,10 @@ var (
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"params"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0}, []string{"did"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"sync"}, "", runtime.AssumeColonVerbOpt(false)))
)
var (
forward_Query_Params_0 = runtime.ForwardResponseMessage
forward_Query_Resolve_0 = runtime.ForwardResponseMessage
forward_Query_Sync_0 = runtime.ForwardResponseMessage
)
+146 -238
View File
@@ -90,23 +90,21 @@ func (m *Alias) GetOrigin() string {
// Controller represents a Sonr DWN Vault
type Controller struct {
// The unique identifier of the controller
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
// The unique identifier of the controller
Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"`
// The DID of the controller
SonrAddress string `protobuf:"bytes,2,opt,name=sonr_address,json=sonrAddress,proto3" json:"sonr_address,omitempty"`
SonrAddress string `protobuf:"bytes,3,opt,name=sonr_address,json=sonrAddress,proto3" json:"sonr_address,omitempty"`
// The DID of the controller
EthAddress string `protobuf:"bytes,3,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"`
EthAddress string `protobuf:"bytes,4,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"`
// The DID of the controller
BtcAddress string `protobuf:"bytes,4,opt,name=btc_address,json=btcAddress,proto3" json:"btc_address,omitempty"`
// Aliases of the controller
Aliases []string `protobuf:"bytes,5,rep,name=aliases,proto3" json:"aliases,omitempty"`
BtcAddress string `protobuf:"bytes,5,opt,name=btc_address,json=btcAddress,proto3" json:"btc_address,omitempty"`
// PubKey is the verification method
PublicKey *PubKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
// The vault address or identifier
VaultCid string `protobuf:"bytes,7,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"`
// The Authentications of the controller
Authentication []string `protobuf:"bytes,8,rep,name=authentication,proto3" json:"authentication,omitempty"`
PublicKey []byte `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
// Val Keyshare
KsVal string `protobuf:"bytes,7,opt,name=ks_val,json=ksVal,proto3" json:"ks_val,omitempty"`
// The Status of the claims for the controller
Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"`
Claimed bool `protobuf:"varint,8,opt,name=claimed,proto3" json:"claimed,omitempty"`
}
func (m *Controller) Reset() { *m = Controller{} }
@@ -142,9 +140,16 @@ func (m *Controller) XXX_DiscardUnknown() {
var xxx_messageInfo_Controller proto.InternalMessageInfo
func (m *Controller) GetId() string {
func (m *Controller) GetNumber() uint64 {
if m != nil {
return m.Id
return m.Number
}
return 0
}
func (m *Controller) GetDid() string {
if m != nil {
return m.Did
}
return ""
}
@@ -170,45 +175,31 @@ func (m *Controller) GetBtcAddress() string {
return ""
}
func (m *Controller) GetAliases() []string {
if m != nil {
return m.Aliases
}
return nil
}
func (m *Controller) GetPublicKey() *PubKey {
func (m *Controller) GetPublicKey() []byte {
if m != nil {
return m.PublicKey
}
return nil
}
func (m *Controller) GetVaultCid() string {
func (m *Controller) GetKsVal() string {
if m != nil {
return m.VaultCid
return m.KsVal
}
return ""
}
func (m *Controller) GetAuthentication() []string {
func (m *Controller) GetClaimed() bool {
if m != nil {
return m.Authentication
return m.Claimed
}
return nil
}
func (m *Controller) GetStatus() string {
if m != nil {
return m.Status
}
return ""
return false
}
// Verification reprsents a method of verifying membership in a DID
type Verification struct {
// The unique identifier of the verification
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"`
// The controller of the verification
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
// The DIDNamespace of the verification
@@ -219,7 +210,8 @@ type Verification struct {
Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"`
// The public key of the verification
PublicKey *PubKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
// The Verification Type (Authentication, Assertion, CapabilityDelegation, CapabilityInvocation)
// The Verification Type (Authentication, Assertion, CapabilityDelegation,
// CapabilityInvocation)
VerificationType string `protobuf:"bytes,7,opt,name=verification_type,json=verificationType,proto3" json:"verification_type,omitempty"`
}
@@ -256,9 +248,9 @@ func (m *Verification) XXX_DiscardUnknown() {
var xxx_messageInfo_Verification proto.InternalMessageInfo
func (m *Verification) GetId() string {
func (m *Verification) GetDid() string {
if m != nil {
return m.Id
return m.Did
}
return ""
}
@@ -314,42 +306,42 @@ func init() {
func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) }
var fileDescriptor_f44bb702879c34b4 = []byte{
// 557 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcb, 0x6e, 0xd3, 0x40,
0x14, 0xed, 0xd8, 0x79, 0x34, 0x37, 0x55, 0x70, 0x47, 0x55, 0x19, 0x15, 0x30, 0x21, 0x42, 0x55,
0x25, 0x42, 0xac, 0xc2, 0x2e, 0x62, 0x53, 0xba, 0xac, 0x90, 0x50, 0x85, 0x58, 0xb0, 0x89, 0x6c,
0xcf, 0x90, 0x4c, 0x9b, 0x78, 0x82, 0x67, 0x1c, 0x91, 0x9f, 0x40, 0xac, 0x59, 0xf0, 0x3d, 0x2c,
0x2b, 0xb1, 0x61, 0x83, 0x84, 0x92, 0x3f, 0xe0, 0x0b, 0xd0, 0x3c, 0x92, 0x38, 0xed, 0x8a, 0x8d,
0xa5, 0x7b, 0xe6, 0x78, 0xce, 0xbd, 0xe7, 0xdc, 0x01, 0x4c, 0x39, 0x8d, 0x66, 0xa7, 0x91, 0x54,
0xb1, 0x62, 0xbd, 0x69, 0x2e, 0x94, 0xc0, 0x35, 0xca, 0x69, 0x6f, 0x76, 0x7a, 0x74, 0x3f, 0x15,
0x72, 0x22, 0x64, 0x24, 0xf2, 0x89, 0xa6, 0x88, 0x7c, 0x62, 0x09, 0x47, 0x07, 0xee, 0xa7, 0x21,
0xcb, 0x98, 0xe4, 0xd2, 0xa2, 0x1d, 0x01, 0xd5, 0xb3, 0x31, 0x8f, 0x25, 0x6e, 0x81, 0xc7, 0x29,
0x41, 0x6d, 0x74, 0xd2, 0xb8, 0xf4, 0x38, 0xc5, 0x04, 0xea, 0xb2, 0x48, 0xae, 0x58, 0xaa, 0x88,
0x67, 0xc0, 0x55, 0x89, 0x0f, 0xa1, 0x26, 0x72, 0x3e, 0xe4, 0x19, 0xf1, 0xcd, 0x81, 0xab, 0xfa,
0x4f, 0xff, 0x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0xb0, 0x53, 0x80, 0x70, 0xff, 0x03, 0x00, 0x00,
// 550 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x93, 0xcf, 0x8e, 0xd3, 0x3e,
0x10, 0xc7, 0xd7, 0xe9, 0x9f, 0xdd, 0x4e, 0xab, 0x2a, 0x6b, 0xed, 0xef, 0x87, 0xb5, 0x82, 0x50,
0x2a, 0x84, 0x2a, 0x51, 0x1a, 0x2d, 0xdc, 0x2a, 0x2e, 0x0b, 0xc7, 0x15, 0x12, 0x2a, 0x68, 0x25,
0xb8, 0x54, 0x49, 0x6c, 0x5a, 0xd3, 0x24, 0x2e, 0xb1, 0x53, 0xd1, 0x97, 0x40, 0x3c, 0x01, 0x8f,
0x83, 0x38, 0xae, 0xc4, 0x85, 0xe3, 0xaa, 0x7d, 0x03, 0x9e, 0x00, 0xd9, 0x71, 0xda, 0x54, 0x7b,
0x89, 0x32, 0x5f, 0x7f, 0x3d, 0xe3, 0xf9, 0x78, 0x0c, 0x98, 0x72, 0xea, 0xaf, 0x2e, 0x7c, 0xa9,
0x02, 0xc5, 0x46, 0xcb, 0x4c, 0x28, 0x81, 0x9b, 0x94, 0xd3, 0xd1, 0xea, 0xe2, 0xfc, 0x5e, 0x24,
0x64, 0x22, 0xa4, 0x2f, 0xb2, 0x44, 0x5b, 0x44, 0x96, 0x14, 0x86, 0xf3, 0x33, 0xbb, 0x69, 0xc6,
0x52, 0x26, 0xb9, 0x2c, 0xd4, 0xbe, 0x80, 0xc6, 0x65, 0xcc, 0x03, 0x89, 0xbb, 0xe0, 0x70, 0x4a,
0x50, 0x0f, 0x0d, 0x5a, 0x13, 0x87, 0x53, 0x4c, 0xe0, 0x58, 0xe6, 0xe1, 0x67, 0x16, 0x29, 0xe2,
0x18, 0xb1, 0x0c, 0xf1, 0xff, 0xd0, 0x14, 0x19, 0x9f, 0xf1, 0x94, 0xd4, 0xcc, 0x82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 0x00, 0x00, 0xff, 0xff, 0x3b, 0x9f,
0x1c, 0x50, 0xae, 0x03, 0x00, 0x00,
}
func (m *Alias) Marshal() (dAtA []byte, err error) {
@@ -416,77 +408,62 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.Status) > 0 {
i -= len(m.Status)
copy(dAtA[i:], m.Status)
i = encodeVarintState(dAtA, i, uint64(len(m.Status)))
if m.Claimed {
i--
dAtA[i] = 0x4a
}
if len(m.Authentication) > 0 {
for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Authentication[iNdEx])
copy(dAtA[i:], m.Authentication[iNdEx])
i = encodeVarintState(dAtA, i, uint64(len(m.Authentication[iNdEx])))
i--
dAtA[i] = 0x42
if m.Claimed {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x40
}
if len(m.VaultCid) > 0 {
i -= len(m.VaultCid)
copy(dAtA[i:], m.VaultCid)
i = encodeVarintState(dAtA, i, uint64(len(m.VaultCid)))
if len(m.KsVal) > 0 {
i -= len(m.KsVal)
copy(dAtA[i:], m.KsVal)
i = encodeVarintState(dAtA, i, uint64(len(m.KsVal)))
i--
dAtA[i] = 0x3a
}
if m.PublicKey != nil {
{
size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintState(dAtA, i, uint64(size))
}
if len(m.PublicKey) > 0 {
i -= len(m.PublicKey)
copy(dAtA[i:], m.PublicKey)
i = encodeVarintState(dAtA, i, uint64(len(m.PublicKey)))
i--
dAtA[i] = 0x32
}
if len(m.Aliases) > 0 {
for iNdEx := len(m.Aliases) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Aliases[iNdEx])
copy(dAtA[i:], m.Aliases[iNdEx])
i = encodeVarintState(dAtA, i, uint64(len(m.Aliases[iNdEx])))
i--
dAtA[i] = 0x2a
}
}
if len(m.BtcAddress) > 0 {
i -= len(m.BtcAddress)
copy(dAtA[i:], m.BtcAddress)
i = encodeVarintState(dAtA, i, uint64(len(m.BtcAddress)))
i--
dAtA[i] = 0x22
dAtA[i] = 0x2a
}
if len(m.EthAddress) > 0 {
i -= len(m.EthAddress)
copy(dAtA[i:], m.EthAddress)
i = encodeVarintState(dAtA, i, uint64(len(m.EthAddress)))
i--
dAtA[i] = 0x1a
dAtA[i] = 0x22
}
if len(m.SonrAddress) > 0 {
i -= len(m.SonrAddress)
copy(dAtA[i:], m.SonrAddress)
i = encodeVarintState(dAtA, i, uint64(len(m.SonrAddress)))
i--
dAtA[i] = 0x1a
}
if len(m.Did) > 0 {
i -= len(m.Did)
copy(dAtA[i:], m.Did)
i = encodeVarintState(dAtA, i, uint64(len(m.Did)))
i--
dAtA[i] = 0x12
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintState(dAtA, i, uint64(len(m.Id)))
if m.Number != 0 {
i = encodeVarintState(dAtA, i, uint64(m.Number))
i--
dAtA[i] = 0xa
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
@@ -558,10 +535,10 @@ func (m *Verification) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x12
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintState(dAtA, i, uint64(len(m.Id)))
if len(m.Did) > 0 {
i -= len(m.Did)
copy(dAtA[i:], m.Did)
i = encodeVarintState(dAtA, i, uint64(len(m.Did)))
i--
dAtA[i] = 0xa
}
@@ -606,7 +583,10 @@ func (m *Controller) Size() (n int) {
}
var l int
_ = l
l = len(m.Id)
if m.Number != 0 {
n += 1 + sovState(uint64(m.Number))
}
l = len(m.Did)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
@@ -622,30 +602,17 @@ func (m *Controller) Size() (n int) {
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
if len(m.Aliases) > 0 {
for _, s := range m.Aliases {
l = len(s)
n += 1 + l + sovState(uint64(l))
}
}
if m.PublicKey != nil {
l = m.PublicKey.Size()
n += 1 + l + sovState(uint64(l))
}
l = len(m.VaultCid)
l = len(m.PublicKey)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
if len(m.Authentication) > 0 {
for _, s := range m.Authentication {
l = len(s)
n += 1 + l + sovState(uint64(l))
}
}
l = len(m.Status)
l = len(m.KsVal)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
if m.Claimed {
n += 2
}
return n
}
@@ -655,7 +622,7 @@ func (m *Verification) Size() (n int) {
}
var l int
_ = l
l = len(m.Id)
l = len(m.Did)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
@@ -868,8 +835,27 @@ func (m *Controller) Unmarshal(dAtA []byte) error {
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType)
}
m.Number = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Number |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -897,9 +883,9 @@ func (m *Controller) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Id = string(dAtA[iNdEx:postIndex])
m.Did = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SonrAddress", wireType)
}
@@ -931,7 +917,7 @@ func (m *Controller) Unmarshal(dAtA []byte) error {
}
m.SonrAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType)
}
@@ -963,7 +949,7 @@ func (m *Controller) Unmarshal(dAtA []byte) error {
}
m.EthAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field BtcAddress", wireType)
}
@@ -995,43 +981,11 @@ func (m *Controller) Unmarshal(dAtA []byte) error {
}
m.BtcAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Aliases = append(m.Aliases, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
}
var msglen int
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
@@ -1041,31 +995,29 @@ func (m *Controller) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
if byteLen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + msglen
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...)
if m.PublicKey == nil {
m.PublicKey = &PubKey{}
}
if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
m.PublicKey = []byte{}
}
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field VaultCid", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field KsVal", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -1093,13 +1045,13 @@ func (m *Controller) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.VaultCid = string(dAtA[iNdEx:postIndex])
m.KsVal = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType)
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Claimed", wireType)
}
var stringLen uint64
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
@@ -1109,56 +1061,12 @@ func (m *Controller) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Authentication = append(m.Authentication, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Status = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
m.Claimed = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipState(dAtA[iNdEx:])
@@ -1211,7 +1119,7 @@ func (m *Verification) Unmarshal(dAtA []byte) error {
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -1239,7 +1147,7 @@ func (m *Verification) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Id = string(dAtA[iNdEx:postIndex])
m.Did = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
+88 -700
View File
@@ -30,143 +30,6 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// MsgAllocateVault is the message type for the AllocateVault RPC.
type MsgAllocateVault struct {
// authority is the address of the service account.
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
// subject is a unique human-defined identifier to associate with the vault.
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
// origin is the origin of the request in wildcard form.
Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"`
}
func (m *MsgAllocateVault) Reset() { *m = MsgAllocateVault{} }
func (m *MsgAllocateVault) String() string { return proto.CompactTextString(m) }
func (*MsgAllocateVault) ProtoMessage() {}
func (*MsgAllocateVault) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{0}
}
func (m *MsgAllocateVault) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgAllocateVault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgAllocateVault.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 *MsgAllocateVault) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgAllocateVault.Merge(m, src)
}
func (m *MsgAllocateVault) XXX_Size() int {
return m.Size()
}
func (m *MsgAllocateVault) XXX_DiscardUnknown() {
xxx_messageInfo_MsgAllocateVault.DiscardUnknown(m)
}
var xxx_messageInfo_MsgAllocateVault proto.InternalMessageInfo
func (m *MsgAllocateVault) GetAuthority() string {
if m != nil {
return m.Authority
}
return ""
}
func (m *MsgAllocateVault) GetSubject() string {
if m != nil {
return m.Subject
}
return ""
}
func (m *MsgAllocateVault) GetOrigin() string {
if m != nil {
return m.Origin
}
return ""
}
// MsgAllocateVaultResponse is the response type for the AllocateVault RPC.
type MsgAllocateVaultResponse struct {
// CID is the content identifier of the vault.
Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"`
// ExpiryBlock is the block number at which the vault will expire.
ExpiryBlock int64 `protobuf:"varint,2,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"`
// RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
// IsLocalhost is a flag to indicate if the vault is localhost
Localhost bool `protobuf:"varint,4,opt,name=localhost,proto3" json:"localhost,omitempty"`
}
func (m *MsgAllocateVaultResponse) Reset() { *m = MsgAllocateVaultResponse{} }
func (m *MsgAllocateVaultResponse) String() string { return proto.CompactTextString(m) }
func (*MsgAllocateVaultResponse) ProtoMessage() {}
func (*MsgAllocateVaultResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{1}
}
func (m *MsgAllocateVaultResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgAllocateVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgAllocateVaultResponse.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 *MsgAllocateVaultResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgAllocateVaultResponse.Merge(m, src)
}
func (m *MsgAllocateVaultResponse) XXX_Size() int {
return m.Size()
}
func (m *MsgAllocateVaultResponse) XXX_DiscardUnknown() {
xxx_messageInfo_MsgAllocateVaultResponse.DiscardUnknown(m)
}
var xxx_messageInfo_MsgAllocateVaultResponse proto.InternalMessageInfo
func (m *MsgAllocateVaultResponse) GetCid() string {
if m != nil {
return m.Cid
}
return ""
}
func (m *MsgAllocateVaultResponse) GetExpiryBlock() int64 {
if m != nil {
return m.ExpiryBlock
}
return 0
}
func (m *MsgAllocateVaultResponse) GetToken() string {
if m != nil {
return m.Token
}
return ""
}
func (m *MsgAllocateVaultResponse) GetLocalhost() bool {
if m != nil {
return m.Localhost
}
return false
}
// MsgRegisterController is the message type for the InitializeController RPC.
type MsgRegisterController struct {
// authority is the address of the governance account.
@@ -175,7 +38,8 @@ type MsgRegisterController struct {
Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"`
// Keyshares is the list of keyshares to initialize the controller with.
Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"`
// Verifications is the list of verifications to initialize the controller with.
// Verifications is the list of verifications to initialize the controller
// with.
Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"`
}
@@ -183,7 +47,7 @@ func (m *MsgRegisterController) Reset() { *m = MsgRegisterController{} }
func (m *MsgRegisterController) String() string { return proto.CompactTextString(m) }
func (*MsgRegisterController) ProtoMessage() {}
func (*MsgRegisterController) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{2}
return fileDescriptor_d73284df019ff211, []int{0}
}
func (m *MsgRegisterController) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -240,9 +104,11 @@ func (m *MsgRegisterController) GetVerifications() [][]byte {
return nil
}
// MsgRegisterControllerResponse is the response type for the InitializeController RPC.
// MsgRegisterControllerResponse is the response type for the
// InitializeController RPC.
type MsgRegisterControllerResponse struct {
// Success returns true if the specified cid is valid and not already encrypted.
// Success returns true if the specified cid is valid and not already
// encrypted.
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// Controller is the address of the initialized controller.
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
@@ -254,7 +120,7 @@ func (m *MsgRegisterControllerResponse) Reset() { *m = MsgRegisterContro
func (m *MsgRegisterControllerResponse) String() string { return proto.CompactTextString(m) }
func (*MsgRegisterControllerResponse) ProtoMessage() {}
func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{3}
return fileDescriptor_d73284df019ff211, []int{1}
}
func (m *MsgRegisterControllerResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -318,7 +184,7 @@ func (m *MsgExecuteTx) Reset() { *m = MsgExecuteTx{} }
func (m *MsgExecuteTx) String() string { return proto.CompactTextString(m) }
func (*MsgExecuteTx) ProtoMessage() {}
func (*MsgExecuteTx) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{4}
return fileDescriptor_d73284df019ff211, []int{2}
}
func (m *MsgExecuteTx) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -378,7 +244,7 @@ func (m *MsgExecuteTxResponse) Reset() { *m = MsgExecuteTxResponse{} }
func (m *MsgExecuteTxResponse) String() string { return proto.CompactTextString(m) }
func (*MsgExecuteTxResponse) ProtoMessage() {}
func (*MsgExecuteTxResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{5}
return fileDescriptor_d73284df019ff211, []int{3}
}
func (m *MsgExecuteTxResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -437,7 +303,7 @@ func (m *MsgAuthorizeService) Reset() { *m = MsgAuthorizeService{} }
func (m *MsgAuthorizeService) String() string { return proto.CompactTextString(m) }
func (*MsgAuthorizeService) ProtoMessage() {}
func (*MsgAuthorizeService) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{6}
return fileDescriptor_d73284df019ff211, []int{4}
}
func (m *MsgAuthorizeService) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -494,7 +360,8 @@ func (m *MsgAuthorizeService) GetToken() string {
return ""
}
// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC.
// MsgAuthorizeServiceResponse is the response type for the AuthorizeService
// RPC.
type MsgAuthorizeServiceResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
@@ -504,7 +371,7 @@ func (m *MsgAuthorizeServiceResponse) Reset() { *m = MsgAuthorizeService
func (m *MsgAuthorizeServiceResponse) String() string { return proto.CompactTextString(m) }
func (*MsgAuthorizeServiceResponse) ProtoMessage() {}
func (*MsgAuthorizeServiceResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{7}
return fileDescriptor_d73284df019ff211, []int{5}
}
func (m *MsgAuthorizeServiceResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -551,7 +418,8 @@ func (m *MsgAuthorizeServiceResponse) GetToken() string {
type MsgRegisterService struct {
// authority is the address of the governance account.
Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"`
// origin is the origin of the request in wildcard form. Requires valid TXT record in DNS.
// origin is the origin of the request in wildcard form. Requires valid TXT
// record in DNS.
Service *Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
}
@@ -559,7 +427,7 @@ func (m *MsgRegisterService) Reset() { *m = MsgRegisterService{} }
func (m *MsgRegisterService) String() string { return proto.CompactTextString(m) }
func (*MsgRegisterService) ProtoMessage() {}
func (*MsgRegisterService) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{8}
return fileDescriptor_d73284df019ff211, []int{6}
}
func (m *MsgRegisterService) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -612,7 +480,7 @@ func (m *MsgRegisterServiceResponse) Reset() { *m = MsgRegisterServiceRe
func (m *MsgRegisterServiceResponse) String() string { return proto.CompactTextString(m) }
func (*MsgRegisterServiceResponse) ProtoMessage() {}
func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{9}
return fileDescriptor_d73284df019ff211, []int{7}
}
func (m *MsgRegisterServiceResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -671,7 +539,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} }
func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateParams) ProtoMessage() {}
func (*MsgUpdateParams) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{10}
return fileDescriptor_d73284df019ff211, []int{8}
}
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -732,7 +600,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse
func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateParamsResponse) ProtoMessage() {}
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_d73284df019ff211, []int{11}
return fileDescriptor_d73284df019ff211, []int{9}
}
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -762,8 +630,6 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*MsgAllocateVault)(nil), "did.v1.MsgAllocateVault")
proto.RegisterType((*MsgAllocateVaultResponse)(nil), "did.v1.MsgAllocateVaultResponse")
proto.RegisterType((*MsgRegisterController)(nil), "did.v1.MsgRegisterController")
proto.RegisterType((*MsgRegisterControllerResponse)(nil), "did.v1.MsgRegisterControllerResponse")
proto.RegisterMapType((map[string]string)(nil), "did.v1.MsgRegisterControllerResponse.AccountsEntry")
@@ -782,65 +648,58 @@ func init() {
func init() { proto.RegisterFile("did/v1/tx.proto", fileDescriptor_d73284df019ff211) }
var fileDescriptor_d73284df019ff211 = []byte{
// 922 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
0x14, 0xcf, 0xda, 0xa9, 0x93, 0x3c, 0x3b, 0xb1, 0x35, 0x18, 0xb2, 0xdd, 0xb6, 0x6e, 0x58, 0xa8,
0x14, 0xaa, 0x62, 0xab, 0xa9, 0x84, 0xaa, 0x80, 0x8a, 0x12, 0x54, 0x29, 0x08, 0x19, 0xca, 0x36,
0x70, 0xe8, 0x25, 0xda, 0xec, 0x0e, 0xeb, 0xc1, 0xf6, 0x8e, 0x35, 0x6f, 0x6c, 0xd9, 0x9c, 0xf8,
0x73, 0x43, 0x1c, 0xf8, 0x02, 0xf0, 0x19, 0x7a, 0xe0, 0x1b, 0x70, 0xe9, 0xb1, 0xe2, 0xc4, 0x09,
0xa1, 0xe4, 0x50, 0xf1, 0x21, 0x90, 0xd0, 0xee, 0xec, 0xae, 0xc7, 0x7f, 0x62, 0xdc, 0xe6, 0x62,
0xed, 0xbc, 0xf7, 0xe6, 0x37, 0xbf, 0xdf, 0x9b, 0xdf, 0xbe, 0x35, 0x94, 0x7d, 0xe6, 0x37, 0x06,
0x77, 0x1b, 0x72, 0x58, 0xef, 0x09, 0x2e, 0x39, 0x29, 0xf8, 0xcc, 0xaf, 0x0f, 0xee, 0x5a, 0xdb,
0x1e, 0xc7, 0x2e, 0xc7, 0x46, 0x17, 0x83, 0x28, 0xdf, 0xc5, 0x40, 0x15, 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 0x01,
0x93, 0xad, 0xfe, 0x69, 0xdd, 0xe3, 0xdd, 0x06, 0x0f, 0x91, 0x87, 0xa2, 0x11, 0xff, 0x0c, 0x1b,
0xd1, 0xdf, 0x2e, 0x39, 0xea, 0x51, 0x3c, 0x2d, 0xc4, 0x7f, 0xae, 0xee, 0xfd, 0x17, 0x00, 0x00,
0xff, 0xff, 0x68, 0x43, 0x51, 0x0c, 0xd7, 0x09, 0x00, 0x00,
// 809 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4f, 0x6f, 0xe3, 0x44,
0x14, 0x8f, 0xe3, 0x6e, 0xda, 0xbc, 0xa4, 0x4d, 0x34, 0x04, 0x92, 0xf5, 0xee, 0x66, 0x57, 0x86,
0x95, 0x96, 0xd5, 0xe2, 0x68, 0xb3, 0x12, 0x5a, 0x15, 0xb4, 0xa8, 0x45, 0x2b, 0x95, 0x43, 0xa0,
0xb8, 0xe5, 0xd2, 0x4b, 0xe5, 0xda, 0x83, 0x63, 0xb5, 0xf6, 0x44, 0xf3, 0x26, 0x51, 0xc2, 0x09,
0x38, 0x72, 0xe2, 0x03, 0x00, 0x9f, 0xa1, 0x07, 0xbe, 0x01, 0x97, 0x1e, 0x2b, 0x4e, 0x9c, 0x10,
0x6a, 0x0f, 0xfd, 0x14, 0x48, 0xc8, 0x1e, 0xdb, 0x71, 0xfe, 0x34, 0x4d, 0xe9, 0x25, 0xf2, 0xbc,
0xf7, 0xe6, 0x37, 0xbf, 0xdf, 0x6f, 0x9e, 0x9f, 0x03, 0x15, 0xc7, 0x73, 0x5a, 0x83, 0x97, 0x2d,
0x31, 0x34, 0x7a, 0x9c, 0x09, 0x46, 0x0a, 0x8e, 0xe7, 0x18, 0x83, 0x97, 0x5a, 0xdd, 0x66, 0xe8,
0x33, 0x6c, 0xf9, 0xe8, 0x86, 0x79, 0x1f, 0x5d, 0x59, 0xa0, 0xdd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99, 0xf3, 0xc5, 0x7a, 0xb4, 0x70, 0xfa, 0x6a, 0x4f, 0x97, 0x1a, 0xce, 0xe4, 0x6b,
0xa8, 0x4c, 0x37, 0xa2, 0x36, 0x67, 0x67, 0x22, 0x58, 0xbf, 0x3e, 0x97, 0x42, 0xee, 0x40, 0x79,
0xa2, 0x09, 0xea, 0x99, 0x3d, 0xd9, 0x84, 0xf6, 0xf8, 0x9a, 0x44, 0x82, 0xa4, 0xdd, 0xfb, 0xfe,
0xea, 0xf4, 0xb9, 0xb2, 0xfd, 0xe9, 0xd9, 0x45, 0x53, 0x39, 0xbf, 0x68, 0x2a, 0xff, 0x5c, 0x34,
0x95, 0x9f, 0x2f, 0x9b, 0xb9, 0xf3, 0xcb, 0x66, 0xee, 0xaf, 0xcb, 0x66, 0xee, 0x40, 0x77, 0x3d,
0xd1, 0xed, 0x1f, 0x19, 0x36, 0xf3, 0x5b, 0x2c, 0x40, 0x16, 0xf0, 0x56, 0xf4, 0x33, 0x6c, 0x85,
0x7f, 0x0a, 0xc4, 0xa8, 0x47, 0xf1, 0xa8, 0x10, 0x7d, 0xfa, 0x5f, 0xfd, 0x17, 0x00, 0x00, 0xff,
0xff, 0x70, 0x88, 0x77, 0x6a, 0x75, 0x08, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -855,16 +714,17 @@ const _ = grpc.SupportPackageIsVersion4
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type MsgClient interface {
// AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database.
// this operation is called by services initiating a controller registration.
AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error)
// AuthorizeService asserts the given controller is the owner of the given address.
// AuthorizeService asserts the given controller is the owner of the given
// address.
AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error)
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages Macaroon for verification.
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
// Macaroon for verification.
ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error)
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
// RegisterController initializes a controller with the given authentication
// set, address, cid, publicKey, and user-defined alias.
RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error)
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
// RegisterService initializes a Service with a given permission scope and
// URI. The domain must have a valid TXT record containing the public key.
RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error)
// UpdateParams defines a governance operation for updating the parameters.
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
@@ -878,15 +738,6 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient {
return &msgClient{cc}
}
func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) {
out := new(MsgAllocateVaultResponse)
err := c.cc.Invoke(ctx, "/did.v1.Msg/AllocateVault", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error) {
out := new(MsgAuthorizeServiceResponse)
err := c.cc.Invoke(ctx, "/did.v1.Msg/AuthorizeService", in, out, opts...)
@@ -934,16 +785,17 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
// MsgServer is the server API for Msg service.
type MsgServer interface {
// AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database.
// this operation is called by services initiating a controller registration.
AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error)
// AuthorizeService asserts the given controller is the owner of the given address.
// AuthorizeService asserts the given controller is the owner of the given
// address.
AuthorizeService(context.Context, *MsgAuthorizeService) (*MsgAuthorizeServiceResponse, error)
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages Macaroon for verification.
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
// Macaroon for verification.
ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error)
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
// RegisterController initializes a controller with the given authentication
// set, address, cid, publicKey, and user-defined alias.
RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error)
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
// RegisterService initializes a Service with a given permission scope and
// URI. The domain must have a valid TXT record containing the public key.
RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error)
// UpdateParams defines a governance operation for updating the parameters.
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
@@ -953,9 +805,6 @@ type MsgServer interface {
type UnimplementedMsgServer struct {
}
func (*UnimplementedMsgServer) AllocateVault(ctx context.Context, req *MsgAllocateVault) (*MsgAllocateVaultResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented")
}
func (*UnimplementedMsgServer) AuthorizeService(ctx context.Context, req *MsgAuthorizeService) (*MsgAuthorizeServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AuthorizeService not implemented")
}
@@ -976,24 +825,6 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
s.RegisterService(&_Msg_serviceDesc, srv)
}
func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgAllocateVault)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).AllocateVault(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/did.v1.Msg/AllocateVault",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_AuthorizeService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgAuthorizeService)
if err := dec(in); err != nil {
@@ -1088,10 +919,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "did.v1.Msg",
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AllocateVault",
Handler: _Msg_AllocateVault_Handler,
},
{
MethodName: "AuthorizeService",
Handler: _Msg_AuthorizeService_Handler,
@@ -1117,102 +944,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
Metadata: "did/v1/tx.proto",
}
func (m *MsgAllocateVault) 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 *MsgAllocateVault) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgAllocateVault) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Origin) > 0 {
i -= len(m.Origin)
copy(dAtA[i:], m.Origin)
i = encodeVarintTx(dAtA, i, uint64(len(m.Origin)))
i--
dAtA[i] = 0x1a
}
if len(m.Subject) > 0 {
i -= len(m.Subject)
copy(dAtA[i:], m.Subject)
i = encodeVarintTx(dAtA, i, uint64(len(m.Subject)))
i--
dAtA[i] = 0x12
}
if len(m.Authority) > 0 {
i -= len(m.Authority)
copy(dAtA[i:], m.Authority)
i = encodeVarintTx(dAtA, i, uint64(len(m.Authority)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *MsgAllocateVaultResponse) 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 *MsgAllocateVaultResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgAllocateVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Localhost {
i--
if m.Localhost {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x20
}
if len(m.Token) > 0 {
i -= len(m.Token)
copy(dAtA[i:], m.Token)
i = encodeVarintTx(dAtA, i, uint64(len(m.Token)))
i--
dAtA[i] = 0x1a
}
if m.ExpiryBlock != 0 {
i = encodeVarintTx(dAtA, i, uint64(m.ExpiryBlock))
i--
dAtA[i] = 0x10
}
if len(m.Cid) > 0 {
i -= len(m.Cid)
copy(dAtA[i:], m.Cid)
i = encodeVarintTx(dAtA, i, uint64(len(m.Cid)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *MsgRegisterController) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -1693,50 +1424,6 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return base
}
func (m *MsgAllocateVault) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Authority)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = len(m.Subject)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = len(m.Origin)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
return n
}
func (m *MsgAllocateVaultResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Cid)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
if m.ExpiryBlock != 0 {
n += 1 + sovTx(uint64(m.ExpiryBlock))
}
l = len(m.Token)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
if m.Localhost {
n += 2
}
return n
}
func (m *MsgRegisterController) Size() (n int) {
if m == nil {
return 0
@@ -1949,305 +1636,6 @@ func sovTx(x uint64) (n int) {
func sozTx(x uint64) (n int) {
return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *MsgAllocateVault) 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 ErrIntOverflowTx
}
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: MsgAllocateVault: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgAllocateVault: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
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 ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Authority = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
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 ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Subject = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
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 ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Origin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTx
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *MsgAllocateVaultResponse) 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 ErrIntOverflowTx
}
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: MsgAllocateVaultResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgAllocateVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
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 ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Cid = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ExpiryBlock", wireType)
}
m.ExpiryBlock = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ExpiryBlock |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
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 ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Token = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Localhost", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Localhost = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTx
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *MsgRegisterController) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0