mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feature/implement vault allocation (#11)
* feat: add authentication middleware * feat: add REST API endpoints for database interactions * refactor: move DiscoveryDocument Pkl schema to oidc module * fix: replace sonrd with test_node.sh * feat: use NFT keeper to mint DID namespace NFT * refactor: move NFT class configuration to types * feat: add GlobalIntegrity genesis state * fix: ensure GlobalIntegrity is initialized in genesis * refactor: update all references to transactions module * refactor: improve genesis state struct * chore(did): update discovery endpoint to reflect base url * feat: remove unused context cache and client code * refactor: remove middleware dependency from keeper * feat: Add new query handlers for DID module * feat: Implement unimplemented params queries * feat: add support for first-party caveats * refactor: move motr command to cmd directory * feat: add support for GitHub releases * fix(motr): build app.wasm for motr package * feat: add card component * feat: add IndexedDB support for persistent storage * feat: Add Row and Column components * feat: add and components * refactor: improve button component * refactor: remove unnecessary button parameter in renderButton * feat: add vault service endpoint * feat: add input component
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "UpdateParams",
|
||||
Skip: false, // set to true if authority gated
|
||||
Skip: true, // set to true if authority gated
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package builder
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/onsonr/sonr/x/did/types/oidc"
|
||||
)
|
||||
|
||||
func GetDiscovery(origin string) *oidc.DiscoveryDocument {
|
||||
baseURL := "https://" + origin // Ensure this is the correct base URL for your service
|
||||
discoveryDoc := &oidc.DiscoveryDocument{
|
||||
Issuer: baseURL,
|
||||
AuthorizationEndpoint: fmt.Sprintf("%s/auth", baseURL),
|
||||
TokenEndpoint: fmt.Sprintf("%s/token", baseURL),
|
||||
UserinfoEndpoint: fmt.Sprintf("%s/userinfo", baseURL),
|
||||
JwksUri: fmt.Sprintf("%s/jwks", baseURL),
|
||||
RegistrationEndpoint: fmt.Sprintf("%s/register", baseURL),
|
||||
ScopesSupported: []string{"openid", "profile", "email", "web3", "sonr"},
|
||||
ResponseTypesSupported: []string{"code"},
|
||||
ResponseModesSupported: []string{"query", "form_post"},
|
||||
GrantTypesSupported: []string{"authorization_code", "refresh_token"},
|
||||
AcrValuesSupported: []string{"passkey"},
|
||||
SubjectTypesSupported: []string{"public"},
|
||||
ClaimsSupported: []string{"sub", "iss", "name", "email"},
|
||||
}
|
||||
return discoveryDoc
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package builder
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"strings"
|
||||
|
||||
"github.com/onsonr/sonr/x/did/types"
|
||||
)
|
||||
@@ -53,8 +54,8 @@ func NewCredentialParameter(ki *types.KeyInfo) CredentialParameter {
|
||||
|
||||
func ExtractCredentialParameters(p *types.Params) []CredentialParameter {
|
||||
var keys []*types.KeyInfo
|
||||
for _, v := range p.AllowedPublicKeys {
|
||||
if v.Role == types.KeyRole_KEY_ROLE_AUTHENTICATION {
|
||||
for k, v := range p.AllowedPublicKeys {
|
||||
if strings.Contains(k, "webauthn") {
|
||||
keys = append(keys, v)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
package context
|
||||
@@ -1,55 +0,0 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/peer"
|
||||
)
|
||||
|
||||
type ClientInfo struct {
|
||||
Authority string
|
||||
ContentType string
|
||||
UserAgent string
|
||||
Hostname string
|
||||
IPAddress string
|
||||
}
|
||||
|
||||
func ExtractClientInfo(ctx context.Context) (*ClientInfo, error) {
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("failed to get metadata from context")
|
||||
}
|
||||
|
||||
info := &ClientInfo{}
|
||||
|
||||
// Extract authority, content-type, and user-agent
|
||||
if authority := md.Get("authority"); len(authority) > 0 {
|
||||
info.Authority = authority[0]
|
||||
}
|
||||
if contentType := md.Get("content-type"); len(contentType) > 0 {
|
||||
info.ContentType = contentType[0]
|
||||
}
|
||||
if userAgent := md.Get("user-agent"); len(userAgent) > 0 {
|
||||
info.UserAgent = userAgent[0]
|
||||
}
|
||||
|
||||
// Extract hostname and IP address
|
||||
p, ok := peer.FromContext(ctx)
|
||||
if ok {
|
||||
if tcpAddr, ok := p.Addr.(*net.TCPAddr); ok {
|
||||
info.IPAddress = tcpAddr.IP.String()
|
||||
|
||||
// Try to get hostname
|
||||
names, err := net.LookupAddr(info.IPAddress)
|
||||
if err == nil && len(names) > 0 {
|
||||
info.Hostname = strings.TrimSuffix(names[0], ".")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return info, nil
|
||||
}
|
||||
+5
-2
@@ -8,10 +8,12 @@ import (
|
||||
"cosmossdk.io/core/store"
|
||||
"cosmossdk.io/depinject"
|
||||
"cosmossdk.io/log"
|
||||
nftkeeper "cosmossdk.io/x/nft/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
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"
|
||||
|
||||
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
|
||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||
|
||||
@@ -42,6 +44,7 @@ type ModuleInputs struct {
|
||||
AddressCodec address.Codec
|
||||
|
||||
AccountKeeper authkeeper.AccountKeeper
|
||||
NFTKeeper nftkeeper.Keeper
|
||||
StakingKeeper stakingkeeper.Keeper
|
||||
SlashingKeeper slashingkeeper.Keeper
|
||||
}
|
||||
@@ -56,8 +59,8 @@ type ModuleOutputs struct {
|
||||
func ProvideModule(in ModuleInputs) ModuleOutputs {
|
||||
govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String()
|
||||
|
||||
k := keeper.NewKeeper(in.Cdc, in.StoreService, in.AccountKeeper, &in.StakingKeeper, log.NewLogger(os.Stderr), govAddr)
|
||||
m := NewAppModule(in.Cdc, k)
|
||||
k := keeper.NewKeeper(in.Cdc, in.StoreService, in.AccountKeeper, in.NFTKeeper, &in.StakingKeeper, log.NewLogger(os.Stderr), govAddr)
|
||||
m := NewAppModule(in.Cdc, k, in.NFTKeeper)
|
||||
|
||||
return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}}
|
||||
}
|
||||
|
||||
@@ -5,16 +5,17 @@ import (
|
||||
storetypes "cosmossdk.io/core/store"
|
||||
"cosmossdk.io/log"
|
||||
"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"
|
||||
middleware "github.com/onsonr/sonr/x/did/context"
|
||||
"github.com/onsonr/sonr/x/did/types"
|
||||
)
|
||||
|
||||
@@ -30,6 +31,7 @@ type Keeper struct {
|
||||
Schema collections.Schema
|
||||
|
||||
AccountKeeper authkeeper.AccountKeeper
|
||||
NftKeeper nftkeeper.Keeper
|
||||
StakingKeeper *stakkeeper.Keeper
|
||||
|
||||
authority string
|
||||
@@ -41,6 +43,7 @@ func NewKeeper(
|
||||
cdc codec.BinaryCodec,
|
||||
storeService storetypes.KVStoreService,
|
||||
accKeeper authkeeper.AccountKeeper,
|
||||
nftKeeper nftkeeper.Keeper,
|
||||
stkKeeper *stakkeeper.Keeper,
|
||||
logger log.Logger,
|
||||
authority string,
|
||||
@@ -77,6 +80,7 @@ func NewKeeper(
|
||||
authority: authority,
|
||||
OrmDB: store,
|
||||
AccountKeeper: accKeeper,
|
||||
NftKeeper: nftKeeper,
|
||||
StakingKeeper: stkKeeper,
|
||||
}
|
||||
schema, err := sb.Build()
|
||||
@@ -95,10 +99,7 @@ func (k Keeper) IsUnclaimedServiceOrigin(ctx sdk.Context, origin string) bool {
|
||||
}
|
||||
|
||||
// IsValidServiceOrigin checks if a service origin is valid
|
||||
func (k Keeper) IsValidServiceOrigin(ctx sdk.Context, origin string, clientInfo *middleware.ClientInfo) bool {
|
||||
if origin != clientInfo.Hostname {
|
||||
return false
|
||||
}
|
||||
func (k Keeper) IsValidServiceOrigin(ctx sdk.Context, origin string) bool {
|
||||
rec, err := k.OrmDB.ServiceRecordTable().GetByOrigin(ctx, origin)
|
||||
if err != nil {
|
||||
return false
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"cosmossdk.io/core/store"
|
||||
"cosmossdk.io/log"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
nftkeeper "cosmossdk.io/x/nft/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/runtime"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
|
||||
@@ -48,6 +49,7 @@ type testFixture struct {
|
||||
|
||||
accountkeeper authkeeper.AccountKeeper
|
||||
bankkeeper bankkeeper.BaseKeeper
|
||||
nftKeeper nftkeeper.Keeper
|
||||
stakingKeeper *stakingkeeper.Keeper
|
||||
mintkeeper mintkeeper.Keeper
|
||||
|
||||
@@ -77,10 +79,10 @@ func SetupTest(t *testing.T) *testFixture {
|
||||
registerBaseSDKModules(f, encCfg, storeService, logger, require)
|
||||
|
||||
// Setup POA Keeper.
|
||||
f.k = keeper.NewKeeper(encCfg.Codec, storeService, f.accountkeeper, f.stakingKeeper, logger, f.govModAddr)
|
||||
f.k = keeper.NewKeeper(encCfg.Codec, storeService, f.accountkeeper, f.nftKeeper, f.stakingKeeper, logger, f.govModAddr)
|
||||
f.msgServer = keeper.NewMsgServerImpl(f.k)
|
||||
f.queryServer = keeper.NewQuerier(f.k)
|
||||
f.appModule = module.NewAppModule(encCfg.Codec, f.k)
|
||||
f.appModule = module.NewAppModule(encCfg.Codec, f.k, f.nftKeeper)
|
||||
|
||||
return f
|
||||
}
|
||||
|
||||
+37
-2
@@ -20,9 +20,9 @@ func NewQuerier(keeper Keeper) Querier {
|
||||
func (k Querier) Params(
|
||||
goCtx context.Context,
|
||||
req *types.QueryRequest,
|
||||
) (*types.QueryResponse, error) {
|
||||
) (*types.QueryParamsResponse, error) {
|
||||
ctx := k.CurrentCtx(goCtx)
|
||||
return &types.QueryResponse{Params: k.GetParams(ctx.SDK())}, nil
|
||||
return &types.QueryParamsResponse{Params: k.GetParams(ctx.SDK())}, nil
|
||||
}
|
||||
|
||||
// Resolve implements types.QueryServer.
|
||||
@@ -42,3 +42,38 @@ func (k Querier) Service(
|
||||
ctx := k.CurrentCtx(goCtx)
|
||||
return &types.QueryResponse{Service: ctx.GetServiceInfo(req.GetOrigin()), Params: ctx.Params()}, nil
|
||||
}
|
||||
|
||||
// ParamsAssets implements types.QueryServer.
|
||||
func (k Querier) ParamsAssets(goCtx context.Context, req *types.QueryRequest) (*types.QueryResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
panic("ParamsAssets is unimplemented")
|
||||
return &types.QueryResponse{}, nil
|
||||
}
|
||||
|
||||
// ParamsByAsset implements types.QueryServer.
|
||||
func (k Querier) ParamsByAsset(goCtx context.Context, req *types.QueryRequest) (*types.QueryResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
panic("ParamsByAsset is unimplemented")
|
||||
return &types.QueryResponse{}, nil
|
||||
}
|
||||
|
||||
// ParamsKeys implements types.QueryServer.
|
||||
func (k Querier) ParamsKeys(goCtx context.Context, req *types.QueryRequest) (*types.QueryResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
panic("ParamsKeys is unimplemented")
|
||||
return &types.QueryResponse{}, nil
|
||||
}
|
||||
|
||||
// ParamsByKey implements types.QueryServer.
|
||||
func (k Querier) ParamsByKey(goCtx context.Context, req *types.QueryRequest) (*types.QueryResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
panic("ParamsByKey is unimplemented")
|
||||
return &types.QueryResponse{}, nil
|
||||
}
|
||||
|
||||
// RegistrationOptionsByKey implements types.QueryServer.
|
||||
func (k Querier) RegistrationOptionsByKey(goCtx context.Context, req *types.QueryRequest) (*types.QueryResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
panic("RegistrationOptionsByKey is unimplemented")
|
||||
return &types.QueryResponse{}, nil
|
||||
}
|
||||
|
||||
+14
-13
@@ -9,7 +9,6 @@ import (
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
|
||||
"github.com/onsonr/sonr/x/did/builder"
|
||||
snrctx "github.com/onsonr/sonr/x/did/context"
|
||||
"github.com/onsonr/sonr/x/did/types"
|
||||
)
|
||||
|
||||
@@ -24,6 +23,8 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer {
|
||||
return &msgServer{k: keeper}
|
||||
}
|
||||
|
||||
// # AuthorizeService
|
||||
//
|
||||
// AuthorizeService implements types.MsgServer.
|
||||
func (ms msgServer) AuthorizeService(goCtx context.Context, msg *types.MsgAuthorizeService) (*types.MsgAuthorizeServiceResponse, error) {
|
||||
if ms.k.authority != msg.Controller {
|
||||
@@ -37,19 +38,16 @@ func (ms msgServer) AuthorizeService(goCtx context.Context, msg *types.MsgAuthor
|
||||
return &types.MsgAuthorizeServiceResponse{}, nil
|
||||
}
|
||||
|
||||
// # AllocateVault
|
||||
//
|
||||
// AllocateVault implements types.MsgServer.
|
||||
func (ms msgServer) AllocateVault(
|
||||
goCtx context.Context,
|
||||
msg *types.MsgAllocateVault,
|
||||
) (*types.MsgAllocateVaultResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
clientInfo, err := snrctx.ExtractClientInfo(goCtx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// 1.Check if the service origin is valid
|
||||
if ms.k.IsValidServiceOrigin(ctx, msg.Origin, clientInfo) {
|
||||
if ms.k.IsValidServiceOrigin(ctx, msg.Origin) {
|
||||
return nil, types.ErrInvalidServiceOrigin
|
||||
}
|
||||
|
||||
@@ -76,6 +74,8 @@ func (ms msgServer) AllocateVault(
|
||||
}, nil
|
||||
}
|
||||
|
||||
// # RegisterController
|
||||
//
|
||||
// RegisterController implements types.MsgServer.
|
||||
func (ms msgServer) RegisterController(
|
||||
goCtx context.Context,
|
||||
@@ -85,6 +85,8 @@ func (ms msgServer) RegisterController(
|
||||
return &types.MsgRegisterControllerResponse{}, nil
|
||||
}
|
||||
|
||||
// # RegisterService
|
||||
//
|
||||
// RegisterService implements types.MsgServer.
|
||||
func (ms msgServer) RegisterService(
|
||||
goCtx context.Context,
|
||||
@@ -92,24 +94,23 @@ func (ms msgServer) RegisterService(
|
||||
) (*types.MsgRegisterServiceResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
|
||||
clientInfo, err := snrctx.ExtractClientInfo(goCtx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// 1.Check if the service origin is valid
|
||||
if !ms.k.IsValidServiceOrigin(ctx, msg.Service.Origin, clientInfo) {
|
||||
if !ms.k.IsValidServiceOrigin(ctx, msg.Service.Origin) {
|
||||
return nil, types.ErrInvalidServiceOrigin
|
||||
}
|
||||
return ms.k.insertService(ctx, msg.Service)
|
||||
}
|
||||
|
||||
// # SyncController
|
||||
//
|
||||
// SyncController implements types.MsgServer.
|
||||
func (ms msgServer) SyncController(ctx context.Context, msg *types.MsgSyncController) (*types.MsgSyncControllerResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
return &types.MsgSyncControllerResponse{}, nil
|
||||
}
|
||||
|
||||
// # UpdateParams
|
||||
//
|
||||
// UpdateParams updates the x/did module parameters.
|
||||
func (ms msgServer) UpdateParams(
|
||||
ctx context.Context,
|
||||
|
||||
+18
-26
@@ -4,13 +4,14 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
|
||||
"cosmossdk.io/client/v2/autocli"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/x/nft"
|
||||
nftkeeper "cosmossdk.io/x/nft/keeper"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
@@ -24,17 +25,15 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// ConsensusVersion defines the current x/did module consensus version.
|
||||
ConsensusVersion = 1
|
||||
|
||||
// this line is used by starport scaffolding # simapp/module/const
|
||||
)
|
||||
|
||||
var (
|
||||
_ module.AppModuleBasic = AppModuleBasic{}
|
||||
_ module.AppModuleGenesis = AppModule{}
|
||||
_ module.AppModule = AppModule{}
|
||||
|
||||
_ module.AppModuleBasic = AppModuleBasic{}
|
||||
_ module.AppModuleGenesis = AppModule{}
|
||||
_ module.AppModule = AppModule{}
|
||||
_ autocli.HasAutoCLIConfig = AppModule{}
|
||||
)
|
||||
|
||||
@@ -46,17 +45,20 @@ type AppModuleBasic struct {
|
||||
type AppModule struct {
|
||||
AppModuleBasic
|
||||
|
||||
keeper keeper.Keeper
|
||||
keeper keeper.Keeper
|
||||
nftKeeper nftkeeper.Keeper
|
||||
}
|
||||
|
||||
// NewAppModule constructor
|
||||
func NewAppModule(
|
||||
cdc codec.Codec,
|
||||
keeper keeper.Keeper,
|
||||
nftKeeper nftkeeper.Keeper,
|
||||
) *AppModule {
|
||||
return &AppModule{
|
||||
AppModuleBasic: AppModuleBasic{cdc: cdc},
|
||||
keeper: keeper,
|
||||
nftKeeper: nftKeeper,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +68,8 @@ func (a AppModuleBasic) Name() string {
|
||||
|
||||
func (a AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
|
||||
return cdc.MustMarshalJSON(&types.GenesisState{
|
||||
Params: types.DefaultParams(),
|
||||
GlobalIntegrity: types.DefaultGlobalIntegrity(),
|
||||
Params: types.DefaultParams(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -82,28 +85,13 @@ func (a AppModuleBasic) ValidateGenesis(marshaler codec.JSONCodec, _ client.TxEn
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {
|
||||
}
|
||||
|
||||
func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
|
||||
err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx))
|
||||
if err != nil {
|
||||
// same behavior as in cosmos-sdk
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Disable in favor of autocli.go. If you wish to use these, it will override AutoCLI methods.
|
||||
/*
|
||||
func (a AppModuleBasic) GetTxCmd() *cobra.Command {
|
||||
return cli.NewTxCmd()
|
||||
}
|
||||
|
||||
func (a AppModuleBasic) GetQueryCmd() *cobra.Command {
|
||||
return cli.GetQueryCmd()
|
||||
}
|
||||
*/
|
||||
|
||||
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
|
||||
types.RegisterLegacyAminoCodec(cdc)
|
||||
}
|
||||
@@ -113,11 +101,15 @@ func (a AppModuleBasic) RegisterInterfaces(r codectypes.InterfaceRegistry) {
|
||||
}
|
||||
|
||||
func (a AppModule) InitGenesis(ctx sdk.Context, marshaler codec.JSONCodec, message json.RawMessage) []abci.ValidatorUpdate {
|
||||
genesisState := types.DefaultGenesis()
|
||||
if err := a.keeper.Params.Set(ctx, genesisState.Params); err != nil {
|
||||
didGenesisState := types.DefaultGenesis()
|
||||
if err := a.keeper.Params.Set(ctx, didGenesisState.Params); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
nftGenesisState := nft.DefaultGenesisState()
|
||||
if err := types.DefaultNFTClasses(nftGenesisState); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
a.nftKeeper.InitGenesis(ctx, nftGenesisState)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
+38
-1
@@ -1,10 +1,16 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"crypto/ecdsa"
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"strings"
|
||||
|
||||
fmt "fmt"
|
||||
|
||||
ethcrypto "github.com/ethereum/go-ethereum/crypto"
|
||||
"golang.org/x/crypto/sha3"
|
||||
|
||||
"github.com/cosmos/btcutil/bech32"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
@@ -71,7 +77,11 @@ func (c ChainCode) FormatAddress(pubKey *PubKey) (string, error) {
|
||||
return bech32.Encode("bc", pubKey.Bytes())
|
||||
|
||||
case ChainCodeETH:
|
||||
return bech32.Encode("eth", pubKey.Bytes())
|
||||
epk, err := pubKey.ECDSA()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return ComputeEthAddress(*epk), nil
|
||||
|
||||
case ChainCodeSNR:
|
||||
return bech32.Encode("idx", pubKey.Bytes())
|
||||
@@ -198,3 +208,30 @@ func ComputeOriginTXTRecord(origin string) string {
|
||||
h.Write([]byte(origin))
|
||||
return fmt.Sprintf("v=sonr,o=%s,p=%x", origin, h.Sum(nil))
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
+44
-27
@@ -2,10 +2,11 @@ package types
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
fmt "fmt"
|
||||
|
||||
ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1"
|
||||
"cosmossdk.io/collections"
|
||||
"cosmossdk.io/x/nft"
|
||||
)
|
||||
|
||||
// ParamsKey saves the current module params.
|
||||
@@ -35,7 +36,8 @@ const DefaultIndex uint64 = 1
|
||||
func DefaultGenesis() *GenesisState {
|
||||
return &GenesisState{
|
||||
// this line is used by starport scaffolding # genesis/types/default
|
||||
Params: DefaultParams(),
|
||||
GlobalIntegrity: DefaultGlobalIntegrity(),
|
||||
Params: DefaultParams(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,15 +45,24 @@ func DefaultGenesis() *GenesisState {
|
||||
// failure.
|
||||
func (gs GenesisState) Validate() error {
|
||||
// this line is used by starport scaffolding # genesis/types/validate
|
||||
|
||||
if gs.GlobalIntegrity == nil {
|
||||
return fmt.Errorf("global integrity proof is nil")
|
||||
}
|
||||
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(),
|
||||
WhitelistedChains: DefaultChains(),
|
||||
AllowedPublicKeys: DefaultKeyInfos(),
|
||||
LocalhostRegistrationEnabled: true,
|
||||
ConveyancePreference: "direct",
|
||||
@@ -59,6 +70,25 @@ func DefaultParams() Params {
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultGlobalIntegrity returns the default global integrity proof
|
||||
func DefaultGlobalIntegrity() *GlobalIntegrity {
|
||||
return &GlobalIntegrity{
|
||||
Controller: "did:sonr:0x0",
|
||||
Seed: DefaultSeedMessage(),
|
||||
Accumulator: []byte{},
|
||||
Count: 0,
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultSeedMessage returns the default seed message
|
||||
func DefaultSeedMessage() string {
|
||||
l1 := "The Sonr Network shall make no protocol that respects the establishment of centralized authority,"
|
||||
l2 := "or prohibits the free exercise of decentralized identity; or abridges the freedom of data sovereignty,"
|
||||
l3 := "or of encrypted communication; or the right of the users to peaceally interact and transact,"
|
||||
l4 := "and to petition the Network for the redress of vulnerabilities."
|
||||
return fmt.Sprintf("%s %s %s %s", l1, l2, l3, l4)
|
||||
}
|
||||
|
||||
// DefaultAssets returns the default asset infos: BTC, ETH, SNR, and USDC
|
||||
func DefaultAssets() []*AssetInfo {
|
||||
return []*AssetInfo{
|
||||
@@ -89,17 +119,12 @@ func DefaultAssets() []*AssetInfo {
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultChains returns the default chain infos: Bitcoin, Ethereum, and Sonr.
|
||||
func DefaultChains() []*ChainInfo {
|
||||
return []*ChainInfo{}
|
||||
}
|
||||
|
||||
// DefaultKeyInfos returns the default key infos: secp256k1, ed25519, keccak256, and bls12381.
|
||||
func DefaultKeyInfos() []*KeyInfo {
|
||||
return []*KeyInfo{
|
||||
func DefaultKeyInfos() map[string]*KeyInfo {
|
||||
return map[string]*KeyInfo{
|
||||
// Identity Key Info
|
||||
// Sonr Controller Key Info - From MPC
|
||||
{
|
||||
"auth.dwn": {
|
||||
Role: KeyRole_KEY_ROLE_INVOCATION,
|
||||
Curve: KeyCurve_KEY_CURVE_P256,
|
||||
Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA,
|
||||
@@ -108,7 +133,7 @@ func DefaultKeyInfos() []*KeyInfo {
|
||||
},
|
||||
|
||||
// Sonr Vault Shared Key Info - From Registration
|
||||
{
|
||||
"auth.zk": {
|
||||
Role: KeyRole_KEY_ROLE_ASSERTION,
|
||||
Curve: KeyCurve_KEY_CURVE_BLS12381,
|
||||
Algorithm: KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED,
|
||||
@@ -118,7 +143,7 @@ func DefaultKeyInfos() []*KeyInfo {
|
||||
|
||||
// Blockchain Key Info
|
||||
// Ethereum Key Info
|
||||
{
|
||||
"auth.ethereum": {
|
||||
Role: KeyRole_KEY_ROLE_DELEGATION,
|
||||
Curve: KeyCurve_KEY_CURVE_KECCAK256,
|
||||
Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA,
|
||||
@@ -126,7 +151,7 @@ func DefaultKeyInfos() []*KeyInfo {
|
||||
Type: KeyType_KEY_TYPE_BIP32,
|
||||
},
|
||||
// Bitcoin/IBC Key Info
|
||||
{
|
||||
"auth.bitcoin": {
|
||||
Role: KeyRole_KEY_ROLE_DELEGATION,
|
||||
Curve: KeyCurve_KEY_CURVE_SECP256K1,
|
||||
Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA,
|
||||
@@ -136,7 +161,7 @@ func DefaultKeyInfos() []*KeyInfo {
|
||||
|
||||
// Authentication Key Info
|
||||
// Browser based WebAuthn
|
||||
{
|
||||
"webauthn.browser": {
|
||||
Role: KeyRole_KEY_ROLE_AUTHENTICATION,
|
||||
Curve: KeyCurve_KEY_CURVE_P256,
|
||||
Algorithm: KeyAlgorithm_KEY_ALGORITHM_ES256,
|
||||
@@ -144,7 +169,7 @@ func DefaultKeyInfos() []*KeyInfo {
|
||||
Type: KeyType_KEY_TYPE_WEBAUTHN,
|
||||
},
|
||||
// FIDO U2F
|
||||
{
|
||||
"webauthn.fido": {
|
||||
Role: KeyRole_KEY_ROLE_AUTHENTICATION,
|
||||
Curve: KeyCurve_KEY_CURVE_P256,
|
||||
Algorithm: KeyAlgorithm_KEY_ALGORITHM_ES256,
|
||||
@@ -152,7 +177,7 @@ func DefaultKeyInfos() []*KeyInfo {
|
||||
Type: KeyType_KEY_TYPE_WEBAUTHN,
|
||||
},
|
||||
// Cross-Platform Passkeys
|
||||
{
|
||||
"webauthn.passkey": {
|
||||
Role: KeyRole_KEY_ROLE_AUTHENTICATION,
|
||||
Curve: KeyCurve_KEY_CURVE_ED25519,
|
||||
Algorithm: KeyAlgorithm_KEY_ALGORITHM_EDDSA,
|
||||
@@ -195,14 +220,6 @@ func (a *AssetInfo) Equal(b *AssetInfo) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Equal returns true if two chain infos are equal
|
||||
func (c *ChainInfo) Equal(b *ChainInfo) bool {
|
||||
if c == nil && b == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Equal returns true if two key infos are equal
|
||||
func (k *KeyInfo) Equal(b *KeyInfo) bool {
|
||||
if k == nil && b == nil {
|
||||
|
||||
+632
-652
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
||||
package types
|
||||
|
||||
import "lukechampine.com/blake3"
|
||||
|
||||
func (g *GlobalIntegrity) Update(address string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (g *GlobalIntegrity) getProof() (*Proof, error) {
|
||||
if g.Accumulator == nil {
|
||||
return NewProof(g.Controller, g.proofProperty(), g.seedKdf())
|
||||
}
|
||||
return &Proof{
|
||||
Issuer: g.Controller,
|
||||
Property: g.proofProperty(),
|
||||
Accumulator: g.Accumulator,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (g *GlobalIntegrity) proofProperty() string {
|
||||
return "did:sonr:integrity"
|
||||
}
|
||||
|
||||
func (g *GlobalIntegrity) seedKdf() []byte {
|
||||
res := blake3.Sum256([]byte(g.Seed))
|
||||
return res[:]
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package types
|
||||
|
||||
import sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
func (t *Token) Validate(permissions string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *Token) Verify(msg sdk.Msg) error {
|
||||
return nil
|
||||
}
|
||||
+508
-147
@@ -788,25 +788,26 @@ func (m *ServiceInfo) GetService() *Service {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Token defines a macron token
|
||||
type Token struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
|
||||
Macron []byte `protobuf:"bytes,3,opt,name=macron,proto3" json:"macron,omitempty"`
|
||||
// FirstPartyCaveat defines a first party caveat
|
||||
type FirstPartyCaveat struct {
|
||||
Scope *Permissions `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
|
||||
Exp int64 `protobuf:"varint,2,opt,name=exp,proto3" json:"exp,omitempty"`
|
||||
Cnf string `protobuf:"bytes,3,opt,name=cnf,proto3" json:"cnf,omitempty"`
|
||||
Aud string `protobuf:"bytes,4,opt,name=aud,proto3" json:"aud,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Token) Reset() { *m = Token{} }
|
||||
func (m *Token) String() string { return proto.CompactTextString(m) }
|
||||
func (*Token) ProtoMessage() {}
|
||||
func (*Token) Descriptor() ([]byte, []int) {
|
||||
func (m *FirstPartyCaveat) Reset() { *m = FirstPartyCaveat{} }
|
||||
func (m *FirstPartyCaveat) String() string { return proto.CompactTextString(m) }
|
||||
func (*FirstPartyCaveat) ProtoMessage() {}
|
||||
func (*FirstPartyCaveat) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_739bb5ab5cb60751, []int{8}
|
||||
}
|
||||
func (m *Token) XXX_Unmarshal(b []byte) error {
|
||||
func (m *FirstPartyCaveat) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
func (m *FirstPartyCaveat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_Token.Marshal(b, m, deterministic)
|
||||
return xxx_messageInfo_FirstPartyCaveat.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
@@ -816,39 +817,115 @@ func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *Token) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Token.Merge(m, src)
|
||||
func (m *FirstPartyCaveat) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_FirstPartyCaveat.Merge(m, src)
|
||||
}
|
||||
func (m *Token) XXX_Size() int {
|
||||
func (m *FirstPartyCaveat) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *Token) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Token.DiscardUnknown(m)
|
||||
func (m *FirstPartyCaveat) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_FirstPartyCaveat.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Token proto.InternalMessageInfo
|
||||
var xxx_messageInfo_FirstPartyCaveat proto.InternalMessageInfo
|
||||
|
||||
func (m *Token) GetId() string {
|
||||
func (m *FirstPartyCaveat) GetScope() *Permissions {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Token) GetController() string {
|
||||
if m != nil {
|
||||
return m.Controller
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Token) GetMacron() []byte {
|
||||
if m != nil {
|
||||
return m.Macron
|
||||
return m.Scope
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *FirstPartyCaveat) GetExp() int64 {
|
||||
if m != nil {
|
||||
return m.Exp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *FirstPartyCaveat) GetCnf() string {
|
||||
if m != nil {
|
||||
return m.Cnf
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *FirstPartyCaveat) GetAud() string {
|
||||
if m != nil {
|
||||
return m.Aud
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// ThirdPartyCaveat defines a third party caveat
|
||||
type ThirdPartyCaveat struct {
|
||||
Scope *Permissions `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
|
||||
Exp int64 `protobuf:"varint,2,opt,name=exp,proto3" json:"exp,omitempty"`
|
||||
Cnf string `protobuf:"bytes,3,opt,name=cnf,proto3" json:"cnf,omitempty"`
|
||||
Aud string `protobuf:"bytes,4,opt,name=aud,proto3" json:"aud,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ThirdPartyCaveat) Reset() { *m = ThirdPartyCaveat{} }
|
||||
func (m *ThirdPartyCaveat) String() string { return proto.CompactTextString(m) }
|
||||
func (*ThirdPartyCaveat) ProtoMessage() {}
|
||||
func (*ThirdPartyCaveat) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_739bb5ab5cb60751, []int{9}
|
||||
}
|
||||
func (m *ThirdPartyCaveat) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ThirdPartyCaveat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ThirdPartyCaveat.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 *ThirdPartyCaveat) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ThirdPartyCaveat.Merge(m, src)
|
||||
}
|
||||
func (m *ThirdPartyCaveat) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *ThirdPartyCaveat) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ThirdPartyCaveat.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ThirdPartyCaveat proto.InternalMessageInfo
|
||||
|
||||
func (m *ThirdPartyCaveat) GetScope() *Permissions {
|
||||
if m != nil {
|
||||
return m.Scope
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ThirdPartyCaveat) GetExp() int64 {
|
||||
if m != nil {
|
||||
return m.Exp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ThirdPartyCaveat) GetCnf() string {
|
||||
if m != nil {
|
||||
return m.Cnf
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ThirdPartyCaveat) GetAud() string {
|
||||
if m != nil {
|
||||
return m.Aud
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Alias)(nil), "did.v1.Alias")
|
||||
proto.RegisterType((*Credential)(nil), "did.v1.Credential")
|
||||
@@ -862,83 +939,86 @@ func init() {
|
||||
proto.RegisterType((*Service)(nil), "did.v1.Service")
|
||||
proto.RegisterMapType((map[string]string)(nil), "did.v1.Service.ServiceEndpointsEntry")
|
||||
proto.RegisterType((*ServiceInfo)(nil), "did.v1.ServiceInfo")
|
||||
proto.RegisterType((*Token)(nil), "did.v1.Token")
|
||||
proto.RegisterType((*FirstPartyCaveat)(nil), "did.v1.FirstPartyCaveat")
|
||||
proto.RegisterType((*ThirdPartyCaveat)(nil), "did.v1.ThirdPartyCaveat")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("did/v1/models.proto", fileDescriptor_739bb5ab5cb60751) }
|
||||
|
||||
var fileDescriptor_739bb5ab5cb60751 = []byte{
|
||||
// 1108 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0xef, 0x7a, 0x63, 0xc7, 0xfb, 0xec, 0x3a, 0x61, 0x9a, 0x96, 0x95, 0x55, 0x2c, 0xd7, 0x85,
|
||||
0xe2, 0x22, 0x64, 0xab, 0xae, 0x90, 0x50, 0xe1, 0x52, 0x92, 0x1c, 0xd2, 0xa8, 0x10, 0x6d, 0x2b,
|
||||
0x2a, 0xb8, 0x58, 0xe3, 0xdd, 0xe9, 0x66, 0xea, 0xf5, 0xcc, 0x6a, 0x66, 0xec, 0x66, 0x8f, 0x5c,
|
||||
0x39, 0xc1, 0x67, 0xe0, 0xcb, 0x70, 0xec, 0x91, 0x23, 0x6a, 0xe1, 0x7b, 0xa0, 0xf9, 0xb3, 0xf6,
|
||||
0xc6, 0xa5, 0xa0, 0x5e, 0x92, 0x79, 0xbf, 0xf7, 0x7b, 0x33, 0x6f, 0x7f, 0xef, 0xbd, 0x19, 0xc3,
|
||||
0xb5, 0x84, 0x26, 0xe3, 0xd5, 0xbd, 0xf1, 0x82, 0x27, 0x24, 0x93, 0xa3, 0x5c, 0x70, 0xc5, 0x51,
|
||||
0x23, 0xa1, 0xc9, 0x68, 0x75, 0xaf, 0x7b, 0xe0, 0x9c, 0x29, 0x61, 0x44, 0x52, 0xe7, 0xed, 0x1e,
|
||||
0xa4, 0x3c, 0xe5, 0x66, 0x39, 0xd6, 0x2b, 0x8b, 0x0e, 0x7e, 0x80, 0xfa, 0xc3, 0x8c, 0x62, 0x89,
|
||||
0x42, 0xd8, 0x95, 0xcb, 0xd9, 0x0b, 0x12, 0xab, 0xd0, 0xeb, 0x7b, 0xc3, 0x20, 0x2a, 0x4d, 0x74,
|
||||
0x03, 0x1a, 0x5c, 0xd0, 0x94, 0xb2, 0xb0, 0x66, 0x1c, 0xce, 0x42, 0x3d, 0x80, 0x98, 0x33, 0x25,
|
||||
0x78, 0x96, 0x11, 0x11, 0xfa, 0xc6, 0x57, 0x41, 0x06, 0xbf, 0xf9, 0x00, 0x87, 0x82, 0x24, 0x84,
|
||||
0x29, 0x8a, 0xb3, 0xff, 0x38, 0xe0, 0x2e, 0xec, 0x63, 0xa5, 0x88, 0x54, 0x58, 0x51, 0xce, 0xa6,
|
||||
0xaa, 0xc8, 0x89, 0x3b, 0x6a, 0xaf, 0x82, 0x3f, 0x2d, 0x72, 0x52, 0xc9, 0xc5, 0xbf, 0x94, 0xcb,
|
||||
0x6d, 0xb8, 0x1a, 0xaf, 0x8f, 0x9a, 0xd2, 0x24, 0xdc, 0xe9, 0x7b, 0xc3, 0x76, 0xd4, 0xde, 0x80,
|
||||
0x27, 0x09, 0xfa, 0x08, 0x20, 0x5f, 0xce, 0x32, 0x1a, 0x4f, 0xe7, 0xa4, 0x08, 0xeb, 0x86, 0x11,
|
||||
0x58, 0xe4, 0x94, 0x14, 0xe8, 0x26, 0x04, 0x4a, 0x60, 0x26, 0x73, 0x2e, 0x54, 0xd8, 0xe8, 0xfb,
|
||||
0xc3, 0x20, 0xda, 0x00, 0x3a, 0x58, 0xd2, 0x94, 0x4d, 0x63, 0xbe, 0x64, 0x2a, 0xdc, 0xed, 0x7b,
|
||||
0xc3, 0xab, 0x51, 0xa0, 0x91, 0x43, 0x0d, 0xa0, 0x5b, 0xd0, 0x5e, 0x4a, 0x22, 0xa6, 0xb9, 0x20,
|
||||
0x92, 0x30, 0x15, 0x36, 0xfb, 0xde, 0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 0x89, 0x58, 0xd1, 0x98, 0x84, 0xbb, 0x86, 0x56, 0x9a, 0x83, 0xbf, 0x6b,
|
||||
0xd0, 0x3c, 0x25, 0x85, 0x3c, 0xc7, 0x82, 0xa0, 0x07, 0xd0, 0x5c, 0x10, 0x85, 0x13, 0xac, 0x70,
|
||||
0xe8, 0xf5, 0xfd, 0x61, 0x6b, 0xd2, 0x1b, 0xd9, 0x41, 0x1b, 0x95, 0x9c, 0xd1, 0x63, 0x47, 0x38,
|
||||
0x66, 0x4a, 0x14, 0xd1, 0x9a, 0xaf, 0x63, 0x73, 0x5c, 0x64, 0x1c, 0x27, 0x32, 0xac, 0xbd, 0x23,
|
||||
0xf6, 0xcc, 0x11, 0x5c, 0x6c, 0xc9, 0x47, 0x5d, 0x68, 0x9a, 0x11, 0x8d, 0x79, 0xe6, 0x9a, 0x7d,
|
||||
0x6d, 0x6f, 0x75, 0xf2, 0xce, 0x76, 0x27, 0x87, 0xb0, 0xbb, 0x22, 0x42, 0x5a, 0xd5, 0x74, 0xa3,
|
||||
0x96, 0x26, 0x42, 0xb0, 0x23, 0x78, 0x46, 0xc2, 0x46, 0xdf, 0x1b, 0xd6, 0x23, 0xb3, 0xee, 0x7e,
|
||||
0x05, 0x57, 0x2f, 0xe5, 0x8f, 0xf6, 0xc1, 0xd7, 0xdb, 0xda, 0x36, 0xd0, 0x4b, 0x74, 0x00, 0xf5,
|
||||
0x15, 0xce, 0x96, 0xe5, 0x58, 0x5a, 0xe3, 0x41, 0xed, 0x4b, 0x4f, 0x07, 0x5f, 0xfa, 0x80, 0xff,
|
||||
0x0b, 0x6e, 0x57, 0x82, 0x07, 0x19, 0xb4, 0xce, 0x88, 0x58, 0x50, 0xa9, 0x73, 0x93, 0xe8, 0x73,
|
||||
0x68, 0xa4, 0x02, 0x33, 0x25, 0x8d, 0xce, 0x9d, 0xc9, 0x41, 0xa9, 0xd5, 0xd1, 0xc9, 0xd1, 0xb7,
|
||||
0x78, 0x41, 0x64, 0x8e, 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xf3, 0x65, 0x7b, 0x5b, 0x3a, 0x6d, 0x6e, 0xd3, 0xef, 0xa0, 0xfe, 0x94, 0xcf, 0x09, 0x7b, 0xef,
|
||||
0xd7, 0xe5, 0x06, 0x34, 0x16, 0x38, 0x16, 0xdc, 0x3e, 0xf6, 0xed, 0xc8, 0x59, 0xdf, 0x7c, 0xfd,
|
||||
0xfb, 0xeb, 0x9e, 0xf7, 0xea, 0x75, 0xcf, 0xfb, 0xf3, 0x75, 0xcf, 0xfb, 0xe5, 0x4d, 0xef, 0xca,
|
||||
0xab, 0x37, 0xbd, 0x2b, 0x7f, 0xbc, 0xe9, 0x5d, 0xf9, 0x71, 0x90, 0x52, 0x75, 0xbe, 0x9c, 0x8d,
|
||||
0x62, 0xbe, 0x18, 0x73, 0x26, 0x39, 0x13, 0x63, 0xf3, 0xe7, 0x62, 0xac, 0x7f, 0x12, 0xe9, 0xae,
|
||||
0x92, 0xb3, 0x86, 0xb9, 0x45, 0xef, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xd5, 0xfe, 0x6a, 0x5d,
|
||||
0x43, 0x09, 0x00, 0x00,
|
||||
// 1146 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6e, 0xdb, 0xc6,
|
||||
0x13, 0x0e, 0x45, 0x4b, 0x96, 0x46, 0x8a, 0xec, 0xdf, 0xc6, 0xf9, 0x95, 0x30, 0x52, 0x41, 0x51,
|
||||
0xda, 0x54, 0x29, 0x0a, 0x09, 0x51, 0x50, 0xa0, 0x48, 0x7b, 0x49, 0x6d, 0x17, 0x70, 0x8c, 0x14,
|
||||
0x06, 0x13, 0x34, 0x68, 0x2f, 0xc2, 0x8a, 0x1c, 0xcb, 0x1b, 0x53, 0x5c, 0x62, 0x77, 0xa9, 0x98,
|
||||
0xc7, 0x5e, 0x7b, 0x6a, 0x9f, 0xa1, 0x2f, 0xd3, 0x63, 0x8e, 0x3d, 0x16, 0x49, 0xfb, 0x1e, 0xc5,
|
||||
0xfe, 0xa1, 0x44, 0x2b, 0x4d, 0x8b, 0x5e, 0x7a, 0xb1, 0x77, 0xbe, 0xf9, 0x86, 0x33, 0xfc, 0x66,
|
||||
0x66, 0x29, 0xb8, 0x11, 0xb3, 0x78, 0xbc, 0xbc, 0x3f, 0x5e, 0xf0, 0x18, 0x13, 0x39, 0xca, 0x04,
|
||||
0x57, 0x9c, 0x34, 0x62, 0x16, 0x8f, 0x96, 0xf7, 0xf7, 0xf7, 0x9c, 0x73, 0x8e, 0x29, 0x4a, 0xe6,
|
||||
0xbc, 0xfb, 0x7b, 0x73, 0x3e, 0xe7, 0xe6, 0x38, 0xd6, 0x27, 0x8b, 0x0e, 0xbe, 0x85, 0xfa, 0xa3,
|
||||
0x84, 0x51, 0x49, 0x02, 0xd8, 0x96, 0xf9, 0xec, 0x05, 0x46, 0x2a, 0xf0, 0xfa, 0xde, 0xb0, 0x15,
|
||||
0x96, 0x26, 0xf9, 0x3f, 0x34, 0xb8, 0x60, 0x73, 0x96, 0x06, 0x35, 0xe3, 0x70, 0x16, 0xe9, 0x01,
|
||||
0x44, 0x3c, 0x55, 0x82, 0x27, 0x09, 0x8a, 0xc0, 0x37, 0xbe, 0x0a, 0x32, 0xf8, 0xd9, 0x07, 0x38,
|
||||
0x10, 0x18, 0x63, 0xaa, 0x18, 0x4d, 0xfe, 0x26, 0xc1, 0x3d, 0xd8, 0xa5, 0x4a, 0xa1, 0x54, 0x54,
|
||||
0x31, 0x9e, 0x4e, 0x55, 0x91, 0xa1, 0x4b, 0xb5, 0x53, 0xc1, 0x9f, 0x15, 0x19, 0x56, 0x6a, 0xf1,
|
||||
0xaf, 0xd4, 0x72, 0x07, 0xae, 0x47, 0xab, 0x54, 0x53, 0x16, 0x07, 0x5b, 0x7d, 0x6f, 0xd8, 0x09,
|
||||
0x3b, 0x6b, 0xf0, 0x38, 0x26, 0xef, 0x03, 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4f, 0xc5, 0xd8, 0xfc, 0xb9,
|
||||
0x1c, 0xeb, 0xdf, 0x6a, 0x7a, 0xdc, 0xe5, 0xac, 0x61, 0xae, 0xf7, 0x07, 0x7f, 0x06, 0x00, 0x00,
|
||||
0xff, 0xff, 0x38, 0x84, 0xad, 0x32, 0xdc, 0x09, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Alias) Marshal() (dAtA []byte, err error) {
|
||||
@@ -1615,7 +1695,7 @@ func (m *ServiceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *Token) Marshal() (dAtA []byte, err error) {
|
||||
func (m *FirstPartyCaveat) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
@@ -1625,34 +1705,98 @@ func (m *Token) Marshal() (dAtA []byte, err error) {
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *Token) MarshalTo(dAtA []byte) (int, error) {
|
||||
func (m *FirstPartyCaveat) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
func (m *FirstPartyCaveat) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Macron) > 0 {
|
||||
i -= len(m.Macron)
|
||||
copy(dAtA[i:], m.Macron)
|
||||
i = encodeVarintModels(dAtA, i, uint64(len(m.Macron)))
|
||||
if len(m.Aud) > 0 {
|
||||
i -= len(m.Aud)
|
||||
copy(dAtA[i:], m.Aud)
|
||||
i = encodeVarintModels(dAtA, i, uint64(len(m.Aud)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(m.Cnf) > 0 {
|
||||
i -= len(m.Cnf)
|
||||
copy(dAtA[i:], m.Cnf)
|
||||
i = encodeVarintModels(dAtA, i, uint64(len(m.Cnf)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.Controller) > 0 {
|
||||
i -= len(m.Controller)
|
||||
copy(dAtA[i:], m.Controller)
|
||||
i = encodeVarintModels(dAtA, i, uint64(len(m.Controller)))
|
||||
if m.Exp != 0 {
|
||||
i = encodeVarintModels(dAtA, i, uint64(m.Exp))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
dAtA[i] = 0x10
|
||||
}
|
||||
if len(m.Id) > 0 {
|
||||
i -= len(m.Id)
|
||||
copy(dAtA[i:], m.Id)
|
||||
i = encodeVarintModels(dAtA, i, uint64(len(m.Id)))
|
||||
if m.Scope != nil {
|
||||
{
|
||||
size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintModels(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *ThirdPartyCaveat) 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 *ThirdPartyCaveat) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *ThirdPartyCaveat) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Aud) > 0 {
|
||||
i -= len(m.Aud)
|
||||
copy(dAtA[i:], m.Aud)
|
||||
i = encodeVarintModels(dAtA, i, uint64(len(m.Aud)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(m.Cnf) > 0 {
|
||||
i -= len(m.Cnf)
|
||||
copy(dAtA[i:], m.Cnf)
|
||||
i = encodeVarintModels(dAtA, i, uint64(len(m.Cnf)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if m.Exp != 0 {
|
||||
i = encodeVarintModels(dAtA, i, uint64(m.Exp))
|
||||
i--
|
||||
dAtA[i] = 0x10
|
||||
}
|
||||
if m.Scope != nil {
|
||||
{
|
||||
size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintModels(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
@@ -1987,21 +2131,48 @@ func (m *ServiceInfo) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *Token) Size() (n int) {
|
||||
func (m *FirstPartyCaveat) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Id)
|
||||
if m.Scope != nil {
|
||||
l = m.Scope.Size()
|
||||
n += 1 + l + sovModels(uint64(l))
|
||||
}
|
||||
if m.Exp != 0 {
|
||||
n += 1 + sovModels(uint64(m.Exp))
|
||||
}
|
||||
l = len(m.Cnf)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovModels(uint64(l))
|
||||
}
|
||||
l = len(m.Controller)
|
||||
l = len(m.Aud)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovModels(uint64(l))
|
||||
}
|
||||
l = len(m.Macron)
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ThirdPartyCaveat) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Scope != nil {
|
||||
l = m.Scope.Size()
|
||||
n += 1 + l + sovModels(uint64(l))
|
||||
}
|
||||
if m.Exp != 0 {
|
||||
n += 1 + sovModels(uint64(m.Exp))
|
||||
}
|
||||
l = len(m.Cnf)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovModels(uint64(l))
|
||||
}
|
||||
l = len(m.Aud)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovModels(uint64(l))
|
||||
}
|
||||
@@ -4396,7 +4567,7 @@ func (m *ServiceInfo) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *Token) Unmarshal(dAtA []byte) error {
|
||||
func (m *FirstPartyCaveat) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -4419,17 +4590,17 @@ func (m *Token) Unmarshal(dAtA []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: Token: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: FirstPartyCaveat: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: Token: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: FirstPartyCaveat: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowModels
|
||||
@@ -4439,27 +4610,50 @@ func (m *Token) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthModels
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthModels
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Id = string(dAtA[iNdEx:postIndex])
|
||||
if m.Scope == nil {
|
||||
m.Scope = &Permissions{}
|
||||
}
|
||||
if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Exp", wireType)
|
||||
}
|
||||
m.Exp = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowModels
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Exp |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Cnf", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@@ -4487,13 +4681,13 @@ func (m *Token) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Controller = string(dAtA[iNdEx:postIndex])
|
||||
m.Cnf = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Macron", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Aud", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowModels
|
||||
@@ -4503,25 +4697,192 @@ func (m *Token) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthModels
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthModels
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Macron = append(m.Macron[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.Macron == nil {
|
||||
m.Macron = []byte{}
|
||||
m.Aud = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipModels(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthModels
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ThirdPartyCaveat) 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 ErrIntOverflowModels
|
||||
}
|
||||
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: ThirdPartyCaveat: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ThirdPartyCaveat: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowModels
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthModels
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthModels
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Scope == nil {
|
||||
m.Scope = &Permissions{}
|
||||
}
|
||||
if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Exp", wireType)
|
||||
}
|
||||
m.Exp = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowModels
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Exp |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Cnf", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowModels
|
||||
}
|
||||
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 ErrInvalidLengthModels
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthModels
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Cnf = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Aud", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowModels
|
||||
}
|
||||
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 ErrInvalidLengthModels
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthModels
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Aud = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"cosmossdk.io/x/nft"
|
||||
)
|
||||
|
||||
func (n DIDNamespace) ID() string {
|
||||
switch n {
|
||||
case DIDNamespace_DID_NAMESPACE_DWN:
|
||||
return "did:dwn:0"
|
||||
case DIDNamespace_DID_NAMESPACE_SONR:
|
||||
return "did:sonr:0"
|
||||
case DIDNamespace_DID_NAMESPACE_BITCOIN:
|
||||
return "did:btc:0"
|
||||
case DIDNamespace_DID_NAMESPACE_ETHEREUM:
|
||||
return "did:eth:0"
|
||||
case DIDNamespace_DID_NAMESPACE_IBC:
|
||||
return "did:ibc:0"
|
||||
case DIDNamespace_DID_NAMESPACE_WEBAUTHN:
|
||||
return "did:authn:0"
|
||||
case DIDNamespace_DID_NAMESPACE_SERVICE:
|
||||
return "did:web:0"
|
||||
case DIDNamespace_DID_NAMESPACE_IPFS:
|
||||
return "did:ipfs:0"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (n DIDNamespace) Name() string {
|
||||
switch n {
|
||||
case DIDNamespace_DID_NAMESPACE_DWN:
|
||||
return "DecentralizedWebNode"
|
||||
case DIDNamespace_DID_NAMESPACE_SONR:
|
||||
return "SonrNetwork"
|
||||
case DIDNamespace_DID_NAMESPACE_BITCOIN:
|
||||
return "BitcoinNetwork"
|
||||
case DIDNamespace_DID_NAMESPACE_ETHEREUM:
|
||||
return "EthereumNetwork"
|
||||
case DIDNamespace_DID_NAMESPACE_IBC:
|
||||
return "IBCNetwork"
|
||||
case DIDNamespace_DID_NAMESPACE_WEBAUTHN:
|
||||
return "WebAuthentication"
|
||||
case DIDNamespace_DID_NAMESPACE_SERVICE:
|
||||
return "DecentrlizedService"
|
||||
case DIDNamespace_DID_NAMESPACE_IPFS:
|
||||
return "IPFSStorage"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (n DIDNamespace) Symbol() string {
|
||||
switch n {
|
||||
case DIDNamespace_DID_NAMESPACE_DWN:
|
||||
return "DWN"
|
||||
case DIDNamespace_DID_NAMESPACE_SONR:
|
||||
return "SONR"
|
||||
case DIDNamespace_DID_NAMESPACE_BITCOIN:
|
||||
return "BTC"
|
||||
case DIDNamespace_DID_NAMESPACE_ETHEREUM:
|
||||
return "ETH"
|
||||
case DIDNamespace_DID_NAMESPACE_IBC:
|
||||
return "IBC"
|
||||
case DIDNamespace_DID_NAMESPACE_WEBAUTHN:
|
||||
return "WEBAUTHN"
|
||||
case DIDNamespace_DID_NAMESPACE_SERVICE:
|
||||
return "SERVICE"
|
||||
case DIDNamespace_DID_NAMESPACE_IPFS:
|
||||
return "IPFS"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (n DIDNamespace) Description() string {
|
||||
switch n {
|
||||
case DIDNamespace_DID_NAMESPACE_DWN:
|
||||
return "DWN Service Provider"
|
||||
case DIDNamespace_DID_NAMESPACE_SONR:
|
||||
return "Sonr Network Gateway"
|
||||
case DIDNamespace_DID_NAMESPACE_BITCOIN:
|
||||
return "Bitcoin Network Gateway"
|
||||
case DIDNamespace_DID_NAMESPACE_ETHEREUM:
|
||||
return "Ethereum Network Gateway"
|
||||
case DIDNamespace_DID_NAMESPACE_IBC:
|
||||
return "IBC Network Gateway"
|
||||
case DIDNamespace_DID_NAMESPACE_WEBAUTHN:
|
||||
return "Web Authentication Key"
|
||||
case DIDNamespace_DID_NAMESPACE_SERVICE:
|
||||
return "Decentrlized Service"
|
||||
case DIDNamespace_DID_NAMESPACE_IPFS:
|
||||
return "Data Storage on IPFS"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (n DIDNamespace) GetNFTClass() *nft.Class {
|
||||
return &nft.Class{
|
||||
Id: n.ID(),
|
||||
Name: n.Name(),
|
||||
Symbol: n.Symbol(),
|
||||
Description: n.Description(),
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Code generated from Pkl module `oidc`. DO NOT EDIT.
|
||||
package oidc
|
||||
|
||||
type DiscoveryDocument struct {
|
||||
Issuer string `pkl:"issuer" json:"issuer,omitempty" param:"issuer"`
|
||||
|
||||
AuthorizationEndpoint string `pkl:"authorization_endpoint" json:"authorization_endpoint,omitempty" param:"authorization_endpoint"`
|
||||
|
||||
TokenEndpoint string `pkl:"token_endpoint" json:"token_endpoint,omitempty" param:"token_endpoint"`
|
||||
|
||||
UserinfoEndpoint string `pkl:"userinfo_endpoint" json:"userinfo_endpoint,omitempty" param:"userinfo_endpoint"`
|
||||
|
||||
JwksUri string `pkl:"jwks_uri" json:"jwks_uri,omitempty" param:"jwks_uri"`
|
||||
|
||||
RegistrationEndpoint string `pkl:"registration_endpoint" json:"registration_endpoint,omitempty" param:"registration_endpoint"`
|
||||
|
||||
ScopesSupported []string `pkl:"scopes_supported" json:"scopes_supported,omitempty" param:"scopes_supported"`
|
||||
|
||||
ResponseTypesSupported []string `pkl:"response_types_supported" json:"response_types_supported,omitempty" param:"response_types_supported"`
|
||||
|
||||
ResponseModesSupported []string `pkl:"response_modes_supported" json:"response_modes_supported,omitempty" param:"response_modes_supported"`
|
||||
|
||||
SubjectTypesSupported []string `pkl:"subject_types_supported" json:"subject_types_supported,omitempty" param:"subject_types_supported"`
|
||||
|
||||
IdTokenSigningAlgValuesSupported []string `pkl:"id_token_signing_alg_values_supported" json:"id_token_signing_alg_values_supported,omitempty" param:"id_token_signing_alg_values_supported"`
|
||||
|
||||
ClaimsSupported []string `pkl:"claims_supported" json:"claims_supported,omitempty" param:"claims_supported"`
|
||||
|
||||
GrantTypesSupported []string `pkl:"grant_types_supported" json:"grant_types_supported,omitempty" param:"grant_types_supported"`
|
||||
|
||||
AcrValuesSupported []string `pkl:"acr_values_supported" json:"acr_values_supported,omitempty" param:"acr_values_supported"`
|
||||
|
||||
TokenEndpointAuthMethodsSupported []string `pkl:"token_endpoint_auth_methods_supported" json:"token_endpoint_auth_methods_supported,omitempty" param:"token_endpoint_auth_methods_supported"`
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// Code generated from Pkl module `oidc`. DO NOT EDIT.
|
||||
package oidc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/apple/pkl-go/pkl"
|
||||
)
|
||||
|
||||
type Oidc struct {
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Oidc
|
||||
func LoadFromPath(ctx context.Context, path string) (ret *Oidc, 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 Oidc
|
||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Oidc, error) {
|
||||
var ret Oidc
|
||||
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ret, nil
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// Code generated from Pkl module `oidc`. DO NOT EDIT.
|
||||
package oidc
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
func init() {
|
||||
pkl.RegisterMapping("oidc", Oidc{})
|
||||
pkl.RegisterMapping("oidc#DiscoveryDocument", DiscoveryDocument{})
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"crypto/ecdsa"
|
||||
"encoding/hex"
|
||||
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
"github.com/mr-tron/base58/base58"
|
||||
"github.com/onsonr/crypto"
|
||||
"github.com/onsonr/crypto/macaroon"
|
||||
)
|
||||
|
||||
var WalletKeyInfo = &KeyInfo{
|
||||
@@ -79,6 +81,16 @@ func (k *PubKey) Clone() cryptotypes.PubKey {
|
||||
}
|
||||
}
|
||||
|
||||
// IssueMacaroon returns a macaroon for the public key with the given id and location
|
||||
func (pk *PubKey) IssueMacaroon(subject string, origin string) (*macaroon.Macaroon, error) {
|
||||
return macaroon.New(pk.Bytes(), []byte(subject), origin, macaroon.LatestVersion)
|
||||
}
|
||||
|
||||
// ECDSA returns the ECDSA public key
|
||||
func (k *PubKey) ECDSA() (*ecdsa.PublicKey, error) {
|
||||
return crypto.ComputeEcdsaPublicKey(k.Bytes())
|
||||
}
|
||||
|
||||
// VerifySignature verifies a signature over the given message
|
||||
func (k *PubKey) VerifySignature(msg []byte, sig []byte) bool {
|
||||
pk, err := crypto.ComputeEcdsaPublicKey(k.Bytes())
|
||||
|
||||
+1532
-32
File diff suppressed because it is too large
Load Diff
+524
-1
@@ -69,6 +69,294 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Query_ParamsAssets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_Query_ParamsAssets_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryRequest
|
||||
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_ParamsAssets_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ParamsAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_ParamsAssets_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryRequest
|
||||
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_ParamsAssets_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ParamsAssets(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Query_ParamsByAsset_0 = &utilities.DoubleArray{Encoding: map[string]int{"asset": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
||||
)
|
||||
|
||||
func request_Query_ParamsByAsset_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["asset"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset")
|
||||
}
|
||||
|
||||
protoReq.Asset, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ParamsByAsset_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ParamsByAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_ParamsByAsset_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["asset"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset")
|
||||
}
|
||||
|
||||
protoReq.Asset, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ParamsByAsset_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ParamsByAsset(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Query_ParamsKeys_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_Query_ParamsKeys_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryRequest
|
||||
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_ParamsKeys_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ParamsKeys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_ParamsKeys_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryRequest
|
||||
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_ParamsKeys_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ParamsKeys(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Query_ParamsByKey_0 = &utilities.DoubleArray{Encoding: map[string]int{"key": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
||||
)
|
||||
|
||||
func request_Query_ParamsByKey_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["key"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key")
|
||||
}
|
||||
|
||||
protoReq.Key, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ParamsByKey_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ParamsByKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_ParamsByKey_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["key"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key")
|
||||
}
|
||||
|
||||
protoReq.Key, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ParamsByKey_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ParamsByKey(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Query_RegistrationOptionsByKey_0 = &utilities.DoubleArray{Encoding: map[string]int{"key": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
||||
)
|
||||
|
||||
func request_Query_RegistrationOptionsByKey_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["key"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key")
|
||||
}
|
||||
|
||||
protoReq.Key, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RegistrationOptionsByKey_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.RegistrationOptionsByKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_RegistrationOptionsByKey_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["key"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key")
|
||||
}
|
||||
|
||||
protoReq.Key, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RegistrationOptionsByKey_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.RegistrationOptionsByKey(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Query_Resolve_0 = &utilities.DoubleArray{Encoding: map[string]int{"did": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
||||
)
|
||||
@@ -242,6 +530,121 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_ParamsAssets_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_ParamsAssets_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_ParamsAssets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_ParamsByAsset_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_ParamsByAsset_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_ParamsByAsset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_ParamsKeys_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_ParamsKeys_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_ParamsKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_ParamsByKey_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_ParamsByKey_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_ParamsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_RegistrationOptionsByKey_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_RegistrationOptionsByKey_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_RegistrationOptionsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_Resolve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -349,6 +752,106 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_ParamsAssets_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_ParamsAssets_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_ParamsAssets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_ParamsByAsset_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_ParamsByAsset_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_ParamsByAsset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_ParamsKeys_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_ParamsKeys_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_ParamsKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_ParamsByKey_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_ParamsByKey_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_ParamsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_RegistrationOptionsByKey_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_RegistrationOptionsByKey_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_RegistrationOptionsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_Resolve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -393,7 +896,17 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"did", "params"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"params"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_ParamsAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"params", "assets"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_ParamsByAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"params", "assets", "asset"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_ParamsKeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"params", "keys"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_ParamsByKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"params", "keys", "key"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_RegistrationOptionsByKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"params", "keys", "key", "registration"}, "", 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)))
|
||||
|
||||
@@ -403,6 +916,16 @@ var (
|
||||
var (
|
||||
forward_Query_Params_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_ParamsAssets_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_ParamsByAsset_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_ParamsKeys_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_ParamsByKey_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_RegistrationOptionsByKey_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_Resolve_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_Service_0 = runtime.ForwardResponseMessage
|
||||
|
||||
+148
-203
@@ -39,7 +39,7 @@ type MsgUpdateParams struct {
|
||||
// params defines the parameters to update.
|
||||
Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
|
||||
// token is the macron token to authenticate the operation.
|
||||
Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
|
||||
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} }
|
||||
@@ -89,11 +89,11 @@ func (m *MsgUpdateParams) GetParams() Params {
|
||||
return Params{}
|
||||
}
|
||||
|
||||
func (m *MsgUpdateParams) GetToken() *Token {
|
||||
func (m *MsgUpdateParams) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
// MsgUpdateParamsResponse defines the response structure for executing a
|
||||
@@ -282,7 +282,7 @@ type MsgProveWitness struct {
|
||||
// Witness Value is the bytes of the witness.
|
||||
Witness []byte `protobuf:"bytes,3,opt,name=witness,proto3" json:"witness,omitempty"`
|
||||
// token is the macron token to authenticate the operation.
|
||||
Token *Token `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
|
||||
Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgProveWitness) Reset() { *m = MsgProveWitness{} }
|
||||
@@ -339,11 +339,11 @@ func (m *MsgProveWitness) GetWitness() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MsgProveWitness) GetToken() *Token {
|
||||
func (m *MsgProveWitness) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
// MsgProveWitnessResponse is the response type for the ProveWitness RPC.
|
||||
@@ -404,7 +404,7 @@ type MsgSyncController struct {
|
||||
// controller is the address of the controller to sync.
|
||||
Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"`
|
||||
// Token is the public token to authenticate the operation.
|
||||
Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
|
||||
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgSyncController) Reset() { *m = MsgSyncController{} }
|
||||
@@ -447,11 +447,11 @@ func (m *MsgSyncController) GetController() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgSyncController) GetToken() *Token {
|
||||
func (m *MsgSyncController) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
// MsgSyncControllerResponse is the response type for the SyncController RPC.
|
||||
@@ -645,7 +645,7 @@ type MsgAuthorizeService struct {
|
||||
// Permissions is the scope of the service.
|
||||
Scopes *Permissions `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"`
|
||||
// token is the macron token to authenticate the operation.
|
||||
Token *Token `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
|
||||
Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgAuthorizeService) Reset() { *m = MsgAuthorizeService{} }
|
||||
@@ -702,17 +702,17 @@ func (m *MsgAuthorizeService) GetScopes() *Permissions {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MsgAuthorizeService) GetToken() *Token {
|
||||
func (m *MsgAuthorizeService) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
// 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 *Token `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
|
||||
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgAuthorizeServiceResponse) Reset() { *m = MsgAuthorizeServiceResponse{} }
|
||||
@@ -755,11 +755,11 @@ func (m *MsgAuthorizeServiceResponse) GetSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *MsgAuthorizeServiceResponse) GetToken() *Token {
|
||||
func (m *MsgAuthorizeServiceResponse) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
// MsgRegisterService is the message type for the RegisterService RPC.
|
||||
@@ -769,7 +769,7 @@ type MsgRegisterService struct {
|
||||
// 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"`
|
||||
// token is the macron token to authenticate the operation.
|
||||
Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
|
||||
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgRegisterService) Reset() { *m = MsgRegisterService{} }
|
||||
@@ -819,11 +819,11 @@ func (m *MsgRegisterService) GetService() *Service {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MsgRegisterService) GetToken() *Token {
|
||||
func (m *MsgRegisterService) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
// MsgRegisterServiceResponse is the response type for the RegisterService RPC.
|
||||
@@ -900,65 +900,64 @@ 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, 0x4d, 0x6f, 0x1b, 0x45,
|
||||
0x18, 0xce, 0xd8, 0x89, 0x1b, 0xbf, 0xf9, 0x70, 0x98, 0x04, 0xe2, 0x6c, 0x5b, 0x37, 0xdd, 0x0a,
|
||||
0x29, 0x14, 0xb0, 0x95, 0x54, 0xa0, 0xaa, 0x70, 0x20, 0xa9, 0x90, 0x2a, 0x21, 0x93, 0xb2, 0x29,
|
||||
0x20, 0x55, 0x48, 0xd1, 0x66, 0x76, 0xb4, 0x19, 0xb2, 0xde, 0x59, 0xcd, 0x8c, 0x4d, 0xcc, 0x89,
|
||||
0x8f, 0x2b, 0x07, 0x7e, 0x02, 0x3f, 0x00, 0x89, 0x1e, 0xfa, 0x23, 0x2a, 0xb8, 0x54, 0x9c, 0x38,
|
||||
0x21, 0x94, 0x1c, 0xfa, 0x17, 0x38, 0x56, 0xbb, 0x33, 0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, 0x16, 0x06, 0xdf, 0xc9, 0xf5, 0xe2, 0xae, 0x22, 0x62, 0xad, 0x8f, 0x43, 0xb2, 0x60, 0x9f,
|
||||
0xc3, 0xe2, 0xd0, 0x35, 0xbd, 0x56, 0xd8, 0x33, 0x08, 0x59, 0x37, 0xc7, 0x42, 0x59, 0xbc, 0xc7,
|
||||
0x80, 0xcf, 0xb8, 0x39, 0xaf, 0x9f, 0x7b, 0xfa, 0xad, 0xb7, 0x27, 0xba, 0x1c, 0xf0, 0x17, 0x50,
|
||||
0x1b, 0x16, 0xa6, 0x75, 0xc6, 0xce, 0x74, 0x98, 0xf6, 0x78, 0x2c, 0x0d, 0x69, 0xcd, 0xfc, 0xf0,
|
||||
0xe2, 0xc9, 0x6d, 0xb4, 0xf3, 0xf1, 0xb3, 0x93, 0x06, 0x7a, 0x7e, 0xd2, 0x40, 0xff, 0x9d, 0x34,
|
||||
0xd0, 0xaf, 0xa7, 0x8d, 0xa9, 0xe7, 0xa7, 0x8d, 0xa9, 0x7f, 0x4e, 0x1b, 0x53, 0x8f, 0x6d, 0x9f,
|
||||
0xa9, 0xc3, 0xee, 0x41, 0x93, 0xf0, 0x4e, 0x8b, 0x87, 0x92, 0x87, 0xa2, 0x95, 0xfc, 0x1c, 0xb7,
|
||||
0xe2, 0x4f, 0x42, 0xd5, 0x8f, 0xa8, 0x3c, 0xa8, 0x24, 0x5f, 0x7e, 0x77, 0x5e, 0x06, 0x00, 0x00,
|
||||
0xff, 0xff, 0x14, 0xb5, 0x39, 0x32, 0x89, 0x0a, 0x00, 0x00,
|
||||
// 911 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0xdc, 0x44,
|
||||
0x18, 0x8e, 0x77, 0xd3, 0x6d, 0xf2, 0x26, 0xcd, 0x06, 0x27, 0x10, 0xc7, 0x6d, 0xb7, 0xa9, 0x11,
|
||||
0x52, 0x28, 0xb0, 0xab, 0xa4, 0x02, 0x55, 0x85, 0x03, 0x49, 0x85, 0x54, 0x09, 0x2d, 0x29, 0x0e,
|
||||
0x1f, 0x52, 0x2f, 0x91, 0x77, 0x3c, 0x72, 0x86, 0xf5, 0x7a, 0xac, 0x99, 0xd9, 0x25, 0xe6, 0x04,
|
||||
0x9c, 0x39, 0xf0, 0x07, 0x90, 0xb8, 0x70, 0xef, 0x81, 0x1b, 0x7f, 0xa0, 0x12, 0x97, 0x8a, 0x13,
|
||||
0x27, 0x84, 0x92, 0x43, 0xff, 0x02, 0x47, 0x34, 0x9e, 0xf1, 0xc7, 0x7e, 0x76, 0x9b, 0x5e, 0x76,
|
||||
0xfd, 0xce, 0xf3, 0xce, 0x33, 0xcf, 0x3b, 0xcf, 0x3b, 0x63, 0x43, 0xdd, 0x27, 0x7e, 0x6b, 0xb0,
|
||||
0xd7, 0x12, 0x67, 0xcd, 0x98, 0x51, 0x41, 0xcd, 0x9a, 0x4f, 0xfc, 0xe6, 0x60, 0xcf, 0xde, 0x42,
|
||||
0x94, 0xf7, 0x28, 0x6f, 0xf5, 0x78, 0x20, 0xf1, 0x1e, 0x0f, 0x54, 0x82, 0xbd, 0xad, 0x80, 0x93,
|
||||
0x34, 0x6a, 0xa9, 0x40, 0x43, 0x9b, 0x9a, 0x2c, 0xc0, 0x11, 0xe6, 0x24, 0x1b, 0xdd, 0xd0, 0xa3,
|
||||
0x3d, 0xea, 0xe3, 0x30, 0x4f, 0x0d, 0x68, 0x40, 0x15, 0x85, 0x7c, 0x52, 0xa3, 0xce, 0x2f, 0x06,
|
||||
0xd4, 0xdb, 0x3c, 0xf8, 0x32, 0xf6, 0x3d, 0x81, 0x1f, 0x79, 0xcc, 0xeb, 0x71, 0xf3, 0x03, 0x58,
|
||||
0xf6, 0xfa, 0xe2, 0x94, 0x32, 0x22, 0x12, 0xcb, 0xd8, 0x31, 0x76, 0x97, 0x0f, 0xad, 0xbf, 0x7e,
|
||||
0x7f, 0x6f, 0x53, 0xaf, 0x7c, 0xe0, 0xfb, 0x0c, 0x73, 0x7e, 0x2c, 0x18, 0x89, 0x02, 0xb7, 0x48,
|
||||
0x35, 0xdf, 0x85, 0x5a, 0x9c, 0x32, 0x58, 0x95, 0x1d, 0x63, 0x77, 0x65, 0x7f, 0xad, 0xa9, 0x2a,
|
||||
0x6b, 0x2a, 0xde, 0xc3, 0xc5, 0xa7, 0xff, 0xdc, 0x5a, 0x70, 0x75, 0x8e, 0xb9, 0x09, 0x57, 0x04,
|
||||
0xed, 0xe2, 0xc8, 0xaa, 0xca, 0x15, 0x5c, 0x15, 0xdc, 0x5f, 0xfb, 0xf1, 0xf9, 0x93, 0x3b, 0x05,
|
||||
0xa7, 0xb3, 0x0d, 0x5b, 0x23, 0xf2, 0x5c, 0xcc, 0x63, 0x1a, 0x71, 0xec, 0xfc, 0x64, 0xc0, 0x7a,
|
||||
0x9b, 0x07, 0x07, 0x61, 0x48, 0x91, 0x27, 0xf0, 0x57, 0x5e, 0x3f, 0x14, 0x97, 0xd6, 0x6e, 0xc1,
|
||||
0x55, 0xde, 0xef, 0x7c, 0x83, 0x91, 0x48, 0xc5, 0x2f, 0xbb, 0x59, 0x68, 0xbe, 0x01, 0x35, 0xca,
|
||||
0x48, 0x40, 0x32, 0xa1, 0x3a, 0x1a, 0x53, 0xfa, 0xab, 0x01, 0xd6, 0xa8, 0x9c, 0x4c, 0xab, 0xb9,
|
||||
0x0e, 0x55, 0x44, 0x7c, 0x25, 0xc8, 0x95, 0x8f, 0xe6, 0x6d, 0x58, 0xc5, 0x67, 0x31, 0x61, 0xc9,
|
||||
0x49, 0x27, 0xa4, 0xa8, 0x9b, 0xae, 0x5a, 0x75, 0x57, 0xd4, 0xd8, 0xa1, 0x1c, 0x32, 0xf7, 0x60,
|
||||
0x93, 0xe1, 0x80, 0x70, 0xc1, 0x3c, 0x41, 0x68, 0x74, 0x42, 0x63, 0xf9, 0xc7, 0xb5, 0x8e, 0x8d,
|
||||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d6, 0x2e, 0x0a, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -1259,15 +1258,10 @@ func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Token != nil {
|
||||
{
|
||||
size, err := m.Token.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
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
|
||||
}
|
||||
@@ -1430,15 +1424,10 @@ func (m *MsgProveWitness) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Token != nil {
|
||||
{
|
||||
size, err := m.Token.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
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] = 0x22
|
||||
}
|
||||
@@ -1526,15 +1515,10 @@ func (m *MsgSyncController) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Token != nil {
|
||||
{
|
||||
size, err := m.Token.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
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
|
||||
}
|
||||
@@ -1711,15 +1695,10 @@ func (m *MsgAuthorizeService) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Token != nil {
|
||||
{
|
||||
size, err := m.Token.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
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] = 0x22
|
||||
}
|
||||
@@ -1772,15 +1751,10 @@ func (m *MsgAuthorizeServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, er
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Token != nil {
|
||||
{
|
||||
size, err := m.Token.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
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] = 0x12
|
||||
}
|
||||
@@ -1817,15 +1791,10 @@ func (m *MsgRegisterService) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Token != nil {
|
||||
{
|
||||
size, err := m.Token.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
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
|
||||
}
|
||||
@@ -1914,8 +1883,8 @@ func (m *MsgUpdateParams) Size() (n int) {
|
||||
}
|
||||
l = m.Params.Size()
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
if m.Token != nil {
|
||||
l = m.Token.Size()
|
||||
l = len(m.Token)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
return n
|
||||
@@ -1992,8 +1961,8 @@ func (m *MsgProveWitness) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
if m.Token != nil {
|
||||
l = m.Token.Size()
|
||||
l = len(m.Token)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
return n
|
||||
@@ -2025,8 +1994,8 @@ func (m *MsgSyncController) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
if m.Token != nil {
|
||||
l = m.Token.Size()
|
||||
l = len(m.Token)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
return n
|
||||
@@ -2111,8 +2080,8 @@ func (m *MsgAuthorizeService) Size() (n int) {
|
||||
l = m.Scopes.Size()
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
if m.Token != nil {
|
||||
l = m.Token.Size()
|
||||
l = len(m.Token)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
return n
|
||||
@@ -2127,8 +2096,8 @@ func (m *MsgAuthorizeServiceResponse) Size() (n int) {
|
||||
if m.Success {
|
||||
n += 2
|
||||
}
|
||||
if m.Token != nil {
|
||||
l = m.Token.Size()
|
||||
l = len(m.Token)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
return n
|
||||
@@ -2148,8 +2117,8 @@ func (m *MsgRegisterService) Size() (n int) {
|
||||
l = m.Service.Size()
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
if m.Token != nil {
|
||||
l = m.Token.Size()
|
||||
l = len(m.Token)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
return n
|
||||
@@ -2275,7 +2244,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error {
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
||||
}
|
||||
var msglen int
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
@@ -2285,27 +2254,23 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Token == nil {
|
||||
m.Token = &Token{}
|
||||
}
|
||||
if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
m.Token = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@@ -2808,7 +2773,7 @@ func (m *MsgProveWitness) Unmarshal(dAtA []byte) error {
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
||||
}
|
||||
var msglen int
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
@@ -2818,27 +2783,23 @@ func (m *MsgProveWitness) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Token == nil {
|
||||
m.Token = &Token{}
|
||||
}
|
||||
if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
m.Token = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@@ -3028,7 +2989,7 @@ func (m *MsgSyncController) Unmarshal(dAtA []byte) error {
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
||||
}
|
||||
var msglen int
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
@@ -3038,27 +2999,23 @@ func (m *MsgSyncController) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Token == nil {
|
||||
m.Token = &Token{}
|
||||
}
|
||||
if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
m.Token = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@@ -3691,7 +3648,7 @@ func (m *MsgAuthorizeService) Unmarshal(dAtA []byte) error {
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
||||
}
|
||||
var msglen int
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
@@ -3701,27 +3658,23 @@ func (m *MsgAuthorizeService) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Token == nil {
|
||||
m.Token = &Token{}
|
||||
}
|
||||
if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
m.Token = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@@ -3797,7 +3750,7 @@ func (m *MsgAuthorizeServiceResponse) Unmarshal(dAtA []byte) error {
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
||||
}
|
||||
var msglen int
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
@@ -3807,27 +3760,23 @@ func (m *MsgAuthorizeServiceResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Token == nil {
|
||||
m.Token = &Token{}
|
||||
}
|
||||
if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
m.Token = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@@ -3951,7 +3900,7 @@ func (m *MsgRegisterService) Unmarshal(dAtA []byte) error {
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
||||
}
|
||||
var msglen int
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
@@ -3961,27 +3910,23 @@ func (m *MsgRegisterService) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Token == nil {
|
||||
m.Token = &Token{}
|
||||
}
|
||||
if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
m.Token = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
type Msg interface {
|
||||
GetTypeUrl() string
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgDidAllocateVault interface {
|
||||
Msg
|
||||
|
||||
GetAuthority() string
|
||||
|
||||
GetSubject() string
|
||||
|
||||
GetToken() *pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgDidAllocateVault = (*MsgDidAllocateVaultImpl)(nil)
|
||||
|
||||
type MsgDidAllocateVaultImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
Authority string `pkl:"authority"`
|
||||
|
||||
Subject string `pkl:"subject"`
|
||||
|
||||
Token *pkl.Object `pkl:"token"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgDidAllocateVaultImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgDidAllocateVaultImpl) GetAuthority() string {
|
||||
return rcv.Authority
|
||||
}
|
||||
|
||||
func (rcv *MsgDidAllocateVaultImpl) GetSubject() string {
|
||||
return rcv.Subject
|
||||
}
|
||||
|
||||
func (rcv *MsgDidAllocateVaultImpl) GetToken() *pkl.Object {
|
||||
return rcv.Token
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgDidAuthorize interface {
|
||||
Msg
|
||||
|
||||
GetAuthority() string
|
||||
|
||||
GetController() string
|
||||
|
||||
GetAddress() string
|
||||
|
||||
GetOrigin() string
|
||||
|
||||
GetToken() *pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgDidAuthorize = (*MsgDidAuthorizeImpl)(nil)
|
||||
|
||||
type MsgDidAuthorizeImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
Authority string `pkl:"authority"`
|
||||
|
||||
Controller string `pkl:"controller"`
|
||||
|
||||
Address string `pkl:"address"`
|
||||
|
||||
Origin string `pkl:"origin"`
|
||||
|
||||
Token *pkl.Object `pkl:"token"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgDidAuthorizeImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgDidAuthorizeImpl) GetAuthority() string {
|
||||
return rcv.Authority
|
||||
}
|
||||
|
||||
func (rcv *MsgDidAuthorizeImpl) GetController() string {
|
||||
return rcv.Controller
|
||||
}
|
||||
|
||||
func (rcv *MsgDidAuthorizeImpl) GetAddress() string {
|
||||
return rcv.Address
|
||||
}
|
||||
|
||||
func (rcv *MsgDidAuthorizeImpl) GetOrigin() string {
|
||||
return rcv.Origin
|
||||
}
|
||||
|
||||
func (rcv *MsgDidAuthorizeImpl) GetToken() *pkl.Object {
|
||||
return rcv.Token
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgDidProveWitness interface {
|
||||
Msg
|
||||
|
||||
GetAuthority() string
|
||||
|
||||
GetProperty() string
|
||||
|
||||
GetWitness() []int
|
||||
|
||||
GetToken() *pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgDidProveWitness = (*MsgDidProveWitnessImpl)(nil)
|
||||
|
||||
type MsgDidProveWitnessImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
Authority string `pkl:"authority"`
|
||||
|
||||
Property string `pkl:"property"`
|
||||
|
||||
Witness []int `pkl:"witness"`
|
||||
|
||||
Token *pkl.Object `pkl:"token"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgDidProveWitnessImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgDidProveWitnessImpl) GetAuthority() string {
|
||||
return rcv.Authority
|
||||
}
|
||||
|
||||
func (rcv *MsgDidProveWitnessImpl) GetProperty() string {
|
||||
return rcv.Property
|
||||
}
|
||||
|
||||
func (rcv *MsgDidProveWitnessImpl) GetWitness() []int {
|
||||
return rcv.Witness
|
||||
}
|
||||
|
||||
func (rcv *MsgDidProveWitnessImpl) GetToken() *pkl.Object {
|
||||
return rcv.Token
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgDidRegisterController interface {
|
||||
Msg
|
||||
|
||||
GetAuthority() string
|
||||
|
||||
GetCid() string
|
||||
|
||||
GetOrigin() string
|
||||
|
||||
GetAuthentication() []*pkl.Object
|
||||
|
||||
GetToken() *pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgDidRegisterController = (*MsgDidRegisterControllerImpl)(nil)
|
||||
|
||||
type MsgDidRegisterControllerImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
Authority string `pkl:"authority"`
|
||||
|
||||
Cid string `pkl:"cid"`
|
||||
|
||||
Origin string `pkl:"origin"`
|
||||
|
||||
Authentication []*pkl.Object `pkl:"authentication"`
|
||||
|
||||
Token *pkl.Object `pkl:"token"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgDidRegisterControllerImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterControllerImpl) GetAuthority() string {
|
||||
return rcv.Authority
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterControllerImpl) GetCid() string {
|
||||
return rcv.Cid
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterControllerImpl) GetOrigin() string {
|
||||
return rcv.Origin
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterControllerImpl) GetAuthentication() []*pkl.Object {
|
||||
return rcv.Authentication
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterControllerImpl) GetToken() *pkl.Object {
|
||||
return rcv.Token
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgDidRegisterService interface {
|
||||
Msg
|
||||
|
||||
GetController() string
|
||||
|
||||
GetOriginUri() string
|
||||
|
||||
GetScopes() *pkl.Object
|
||||
|
||||
GetDescription() string
|
||||
|
||||
GetServiceEndpoints() map[string]string
|
||||
|
||||
GetMetadata() *pkl.Object
|
||||
|
||||
GetToken() *pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgDidRegisterService = (*MsgDidRegisterServiceImpl)(nil)
|
||||
|
||||
type MsgDidRegisterServiceImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
Controller string `pkl:"controller"`
|
||||
|
||||
OriginUri string `pkl:"originUri"`
|
||||
|
||||
Scopes *pkl.Object `pkl:"scopes"`
|
||||
|
||||
Description string `pkl:"description"`
|
||||
|
||||
ServiceEndpoints map[string]string `pkl:"serviceEndpoints"`
|
||||
|
||||
Metadata *pkl.Object `pkl:"metadata"`
|
||||
|
||||
Token *pkl.Object `pkl:"token"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgDidRegisterServiceImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterServiceImpl) GetController() string {
|
||||
return rcv.Controller
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterServiceImpl) GetOriginUri() string {
|
||||
return rcv.OriginUri
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterServiceImpl) GetScopes() *pkl.Object {
|
||||
return rcv.Scopes
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterServiceImpl) GetDescription() string {
|
||||
return rcv.Description
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterServiceImpl) GetServiceEndpoints() map[string]string {
|
||||
return rcv.ServiceEndpoints
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterServiceImpl) GetMetadata() *pkl.Object {
|
||||
return rcv.Metadata
|
||||
}
|
||||
|
||||
func (rcv *MsgDidRegisterServiceImpl) GetToken() *pkl.Object {
|
||||
return rcv.Token
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgDidSyncVault interface {
|
||||
Msg
|
||||
|
||||
GetController() string
|
||||
|
||||
GetToken() *pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgDidSyncVault = (*MsgDidSyncVaultImpl)(nil)
|
||||
|
||||
type MsgDidSyncVaultImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
Controller string `pkl:"controller"`
|
||||
|
||||
Token *pkl.Object `pkl:"token"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgDidSyncVaultImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgDidSyncVaultImpl) GetController() string {
|
||||
return rcv.Controller
|
||||
}
|
||||
|
||||
func (rcv *MsgDidSyncVaultImpl) GetToken() *pkl.Object {
|
||||
return rcv.Token
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgDidUpdateParams interface {
|
||||
Msg
|
||||
|
||||
GetAuthority() string
|
||||
|
||||
GetParams() *pkl.Object
|
||||
|
||||
GetToken() *pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgDidUpdateParams = (*MsgDidUpdateParamsImpl)(nil)
|
||||
|
||||
type MsgDidUpdateParamsImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
Authority string `pkl:"authority"`
|
||||
|
||||
Params *pkl.Object `pkl:"params"`
|
||||
|
||||
Token *pkl.Object `pkl:"token"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgDidUpdateParamsImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgDidUpdateParamsImpl) GetAuthority() string {
|
||||
return rcv.Authority
|
||||
}
|
||||
|
||||
func (rcv *MsgDidUpdateParamsImpl) GetParams() *pkl.Object {
|
||||
return rcv.Params
|
||||
}
|
||||
|
||||
func (rcv *MsgDidUpdateParamsImpl) GetToken() *pkl.Object {
|
||||
return rcv.Token
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgGovDeposit interface {
|
||||
Msg
|
||||
|
||||
GetProposalId() int
|
||||
|
||||
GetDepositor() string
|
||||
|
||||
GetAmount() []*pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgGovDeposit = (*MsgGovDepositImpl)(nil)
|
||||
|
||||
type MsgGovDepositImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
ProposalId int `pkl:"proposalId"`
|
||||
|
||||
Depositor string `pkl:"depositor"`
|
||||
|
||||
Amount []*pkl.Object `pkl:"amount"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgGovDepositImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgGovDepositImpl) GetProposalId() int {
|
||||
return rcv.ProposalId
|
||||
}
|
||||
|
||||
func (rcv *MsgGovDepositImpl) GetDepositor() string {
|
||||
return rcv.Depositor
|
||||
}
|
||||
|
||||
func (rcv *MsgGovDepositImpl) GetAmount() []*pkl.Object {
|
||||
return rcv.Amount
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgGovSubmitProposal interface {
|
||||
Msg
|
||||
|
||||
GetContent() *Proposal
|
||||
|
||||
GetInitialDeposit() []*pkl.Object
|
||||
|
||||
GetProposer() string
|
||||
}
|
||||
|
||||
var _ MsgGovSubmitProposal = (*MsgGovSubmitProposalImpl)(nil)
|
||||
|
||||
// Gov module messages
|
||||
type MsgGovSubmitProposalImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
Content *Proposal `pkl:"content"`
|
||||
|
||||
InitialDeposit []*pkl.Object `pkl:"initialDeposit"`
|
||||
|
||||
Proposer string `pkl:"proposer"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgGovSubmitProposalImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgGovSubmitProposalImpl) GetContent() *Proposal {
|
||||
return rcv.Content
|
||||
}
|
||||
|
||||
func (rcv *MsgGovSubmitProposalImpl) GetInitialDeposit() []*pkl.Object {
|
||||
return rcv.InitialDeposit
|
||||
}
|
||||
|
||||
func (rcv *MsgGovSubmitProposalImpl) GetProposer() string {
|
||||
return rcv.Proposer
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
type MsgGovVote interface {
|
||||
Msg
|
||||
|
||||
GetProposalId() int
|
||||
|
||||
GetVoter() string
|
||||
|
||||
GetOption() int
|
||||
}
|
||||
|
||||
var _ MsgGovVote = (*MsgGovVoteImpl)(nil)
|
||||
|
||||
type MsgGovVoteImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
ProposalId int `pkl:"proposalId"`
|
||||
|
||||
Voter string `pkl:"voter"`
|
||||
|
||||
Option int `pkl:"option"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgGovVoteImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgGovVoteImpl) GetProposalId() int {
|
||||
return rcv.ProposalId
|
||||
}
|
||||
|
||||
func (rcv *MsgGovVoteImpl) GetVoter() string {
|
||||
return rcv.Voter
|
||||
}
|
||||
|
||||
func (rcv *MsgGovVoteImpl) GetOption() int {
|
||||
return rcv.Option
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgGroupCreateGroup interface {
|
||||
Msg
|
||||
|
||||
GetAdmin() string
|
||||
|
||||
GetMembers() []*pkl.Object
|
||||
|
||||
GetMetadata() string
|
||||
}
|
||||
|
||||
var _ MsgGroupCreateGroup = (*MsgGroupCreateGroupImpl)(nil)
|
||||
|
||||
// Group module messages
|
||||
type MsgGroupCreateGroupImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
Admin string `pkl:"admin"`
|
||||
|
||||
Members []*pkl.Object `pkl:"members"`
|
||||
|
||||
Metadata string `pkl:"metadata"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgGroupCreateGroupImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupCreateGroupImpl) GetAdmin() string {
|
||||
return rcv.Admin
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupCreateGroupImpl) GetMembers() []*pkl.Object {
|
||||
return rcv.Members
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupCreateGroupImpl) GetMetadata() string {
|
||||
return rcv.Metadata
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgGroupSubmitProposal interface {
|
||||
Msg
|
||||
|
||||
GetGroupPolicyAddress() string
|
||||
|
||||
GetProposers() []string
|
||||
|
||||
GetMetadata() string
|
||||
|
||||
GetMessages() []*pkl.Object
|
||||
|
||||
GetExec() int
|
||||
}
|
||||
|
||||
var _ MsgGroupSubmitProposal = (*MsgGroupSubmitProposalImpl)(nil)
|
||||
|
||||
type MsgGroupSubmitProposalImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
GroupPolicyAddress string `pkl:"groupPolicyAddress"`
|
||||
|
||||
Proposers []string `pkl:"proposers"`
|
||||
|
||||
Metadata string `pkl:"metadata"`
|
||||
|
||||
Messages []*pkl.Object `pkl:"messages"`
|
||||
|
||||
Exec int `pkl:"exec"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgGroupSubmitProposalImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupSubmitProposalImpl) GetGroupPolicyAddress() string {
|
||||
return rcv.GroupPolicyAddress
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupSubmitProposalImpl) GetProposers() []string {
|
||||
return rcv.Proposers
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupSubmitProposalImpl) GetMetadata() string {
|
||||
return rcv.Metadata
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupSubmitProposalImpl) GetMessages() []*pkl.Object {
|
||||
return rcv.Messages
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupSubmitProposalImpl) GetExec() int {
|
||||
return rcv.Exec
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
type MsgGroupVote interface {
|
||||
Msg
|
||||
|
||||
GetProposalId() int
|
||||
|
||||
GetVoter() string
|
||||
|
||||
GetOption() int
|
||||
|
||||
GetMetadata() string
|
||||
|
||||
GetExec() int
|
||||
}
|
||||
|
||||
var _ MsgGroupVote = (*MsgGroupVoteImpl)(nil)
|
||||
|
||||
type MsgGroupVoteImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
ProposalId int `pkl:"proposalId"`
|
||||
|
||||
Voter string `pkl:"voter"`
|
||||
|
||||
Option int `pkl:"option"`
|
||||
|
||||
Metadata string `pkl:"metadata"`
|
||||
|
||||
Exec int `pkl:"exec"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgGroupVoteImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupVoteImpl) GetProposalId() int {
|
||||
return rcv.ProposalId
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupVoteImpl) GetVoter() string {
|
||||
return rcv.Voter
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupVoteImpl) GetOption() int {
|
||||
return rcv.Option
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupVoteImpl) GetMetadata() string {
|
||||
return rcv.Metadata
|
||||
}
|
||||
|
||||
func (rcv *MsgGroupVoteImpl) GetExec() int {
|
||||
return rcv.Exec
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgStakingBeginRedelegate interface {
|
||||
Msg
|
||||
|
||||
GetDelegatorAddress() string
|
||||
|
||||
GetValidatorSrcAddress() string
|
||||
|
||||
GetValidatorDstAddress() string
|
||||
|
||||
GetAmount() *pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgStakingBeginRedelegate = (*MsgStakingBeginRedelegateImpl)(nil)
|
||||
|
||||
type MsgStakingBeginRedelegateImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
DelegatorAddress string `pkl:"delegatorAddress"`
|
||||
|
||||
ValidatorSrcAddress string `pkl:"validatorSrcAddress"`
|
||||
|
||||
ValidatorDstAddress string `pkl:"validatorDstAddress"`
|
||||
|
||||
Amount *pkl.Object `pkl:"amount"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgStakingBeginRedelegateImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingBeginRedelegateImpl) GetDelegatorAddress() string {
|
||||
return rcv.DelegatorAddress
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingBeginRedelegateImpl) GetValidatorSrcAddress() string {
|
||||
return rcv.ValidatorSrcAddress
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingBeginRedelegateImpl) GetValidatorDstAddress() string {
|
||||
return rcv.ValidatorDstAddress
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingBeginRedelegateImpl) GetAmount() *pkl.Object {
|
||||
return rcv.Amount
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgStakingCreateValidator interface {
|
||||
Msg
|
||||
|
||||
GetDescription() *pkl.Object
|
||||
|
||||
GetCommission() *pkl.Object
|
||||
|
||||
GetMinSelfDelegation() string
|
||||
|
||||
GetDelegatorAddress() string
|
||||
|
||||
GetValidatorAddress() string
|
||||
|
||||
GetPubkey() *pkl.Object
|
||||
|
||||
GetValue() *pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgStakingCreateValidator = (*MsgStakingCreateValidatorImpl)(nil)
|
||||
|
||||
// Staking module messages
|
||||
type MsgStakingCreateValidatorImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
Description *pkl.Object `pkl:"description"`
|
||||
|
||||
Commission *pkl.Object `pkl:"commission"`
|
||||
|
||||
MinSelfDelegation string `pkl:"minSelfDelegation"`
|
||||
|
||||
DelegatorAddress string `pkl:"delegatorAddress"`
|
||||
|
||||
ValidatorAddress string `pkl:"validatorAddress"`
|
||||
|
||||
Pubkey *pkl.Object `pkl:"pubkey"`
|
||||
|
||||
Value *pkl.Object `pkl:"value"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgStakingCreateValidatorImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingCreateValidatorImpl) GetDescription() *pkl.Object {
|
||||
return rcv.Description
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingCreateValidatorImpl) GetCommission() *pkl.Object {
|
||||
return rcv.Commission
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingCreateValidatorImpl) GetMinSelfDelegation() string {
|
||||
return rcv.MinSelfDelegation
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingCreateValidatorImpl) GetDelegatorAddress() string {
|
||||
return rcv.DelegatorAddress
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingCreateValidatorImpl) GetValidatorAddress() string {
|
||||
return rcv.ValidatorAddress
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingCreateValidatorImpl) GetPubkey() *pkl.Object {
|
||||
return rcv.Pubkey
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingCreateValidatorImpl) GetValue() *pkl.Object {
|
||||
return rcv.Value
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgStakingDelegate interface {
|
||||
Msg
|
||||
|
||||
GetDelegatorAddress() string
|
||||
|
||||
GetValidatorAddress() string
|
||||
|
||||
GetAmount() *pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgStakingDelegate = (*MsgStakingDelegateImpl)(nil)
|
||||
|
||||
type MsgStakingDelegateImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
DelegatorAddress string `pkl:"delegatorAddress"`
|
||||
|
||||
ValidatorAddress string `pkl:"validatorAddress"`
|
||||
|
||||
Amount *pkl.Object `pkl:"amount"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgStakingDelegateImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingDelegateImpl) GetDelegatorAddress() string {
|
||||
return rcv.DelegatorAddress
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingDelegateImpl) GetValidatorAddress() string {
|
||||
return rcv.ValidatorAddress
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingDelegateImpl) GetAmount() *pkl.Object {
|
||||
return rcv.Amount
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
type MsgStakingUndelegate interface {
|
||||
Msg
|
||||
|
||||
GetDelegatorAddress() string
|
||||
|
||||
GetValidatorAddress() string
|
||||
|
||||
GetAmount() *pkl.Object
|
||||
}
|
||||
|
||||
var _ MsgStakingUndelegate = (*MsgStakingUndelegateImpl)(nil)
|
||||
|
||||
type MsgStakingUndelegateImpl struct {
|
||||
// The type URL for the message
|
||||
TypeUrl string `pkl:"typeUrl"`
|
||||
|
||||
DelegatorAddress string `pkl:"delegatorAddress"`
|
||||
|
||||
ValidatorAddress string `pkl:"validatorAddress"`
|
||||
|
||||
Amount *pkl.Object `pkl:"amount"`
|
||||
}
|
||||
|
||||
// The type URL for the message
|
||||
func (rcv *MsgStakingUndelegateImpl) GetTypeUrl() string {
|
||||
return rcv.TypeUrl
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingUndelegateImpl) GetDelegatorAddress() string {
|
||||
return rcv.DelegatorAddress
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingUndelegateImpl) GetValidatorAddress() string {
|
||||
return rcv.ValidatorAddress
|
||||
}
|
||||
|
||||
func (rcv *MsgStakingUndelegateImpl) GetAmount() *pkl.Object {
|
||||
return rcv.Amount
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
// Base class for all proposals
|
||||
type Proposal struct {
|
||||
// The title of the proposal
|
||||
Title string `pkl:"title"`
|
||||
|
||||
// The description of the proposal
|
||||
Description string `pkl:"description"`
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
// Represents a transaction body
|
||||
type TxBody struct {
|
||||
Messages []Msg `pkl:"messages"`
|
||||
|
||||
Memo *string `pkl:"memo"`
|
||||
|
||||
TimeoutHeight *int `pkl:"timeoutHeight"`
|
||||
|
||||
ExtensionOptions *[]*pkl.Object `pkl:"extensionOptions"`
|
||||
|
||||
NonCriticalExtensionOptions *[]*pkl.Object `pkl:"nonCriticalExtensionOptions"`
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/apple/pkl-go/pkl"
|
||||
)
|
||||
|
||||
type Txns struct {
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Txns
|
||||
func LoadFromPath(ctx context.Context, path string) (ret *Txns, 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 Txns
|
||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Txns, error) {
|
||||
var ret Txns
|
||||
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ret, nil
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
func init() {
|
||||
pkl.RegisterMapping("txns", Txns{})
|
||||
pkl.RegisterMapping("txns#Proposal", Proposal{})
|
||||
pkl.RegisterMapping("txns#MsgGovSubmitProposal", MsgGovSubmitProposalImpl{})
|
||||
pkl.RegisterMapping("txns#MsgGovVote", MsgGovVoteImpl{})
|
||||
pkl.RegisterMapping("txns#MsgGovDeposit", MsgGovDepositImpl{})
|
||||
pkl.RegisterMapping("txns#MsgGroupCreateGroup", MsgGroupCreateGroupImpl{})
|
||||
pkl.RegisterMapping("txns#MsgGroupSubmitProposal", MsgGroupSubmitProposalImpl{})
|
||||
pkl.RegisterMapping("txns#MsgGroupVote", MsgGroupVoteImpl{})
|
||||
pkl.RegisterMapping("txns#MsgStakingCreateValidator", MsgStakingCreateValidatorImpl{})
|
||||
pkl.RegisterMapping("txns#MsgStakingDelegate", MsgStakingDelegateImpl{})
|
||||
pkl.RegisterMapping("txns#MsgStakingUndelegate", MsgStakingUndelegateImpl{})
|
||||
pkl.RegisterMapping("txns#MsgStakingBeginRedelegate", MsgStakingBeginRedelegateImpl{})
|
||||
pkl.RegisterMapping("txns#MsgDidUpdateParams", MsgDidUpdateParamsImpl{})
|
||||
pkl.RegisterMapping("txns#MsgDidAllocateVault", MsgDidAllocateVaultImpl{})
|
||||
pkl.RegisterMapping("txns#MsgDidProveWitness", MsgDidProveWitnessImpl{})
|
||||
pkl.RegisterMapping("txns#MsgDidSyncVault", MsgDidSyncVaultImpl{})
|
||||
pkl.RegisterMapping("txns#MsgDidRegisterController", MsgDidRegisterControllerImpl{})
|
||||
pkl.RegisterMapping("txns#MsgDidAuthorize", MsgDidAuthorizeImpl{})
|
||||
pkl.RegisterMapping("txns#MsgDidRegisterService", MsgDidRegisterServiceImpl{})
|
||||
pkl.RegisterMapping("txns#TxBody", TxBody{})
|
||||
}
|
||||
@@ -17,7 +17,7 @@ type Element = accumulator.Element
|
||||
type Witness []byte
|
||||
|
||||
// NewProof creates a new Proof which is used for ZKP
|
||||
func NewProof(id, controller, issuer, property string, pubKey []byte) (*Proof, error) {
|
||||
func NewProof(issuer, property string, pubKey []byte) (*Proof, error) {
|
||||
input := append(pubKey, []byte(property)...)
|
||||
hash := []byte(input)
|
||||
|
||||
@@ -33,8 +33,6 @@ func NewProof(id, controller, issuer, property string, pubKey []byte) (*Proof, e
|
||||
}
|
||||
|
||||
return &Proof{
|
||||
Id: id,
|
||||
Controller: controller,
|
||||
Issuer: issuer,
|
||||
Property: property,
|
||||
Accumulator: keyBytes,
|
||||
@@ -117,7 +115,6 @@ func VerifyWitness(proof *Proof, acc Accumulator, witness Witness) error {
|
||||
if err := witnessObj.UnmarshalBinary(witness); err != nil {
|
||||
return fmt.Errorf("failed to unmarshal witness: %w", err)
|
||||
}
|
||||
|
||||
return witnessObj.Verify(publicKey, accObj)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user