diff --git a/.circleci/config.yml b/.circleci/config.yml index 51563267..2761421e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 executors: perun-node-executor: docker: - - image: cimg/go:1.16.4-node + - image: cimg/go:1.19.10-node environment: RESULTS: /tmp/results ARTIFACTS: /tmp/artifacts @@ -58,7 +58,7 @@ jobs: - make-results-artifacts-dir - run: name: Install linter - command: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.40.1 + command: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3 - install-txt-to-html-coverter-aha - run: name: Run linter diff --git a/.gitignore b/.gitignore index 3ec2acd6..2bcf7eea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ app/payment/perun.log +demo diff --git a/.golangci.yml b/.golangci.yml index 9f5b17fb..ca9c8ec5 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -34,14 +34,11 @@ linters: # restrict dependencies - depguard # detect unused, duplicate code - - deadcode - dupl - goconst - - structcheck - unconvert - unparam - unused - - varcheck # check code complexity - funlen - gocognit @@ -61,11 +58,13 @@ linters-settings: check-blank: true depguard: - list-type: blacklist - include-go-root: true - packages-with-error-message: - - github.com/ethereum/go-ethereum: "It contains code licensed under LGPL, import is allowed only inside perun-node/blockchain/ethereum" - - perun.network/go-perun/backend/ethereum: "It uses code licensed under LGPL, import is allowed only inside perun-node/blockchain/ethereum" + rules: + main: + deny: + - pkg: "github.com/ethereum/go-ethereum" + desc: It contains code licensed under LGPL, import is allowed only inside perun-node/blockchain/ethereum + - pkg: "perun.network/go-perun/backend/ethereum" + desc: It uses code licensed under LGPL, import is allowed only inside perun-node/blockchain/ethereum" dupl: # tokens count to trigger issue, 150 by default diff --git a/MAINTAINERS.md b/MAINTAINERS.md index cd0d8277..753e13ab 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -7,27 +7,21 @@ single approval from a non-author maintainer for pull requests to be merged. -| Name | GitHub | [Chat][_chat-url] | -| ---------------- | ----------------------------------------------- | ----------------- | -| Chris Hoeppler | [choeppler](https://github.com/choeppler) | choeppler | -| Daniel Kunz | [danielksan81](https://github.com/danielksan81) | danielksan81 | -| Manoranjith | [manoranjith](https://github.com/manoranjith) | mano-ranjith | +| Name | GitHub | [Discord][_chat-url] | +| ---------------- | ----------------------------------------------- | -------------------- | +| Chris Hoeppler | [choeppler](https://github.com/choeppler) | choeppler#8002 | +| Daniel Kunz | [danielksan81](https://github.com/danielksan81) | danielksan81#1327 | +| Manoranjith | [manoranjith](https://github.com/manoranjith) | manoranjith#8124 | ## Emeritus Maintainers -| Name | GitHub | [Chat][_chat-url] | -| ---------------- | ----------------------------------------------- | ----------------- | -| Anagha Sukumaran | [anagha-ks](https://github.com/anagha-ks) | anagha-ks | +| Name | GitHub | [Discord][_chat-url] | +| ---------------- | ----------------------------------------------- | -------------------- | +| Anagha Sukumaran | [anagha-ks](https://github.com/anagha-ks) | | -[_chat-url]: https://chat.hyperledger.org/channel/perun - -## Emeritus Maintainers - -| Name | GitHub | Chat | Email | -| ------ | ------ | ---- | ----- | -|   | | | | +[_chat-url]: https://discord.com/channels/905194001349627914/955484679635632148 --- This work is licensed under a [Creative Commons Attribution 4.0 International diff --git a/Makefile b/Makefile index 4e649e38..febedc53 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,19 @@ CLI_BIN := perunnodecli TUI_PKG := ./cmd/perunnodetui TUI_BIN := perunnodetui +DEMO_DIR := demo + LDFLAGS=-ldflags "-X 'main.version=$(VERSION)' -X 'main.gitCommitID=$(GIT_COMMIT_ID)' -X 'main.goperunVersion=$(GOPERUN_VERSION)'" -build: - go build $(LDFLAGS) $(NODE_PKG) - go build $(CLI_PKG) - go build $(TUI_PKG) +install: + go install $(LDFLAGS) $(NODE_PKG) + go install $(CLI_PKG) + go install $(TUI_PKG) + +generate: install + @mkdir $(DEMO_DIR) + @cd $(DEMO_DIR) && $(NODE_BIN) generate + @echo "Configuration files for demo generated in ./$(DEMO_DIR)" clean: - rm -rf $(NODE_BIN) $(CLI_BIN) $(TUI_BIN) node.yaml alice bob + rm -rf demo diff --git a/README.md b/README.md index 1a90b5a7..2cdb7f1f 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ For a tutorial on using perun-node with `perunnodecli`, see the on the project documentation website. For a tutorial on using perun-node with `perunnodetui`, see -[this section](cmd/perunnodetui/Readme.md). A talk on overview of perun, +[this section](cmd/perunnodetui/README.md). A talk on overview of perun, including a hands-on demo of using the perunnode with `perunnodetui` can be found [here](https://youtu.be/sASYSJm3QKw?t=916). @@ -85,7 +85,7 @@ found [here](https://youtu.be/sASYSJm3QKw?t=916). Install the following pre-requisites. - 1. Go (v1.14 or later). + 1. Go (v1.19 or later). 2. ganache-cli (v6.9.1 or later). Clone the project and sync the dependencies: @@ -114,7 +114,7 @@ Run the linter and tests from the project root directory: golangci-lint run ./... # Test -go test -tags=integration -count=1 ./... +go test -tags=integration -count=1 -p=1 ./... # Build perunnode and perunnodecli binaries make diff --git a/api/grpc/funding.go b/api/grpc/funding.go new file mode 100644 index 00000000..04796f73 --- /dev/null +++ b/api/grpc/funding.go @@ -0,0 +1,82 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package grpc + +import ( + "context" + + "github.com/hyperledger-labs/perun-node/api/grpc/pb" + "github.com/hyperledger-labs/perun-node/api/handlers" +) + +// fundingServer represents a grpc server that can serve funding API. +type fundingServer struct { + pb.UnimplementedFunding_APIServer + *handlers.FundingHandler +} + +// Fund wraps session.Fund. +func (a *fundingServer) Fund(ctx context.Context, req *pb.FundReq) (*pb.FundResp, error) { + return a.FundingHandler.Fund(ctx, req) +} + +// RegisterAssetERC20 is a stub that always returns false. Because, the remote +// funder does not support use of assets other than the default ERC20 asset. +// +// TODO: Make actual implementation. +func (a *fundingServer) RegisterAssetERC20(ctx context.Context, req *pb.RegisterAssetERC20Req) ( + *pb.RegisterAssetERC20Resp, error, +) { + return a.FundingHandler.RegisterAssetERC20(ctx, req) +} + +// IsAssetRegistered wraps session.IsAssetRegistered. +func (a *fundingServer) IsAssetRegistered(ctx context.Context, req *pb.IsAssetRegisteredReq) ( + *pb.IsAssetRegisteredResp, + error, +) { + return a.FundingHandler.IsAssetRegistered(ctx, req) +} + +// Register wraps session.Register. +func (a *fundingServer) Register(ctx context.Context, req *pb.RegisterReq) (*pb.RegisterResp, error) { + return a.FundingHandler.Register(ctx, req) +} + +// Withdraw wraps session.Withdraw. +func (a *fundingServer) Withdraw(ctx context.Context, req *pb.WithdrawReq) (*pb.WithdrawResp, error) { + return a.FundingHandler.Withdraw(ctx, req) +} + +// Progress wraps session.Progress. +func (a *fundingServer) Progress(ctx context.Context, req *pb.ProgressReq) (*pb.ProgressResp, error) { + return a.FundingHandler.Progress(ctx, req) +} + +// Subscribe wraps session.Subscribe. + +func (a *fundingServer) Subscribe(req *pb.SubscribeReq, stream pb.Funding_API_SubscribeServer) error { + notify := func(notif *pb.SubscribeResp) error { + return stream.Send(notif) + } + + return a.FundingHandler.Subscribe(req, notify) +} + +func (a *fundingServer) Unsubscribe(ctx context.Context, req *pb.UnsubscribeReq) (*pb.UnsubscribeResp, error) { + return a.FundingHandler.Unsubscribe(ctx, req) +} diff --git a/api/grpc/payment.go b/api/grpc/payment.go new file mode 100644 index 00000000..01ed3338 --- /dev/null +++ b/api/grpc/payment.go @@ -0,0 +1,662 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package grpc + +import ( + "context" + + "github.com/pkg/errors" + psync "polycry.pt/poly-go/sync" + + "github.com/hyperledger-labs/perun-node" + "github.com/hyperledger-labs/perun-node/api/grpc/pb" + "github.com/hyperledger-labs/perun-node/app/payment" +) + +// payChAPIServer represents a grpc server that can serve payment channel API. +type payChAPIServer struct { + pb.UnimplementedPayment_APIServer + n perun.NodeAPI + + // The mutex should be used when accessing the map data structures. + psync.Mutex + + // These maps are used to hold an signal channel for each active subscription. + // When a subscription is registered, subscribe function will add an entry to the + // map corresponding to the subscription type. + // The unsubscribe call should retrieve the channel from the map and close it, which + // will signal the subscription routine to end. + // + // chProposalsNotif works on per session basis and hence this is a map + // of session id to signaling channel. + // chUpdatesNotif works on a per channel basis and hence this is a map of session id to + // channel id to signaling channel. + + chProposalsNotif map[string]chan bool + chUpdatesNotif map[string]map[string]chan bool +} + +// GetConfig wraps node.GetConfig. +func (a *payChAPIServer) GetConfig(context.Context, *pb.GetConfigReq) (*pb.GetConfigResp, error) { + cfg := a.n.GetConfig() + return &pb.GetConfigResp{ + ChainAddress: cfg.ChainURL, + Adjudicator: cfg.Adjudicator, + AssetETH: cfg.AssetETH, + CommTypes: cfg.CommTypes, + IdProviderTypes: cfg.IDProviderTypes, + }, nil +} + +// Time wraps node.Time. +func (a *payChAPIServer) Time(context.Context, *pb.TimeReq) (*pb.TimeResp, error) { + return &pb.TimeResp{ + Time: a.n.Time(), + }, nil +} + +// RegisterCurrency wraps node.RegisterCurrency. +func (a *payChAPIServer) RegisterCurrency(_ context.Context, req *pb.RegisterCurrencyReq) ( + *pb.RegisterCurrencyResp, error, +) { + errResponse := func(err perun.APIError) *pb.RegisterCurrencyResp { + return &pb.RegisterCurrencyResp{ + Response: &pb.RegisterCurrencyResp_Error{ + Error: pb.FromError(err), + }, + } + } + + symbol, err := a.n.RegisterCurrency(req.TokenAddr, req.AssetAddr) + if err != nil { + return errResponse(err), nil + } + + return &pb.RegisterCurrencyResp{ + Response: &pb.RegisterCurrencyResp_MsgSuccess_{ + MsgSuccess: &pb.RegisterCurrencyResp_MsgSuccess{ + Symbol: symbol, + }, + }, + }, nil +} + +// Help wraps node.Help. +func (a *payChAPIServer) Help(context.Context, *pb.HelpReq) (*pb.HelpResp, error) { + return &pb.HelpResp{ + Apis: a.n.Help(), + }, nil +} + +// OpenSession wraps node.OpenSession. +func (a *payChAPIServer) OpenSession(_ context.Context, req *pb.OpenSessionReq) (*pb.OpenSessionResp, error) { + errResponse := func(err perun.APIError) *pb.OpenSessionResp { + return &pb.OpenSessionResp{ + Response: &pb.OpenSessionResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sessionID, restoredChs, err := payment.OpenSession(a.n, req.ConfigFile) + if err != nil { + return errResponse(err), nil + } + + a.Lock() + a.chUpdatesNotif[sessionID] = make(map[string]chan bool) + a.Unlock() + + return &pb.OpenSessionResp{ + Response: &pb.OpenSessionResp_MsgSuccess_{ + MsgSuccess: &pb.OpenSessionResp_MsgSuccess{ + SessionID: sessionID, + RestoredChs: pb.FromPayChsInfo(restoredChs), + }, + }, + }, nil +} + +// AddPeerID wraps session.AddPeerID. +func (a *payChAPIServer) AddPeerID(_ context.Context, req *pb.AddPeerIDReq) (*pb.AddPeerIDResp, error) { + errResponse := func(err perun.APIError) *pb.AddPeerIDResp { + return &pb.AddPeerIDResp{ + Response: &pb.AddPeerIDResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + err = sess.AddPeerID(perun.PeerID{ + Alias: req.PeerID.Alias, + OffChainAddrString: req.PeerID.OffChainAddress, + CommAddr: req.PeerID.CommAddress, + CommType: req.PeerID.CommType, + }) + if err != nil { + return errResponse(err), nil + } + + return &pb.AddPeerIDResp{ + Response: &pb.AddPeerIDResp_MsgSuccess_{ + MsgSuccess: &pb.AddPeerIDResp_MsgSuccess{ + Success: true, + }, + }, + }, nil +} + +// GetPeerID wraps session.GetPeerID. +func (a *payChAPIServer) GetPeerID(_ context.Context, req *pb.GetPeerIDReq) (*pb.GetPeerIDResp, error) { + errResponse := func(err perun.APIError) *pb.GetPeerIDResp { + return &pb.GetPeerIDResp{ + Response: &pb.GetPeerIDResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + peerID, err := sess.GetPeerID(req.Alias) + if err != nil { + return errResponse(err), nil + } + + return &pb.GetPeerIDResp{ + Response: &pb.GetPeerIDResp_MsgSuccess_{ + MsgSuccess: &pb.GetPeerIDResp_MsgSuccess{ + PeerID: &pb.PeerID{ + Alias: peerID.Alias, + OffChainAddress: peerID.OffChainAddrString, + CommAddress: peerID.CommAddr, + CommType: peerID.CommType, + }, + }, + }, + }, nil +} + +// OpenPayCh wraps payment.OpenPayCh. +func (a *payChAPIServer) OpenPayCh(ctx context.Context, req *pb.OpenPayChReq) (*pb.OpenPayChResp, error) { + errResponse := func(err perun.APIError) *pb.OpenPayChResp { + return &pb.OpenPayChResp{ + Response: &pb.OpenPayChResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + openingBalInfo := pb.ToBalInfo(req.OpeningBalInfo) + payChInfo, err := payment.OpenPayCh(ctx, sess, openingBalInfo, req.ChallengeDurSecs) + if err != nil { + return errResponse(err), nil + } + + return &pb.OpenPayChResp{ + Response: &pb.OpenPayChResp_MsgSuccess_{ + MsgSuccess: &pb.OpenPayChResp_MsgSuccess{ + OpenedPayChInfo: &pb.PayChInfo{ + ChID: payChInfo.ChID, + BalInfo: pb.FromBalInfo(payChInfo.BalInfo), + Version: payChInfo.Version, + }, + }, + }, + }, nil +} + +// GetPayChsInfo wraps payment.GetPayChs. +func (a *payChAPIServer) GetPayChsInfo(_ context.Context, req *pb.GetPayChsInfoReq) (*pb.GetPayChsInfoResp, error) { + errResponse := func(err perun.APIError) *pb.GetPayChsInfoResp { + return &pb.GetPayChsInfoResp{ + Response: &pb.GetPayChsInfoResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + openPayChsInfo := payment.GetPayChsInfo(sess) + if err != nil { + return errResponse(err), nil + } + + return &pb.GetPayChsInfoResp{ + Response: &pb.GetPayChsInfoResp_MsgSuccess_{ + MsgSuccess: &pb.GetPayChsInfoResp_MsgSuccess{ + OpenPayChsInfo: pb.FromPayChsInfo(openPayChsInfo), + }, + }, + }, nil +} + +// SubPayChProposals wraps payment.SubPayChProposals. +func (a *payChAPIServer) SubPayChProposals(req *pb.SubPayChProposalsReq, + srv pb.Payment_API_SubPayChProposalsServer, +) error { + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + // TODO: (mano) Return a error response and not a protocol error + return errors.WithMessage(err, "cannot register subscription") + } + + notifier := func(notif payment.PayChProposalNotif) { + err := srv.Send(&pb.SubPayChProposalsResp{Response: &pb.SubPayChProposalsResp_Notify_{ + Notify: &pb.SubPayChProposalsResp_Notify{ + ProposalID: notif.ProposalID, + OpeningBalInfo: pb.FromBalInfo(notif.OpeningBalInfo), + ChallengeDurSecs: notif.ChallengeDurSecs, + Expiry: notif.Expiry, + }, + }}) + _ = err + // if err != nil { + // TODO: (mano) Handle error while sending. + // } + } + err = payment.SubPayChProposals(sess, notifier) + if err != nil { + // TODO: (mano) Return a error response and not a protocol error + return errors.WithMessage(err, "cannot register subscription") + } + + signal := make(chan bool) + a.Lock() + a.chProposalsNotif[req.SessionID] = signal + a.Unlock() + + <-signal + return nil +} + +// UnsubPayChProposals wraps payment.UnsubPayChProposals. +func (a *payChAPIServer) UnsubPayChProposals(_ context.Context, req *pb.UnsubPayChProposalsReq) ( + *pb.UnsubPayChProposalsResp, error, +) { + errResponse := func(err perun.APIError) *pb.UnsubPayChProposalsResp { + return &pb.UnsubPayChProposalsResp{ + Response: &pb.UnsubPayChProposalsResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + err = payment.UnsubPayChProposals(sess) + if err != nil { + return errResponse(err), nil + } + + a.closeGrpcPayChProposalSub(req.SessionID) + + return &pb.UnsubPayChProposalsResp{ + Response: &pb.UnsubPayChProposalsResp_MsgSuccess_{ + MsgSuccess: &pb.UnsubPayChProposalsResp_MsgSuccess{ + Success: true, + }, + }, + }, nil +} + +func (a *payChAPIServer) closeGrpcPayChProposalSub(sessionID string) { + a.Lock() + signal := a.chProposalsNotif[sessionID] + delete(a.chProposalsNotif, sessionID) + a.Unlock() + close(signal) +} + +// RespondPayChProposal wraps payment.RespondPayChProposal. +func (a *payChAPIServer) RespondPayChProposal(ctx context.Context, req *pb.RespondPayChProposalReq) ( + *pb.RespondPayChProposalResp, error, +) { + errResponse := func(err perun.APIError) *pb.RespondPayChProposalResp { + return &pb.RespondPayChProposalResp{ + Response: &pb.RespondPayChProposalResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + openedPayChInfo, err := payment.RespondPayChProposal(ctx, sess, req.ProposalID, req.Accept) + if err != nil { + return errResponse(err), nil + } + + return &pb.RespondPayChProposalResp{ + Response: &pb.RespondPayChProposalResp_MsgSuccess_{ + MsgSuccess: &pb.RespondPayChProposalResp_MsgSuccess{ + OpenedPayChInfo: pb.FromPayChInfo(openedPayChInfo), + }, + }, + }, nil +} + +// CloseSession wraps payment.CloseSession. +func (a *payChAPIServer) CloseSession(_ context.Context, req *pb.CloseSessionReq) (*pb.CloseSessionResp, error) { + errResponse := func(err perun.APIError) *pb.CloseSessionResp { + return &pb.CloseSessionResp{ + Response: &pb.CloseSessionResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + openPayChsInfo, err := payment.CloseSession(sess, req.Force) + if err != nil { + return errResponse(err), nil + } + + return &pb.CloseSessionResp{ + Response: &pb.CloseSessionResp_MsgSuccess_{ + MsgSuccess: &pb.CloseSessionResp_MsgSuccess{ + OpenPayChsInfo: pb.FromPayChsInfo(openPayChsInfo), + }, + }, + }, nil +} + +// DeployAssetERC20 wraps session.DeployAssetERC20. +func (a *payChAPIServer) DeployAssetERC20(_ context.Context, req *pb.DeployAssetERC20Req) ( + *pb.DeployAssetERC20Resp, error, +) { + errResponse := func(err perun.APIError) *pb.DeployAssetERC20Resp { + return &pb.DeployAssetERC20Resp{ + Response: &pb.DeployAssetERC20Resp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + assetAddr, err := sess.DeployAssetERC20(req.TokenAddr) + if err != nil { + return errResponse(err), nil + } + + return &pb.DeployAssetERC20Resp{ + Response: &pb.DeployAssetERC20Resp_MsgSuccess_{ + MsgSuccess: &pb.DeployAssetERC20Resp_MsgSuccess{ + AssetAddr: assetAddr, + }, + }, + }, nil +} + +// SendPayChUpdate wraps payment.SendPayChUpdate. +func (a *payChAPIServer) SendPayChUpdate(ctx context.Context, req *pb.SendPayChUpdateReq) ( + *pb.SendPayChUpdateResp, error, +) { + errResponse := func(err perun.APIError) *pb.SendPayChUpdateResp { + return &pb.SendPayChUpdateResp{ + Response: &pb.SendPayChUpdateResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + ch, err := sess.GetCh(req.ChID) + if err != nil { + return errResponse(err), nil + } + updatedPayChInfo, err := payment.SendPayChUpdate(ctx, ch, pb.ToPayments(req.Payments)) + if err != nil { + return errResponse(err), nil + } + + return &pb.SendPayChUpdateResp{ + Response: &pb.SendPayChUpdateResp_MsgSuccess_{ + MsgSuccess: &pb.SendPayChUpdateResp_MsgSuccess{ + UpdatedPayChInfo: pb.FromPayChInfo(updatedPayChInfo), + }, + }, + }, nil +} + +// SubPayChUpdates wraps payment.SubPayChUpdates. +func (a *payChAPIServer) SubPayChUpdates(req *pb.SubpayChUpdatesReq, srv pb.Payment_API_SubPayChUpdatesServer) error { + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + // TODO: (mano) Return a error response and not a protocol error. + return errors.WithMessage(err, "cannot register subscription") + } + ch, err := sess.GetCh(req.ChID) + if err != nil { + return errors.WithMessage(err, "cannot register subscription") + } + + notifier := func(notif payment.PayChUpdateNotif) { + var notifErr *pb.MsgError + if notif.Error != nil { + notifErr = pb.FromError(notif.Error) + } + + err := srv.Send(&pb.SubPayChUpdatesResp{Response: &pb.SubPayChUpdatesResp_Notify_{ + Notify: &pb.SubPayChUpdatesResp_Notify{ + UpdateID: notif.UpdateID, + ProposedPayChInfo: pb.FromPayChInfo(notif.ProposedPayChInfo), + Type: ToGrpcChUpdateType[notif.Type], + Expiry: notif.Expiry, + Error: notifErr, + }, + }}) + _ = err + // if err != nil { + // // TODO: (mano) Error handling when sending notification. + // } + + // Close grpc subscription function (SubPayChUpdates) that will be running in the background. + if perun.ChUpdateTypeClosed == notif.Type { + a.closeGrpcPayChUpdateSub(req.SessionID, req.ChID) + } + } + err = payment.SubPayChUpdates(ch, notifier) + if err != nil { + // TODO: (mano) Error handling when sending notification. + return errors.WithMessage(err, "cannot register subscription") + } + + signal := make(chan bool) + a.Lock() + a.chUpdatesNotif[req.SessionID][req.ChID] = signal + a.Unlock() + + <-signal + return nil +} + +// ToGrpcChUpdateType is a helper var that maps enums from ChUpdateType type defined in perun-node +// to ChUpdateType type defined in grpc package. +var ToGrpcChUpdateType = map[perun.ChUpdateType]pb.SubPayChUpdatesResp_Notify_ChUpdateType{ + perun.ChUpdateTypeOpen: pb.SubPayChUpdatesResp_Notify_open, + perun.ChUpdateTypeFinal: pb.SubPayChUpdatesResp_Notify_final, + perun.ChUpdateTypeClosed: pb.SubPayChUpdatesResp_Notify_closed, +} + +// UnsubPayChUpdates wraps payment.UnsubPayChUpdates. +func (a *payChAPIServer) UnsubPayChUpdates(_ context.Context, req *pb.UnsubPayChUpdatesReq) ( + *pb.UnsubPayChUpdatesResp, error, +) { + errResponse := func(err perun.APIError) *pb.UnsubPayChUpdatesResp { + return &pb.UnsubPayChUpdatesResp{ + Response: &pb.UnsubPayChUpdatesResp_Error{ + Error: pb.FromError(err), + }, + } + } + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + ch, err := sess.GetCh(req.ChID) + if err != nil { + return errResponse(err), nil + } + err = payment.UnsubPayChUpdates(ch) + if err != nil { + return errResponse(err), nil + } + a.closeGrpcPayChUpdateSub(req.SessionID, req.ChID) + + return &pb.UnsubPayChUpdatesResp{ + Response: &pb.UnsubPayChUpdatesResp_MsgSuccess_{ + MsgSuccess: &pb.UnsubPayChUpdatesResp_MsgSuccess{ + Success: true, + }, + }, + }, nil +} + +func (a *payChAPIServer) closeGrpcPayChUpdateSub(sessionID, chID string) { + a.Lock() + signal := a.chUpdatesNotif[sessionID][chID] + delete(a.chUpdatesNotif[sessionID], chID) + a.Unlock() + close(signal) +} + +// RespondPayChUpdate wraps payment.RespondPayChUpdate. +func (a *payChAPIServer) RespondPayChUpdate(ctx context.Context, req *pb.RespondPayChUpdateReq) ( + *pb.RespondPayChUpdateResp, error, +) { + errResponse := func(err perun.APIError) *pb.RespondPayChUpdateResp { + return &pb.RespondPayChUpdateResp{ + Response: &pb.RespondPayChUpdateResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + ch, err := sess.GetCh(req.ChID) + if err != nil { + return errResponse(err), nil + } + updatedPayChInfo, err := payment.RespondPayChUpdate(ctx, ch, req.UpdateID, req.Accept) + if err != nil { + return errResponse(err), nil + } + + return &pb.RespondPayChUpdateResp{ + Response: &pb.RespondPayChUpdateResp_MsgSuccess_{ + MsgSuccess: &pb.RespondPayChUpdateResp_MsgSuccess{ + UpdatedPayChInfo: pb.FromPayChInfo(updatedPayChInfo), + }, + }, + }, nil +} + +// GetPayChInfo wraps payment.GetBalInfo. +func (a *payChAPIServer) GetPayChInfo(_ context.Context, req *pb.GetPayChInfoReq) ( + *pb.GetPayChInfoResp, error, +) { + errResponse := func(err perun.APIError) *pb.GetPayChInfoResp { + return &pb.GetPayChInfoResp{ + Response: &pb.GetPayChInfoResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + ch, err := sess.GetCh(req.ChID) + if err != nil { + return errResponse(err), nil + } + payChInfo := payment.GetPayChInfo(ch) + if err != nil { + return errResponse(err), nil + } + + return &pb.GetPayChInfoResp{ + Response: &pb.GetPayChInfoResp_MsgSuccess_{ + MsgSuccess: &pb.GetPayChInfoResp_MsgSuccess{ + PayChInfo: pb.FromPayChInfo(payChInfo), + }, + }, + }, nil +} + +// ClosePayCh wraps payment.ClosePayCh. +func (a *payChAPIServer) ClosePayCh(ctx context.Context, req *pb.ClosePayChReq) (*pb.ClosePayChResp, error) { + errResponse := func(err perun.APIError) *pb.ClosePayChResp { + return &pb.ClosePayChResp{ + Response: &pb.ClosePayChResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.n.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + ch, err := sess.GetCh(req.ChID) + if err != nil { + return errResponse(err), nil + } + closedPayChInfo, err := payment.ClosePayCh(ctx, ch) + if err != nil { + return errResponse(err), nil + } + + return &pb.ClosePayChResp{ + Response: &pb.ClosePayChResp_MsgSuccess_{ + MsgSuccess: &pb.ClosePayChResp_MsgSuccess{ + ClosedPayChInfo: pb.FromPayChInfo(closedPayChInfo), + }, + }, + }, nil +} diff --git a/api/grpc/server_integ_test.go b/api/grpc/payment_integ_test.go similarity index 94% rename from api/grpc/server_integ_test.go rename to api/grpc/payment_integ_test.go index b95ab8a3..53d3620f 100644 --- a/api/grpc/server_integ_test.go +++ b/api/grpc/payment_integ_test.go @@ -60,9 +60,9 @@ func StartServer(t *testing.T, nodeCfg perun.NodeConfig, grpcPort string) { nodeAPI, err := node.New(nodeCfg) require.NoErrorf(t, err, "initializing nodeAPI") - t.Log("Started ListenAndServePayChAPI") + t.Log("Started grpc service") go func() { - if err := grpc.ListenAndServePayChAPI(nodeAPI, grpcPort); err != nil { + if err := grpc.ServePaymentAPI(nodeAPI, grpcPort); err != nil { t.Logf("server returned with error: %v", err) } }() @@ -171,7 +171,7 @@ func Test_Integ_Role(t *testing.T) { wg.Done() }() sub := SubPayChProposal(t, bobSessionID) - notif := ReadPayChProposalNotif(t, bobSessionID, sub, false) + notif := ReadPayChProposalNotif(t, sub, false) RespondPayChProposal(t, bobSessionID, notif.Notify.ProposalID, true, false) UnsubPayChProposal(t, bobSessionID, false) @@ -220,7 +220,7 @@ func Test_Integ_Role(t *testing.T) { wg.Done() }() sub := SubPayChProposal(t, aliceSessionID) - notif := ReadPayChProposalNotif(t, aliceSessionID, sub, false) + notif := ReadPayChProposalNotif(t, sub, false) RespondPayChProposal(t, aliceSessionID, notif.Notify.ProposalID, false, false) UnsubPayChProposal(t, aliceSessionID, false) @@ -239,7 +239,7 @@ func Test_Integ_Role(t *testing.T) { }() sub := SubPayChUpdate(t, aliceSessionID, chID) - notif := ReadPayChUpdateNotif(t, aliceSessionID, chID, sub) + notif := ReadPayChUpdateNotif(t, sub) assert.EqualValues(t, perun.ChUpdateTypeOpen, notif.Notify.Type) RespondPayChUpdate(t, aliceSessionID, chID, notif.Notify.UpdateID, accept) UnsubPayChUpdate(t, aliceSessionID, chID) @@ -247,7 +247,7 @@ func Test_Integ_Role(t *testing.T) { wg.Wait() } - // nolint: govet // it is okay to use unkeyed fields in Payment struct. + //nolint:govet // it is okay to use unkeyed fields in Payment struct. tests := []struct { name string chID string @@ -297,17 +297,17 @@ func Test_Integ_Role(t *testing.T) { wg.Add(2) go func() { sub := SubPayChUpdate(t, aliceSessionID, chID) - notif := ReadPayChUpdateNotif(t, aliceSessionID, chID, sub) + notif := ReadPayChUpdateNotif(t, sub) assert.EqualValues(t, perun.ChUpdateTypeFinal, notif.Notify.Type) RespondPayChUpdate(t, aliceSessionID, chID, notif.Notify.UpdateID, true) - notif = ReadPayChUpdateNotif(t, aliceSessionID, chID, sub) + notif = ReadPayChUpdateNotif(t, sub) assert.EqualValues(t, perun.ChUpdateTypeClosed, notif.Notify.Type) wg.Done() }() go func() { sub := SubPayChUpdate(t, bobSessionID, chID) - notif := ReadPayChUpdateNotif(t, bobSessionID, chID, sub) + notif := ReadPayChUpdateNotif(t, sub) assert.EqualValues(t, perun.ChUpdateTypeClosed, notif.Notify.Type) RespondPayChUpdateExpectError(t, bobSessionID, chID, notif.Notify.UpdateID, true) @@ -343,7 +343,7 @@ func Test_Integ_Role(t *testing.T) { OpenPayCh(t, bobSessionID, []string{"ETH"}, []string{perun.OwnAlias, aliceAlias}, [][]string{{"1", "2"}}, true) sub := SubPayChProposal(t, aliceSessionID) - ReadPayChProposalNotif(t, aliceSessionID, sub, true) + ReadPayChProposalNotif(t, sub, true) RespondPayChProposal(t, aliceSessionID, "", false, true) UnsubPayChProposal(t, aliceSessionID, true) }) @@ -433,7 +433,7 @@ func AddPeerID(t *testing.T, sessionID string, peerID *pb.PeerID) { func OpenPayCh(t *testing.T, sessionID string, currencies, parts []string, bals [][]string, wantErr bool) string { req := pb.OpenPayChReq{ SessionID: sessionID, - OpeningBalInfo: grpc.ToGrpcBalInfo(perun.BalInfo{ + OpeningBalInfo: pb.FromBalInfo(perun.BalInfo{ Currencies: currencies, Parts: parts, Bals: bals, @@ -463,8 +463,9 @@ func SubPayChProposal(t *testing.T, sessionID string) pb.Payment_API_SubPayChPro return subClient } -func ReadPayChProposalNotif(t *testing.T, sessionID string, sub pb.Payment_API_SubPayChProposalsClient, - wantErr bool) *pb.SubPayChProposalsResp_Notify_ { +func ReadPayChProposalNotif(t *testing.T, sub pb.Payment_API_SubPayChProposalsClient, + wantErr bool, +) *pb.SubPayChProposalsResp_Notify_ { notifMsg, err := sub.Recv() if wantErr { @@ -518,7 +519,7 @@ func SendPayChUpdate(t *testing.T, sessionID, chID string, payments []payment.Pa req := pb.SendPayChUpdateReq{ SessionID: sessionID, ChID: chID, - Payments: grpc.ToGrpcPayments(payments), + Payments: pb.FromPayments(payments), } resp, err := client.SendPayChUpdate(ctx, &req) require.NoErrorf(t, err, "SendPayChUpdate") @@ -542,8 +543,9 @@ func SubPayChUpdate(t *testing.T, sessionID, chID string) pb.Payment_API_SubPayC return subClient } -func ReadPayChUpdateNotif(t *testing.T, sessionID, chID string, - sub pb.Payment_API_SubPayChUpdatesClient) *pb.SubPayChUpdatesResp_Notify_ { +func ReadPayChUpdateNotif(t *testing.T, + sub pb.Payment_API_SubPayChUpdatesClient, +) *pb.SubPayChUpdatesResp_Notify_ { notifMsg, err := sub.Recv() require.NoErrorf(t, err, "subClient.Recv") notif, ok := notifMsg.Response.(*pb.SubPayChUpdatesResp_Notify_) diff --git a/api/grpc/pb/api.pb.go b/api/grpc/pb/api.pb.go deleted file mode 100644 index c526c3cc..00000000 --- a/api/grpc/pb/api.pb.go +++ /dev/null @@ -1,7629 +0,0 @@ -// Copyright (c) 2020 - for information on the respective copyright owner -// see the NOTICE file and/or the repository at -// https://github.com/hyperledger-labs/perun-node -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 -// source: api.proto - -// Package pb contains proto3 definitions for user API and the corresponding -// generated code for grpc server and client. - -package pb - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type ErrorCategory int32 - -const ( - ErrorCategory_ParticipantError ErrorCategory = 0 - ErrorCategory_ClientError ErrorCategory = 1 - ErrorCategory_ProtocolError ErrorCategory = 2 - ErrorCategory_InternalError ErrorCategory = 3 -) - -// Enum value maps for ErrorCategory. -var ( - ErrorCategory_name = map[int32]string{ - 0: "ParticipantError", - 1: "ClientError", - 2: "ProtocolError", - 3: "InternalError", - } - ErrorCategory_value = map[string]int32{ - "ParticipantError": 0, - "ClientError": 1, - "ProtocolError": 2, - "InternalError": 3, - } -) - -func (x ErrorCategory) Enum() *ErrorCategory { - p := new(ErrorCategory) - *p = x - return p -} - -func (x ErrorCategory) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ErrorCategory) Descriptor() protoreflect.EnumDescriptor { - return file_api_proto_enumTypes[0].Descriptor() -} - -func (ErrorCategory) Type() protoreflect.EnumType { - return &file_api_proto_enumTypes[0] -} - -func (x ErrorCategory) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ErrorCategory.Descriptor instead. -func (ErrorCategory) EnumDescriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{0} -} - -type ErrorCode int32 - -const ( - // Though "0" is an invalid error code, we still define it, because - //proto3 requires that every enum definition should have 0 mapped to - //atleast one constant. - ErrorCode_DefaultInvalidCode ErrorCode = 0 - ErrorCode_ErrPeerRequestTimedOut ErrorCode = 101 - ErrorCode_ErrPeerRejected ErrorCode = 102 - ErrorCode_ErrPeerNotFunded ErrorCode = 103 - ErrorCode_ErrUserResponseTimedOut ErrorCode = 104 - ErrorCode_ErrResourceNotFound ErrorCode = 201 - ErrorCode_ErrResourceExists ErrorCode = 202 - ErrorCode_ErrInvalidArgument ErrorCode = 203 - ErrorCode_ErrFailedPreCondition ErrorCode = 204 - ErrorCode_ErrInvalidConfig ErrorCode = 205 - ErrorCode_ErrInvalidContracts ErrorCode = 206 - ErrorCode_ErrTxTimedOut ErrorCode = 301 - ErrorCode_ErrChainNotReachable ErrorCode = 302 - ErrorCode_ErrUnknownInternal ErrorCode = 401 -) - -// Enum value maps for ErrorCode. -var ( - ErrorCode_name = map[int32]string{ - 0: "DefaultInvalidCode", - 101: "ErrPeerRequestTimedOut", - 102: "ErrPeerRejected", - 103: "ErrPeerNotFunded", - 104: "ErrUserResponseTimedOut", - 201: "ErrResourceNotFound", - 202: "ErrResourceExists", - 203: "ErrInvalidArgument", - 204: "ErrFailedPreCondition", - 205: "ErrInvalidConfig", - 206: "ErrInvalidContracts", - 301: "ErrTxTimedOut", - 302: "ErrChainNotReachable", - 401: "ErrUnknownInternal", - } - ErrorCode_value = map[string]int32{ - "DefaultInvalidCode": 0, - "ErrPeerRequestTimedOut": 101, - "ErrPeerRejected": 102, - "ErrPeerNotFunded": 103, - "ErrUserResponseTimedOut": 104, - "ErrResourceNotFound": 201, - "ErrResourceExists": 202, - "ErrInvalidArgument": 203, - "ErrFailedPreCondition": 204, - "ErrInvalidConfig": 205, - "ErrInvalidContracts": 206, - "ErrTxTimedOut": 301, - "ErrChainNotReachable": 302, - "ErrUnknownInternal": 401, - } -) - -func (x ErrorCode) Enum() *ErrorCode { - p := new(ErrorCode) - *p = x - return p -} - -func (x ErrorCode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ErrorCode) Descriptor() protoreflect.EnumDescriptor { - return file_api_proto_enumTypes[1].Descriptor() -} - -func (ErrorCode) Type() protoreflect.EnumType { - return &file_api_proto_enumTypes[1] -} - -func (x ErrorCode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ErrorCode.Descriptor instead. -func (ErrorCode) EnumDescriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{1} -} - -type SubPayChUpdatesResp_Notify_ChUpdateType int32 - -const ( - SubPayChUpdatesResp_Notify_open SubPayChUpdatesResp_Notify_ChUpdateType = 0 - SubPayChUpdatesResp_Notify_final SubPayChUpdatesResp_Notify_ChUpdateType = 1 - SubPayChUpdatesResp_Notify_closed SubPayChUpdatesResp_Notify_ChUpdateType = 2 -) - -// Enum value maps for SubPayChUpdatesResp_Notify_ChUpdateType. -var ( - SubPayChUpdatesResp_Notify_ChUpdateType_name = map[int32]string{ - 0: "open", - 1: "final", - 2: "closed", - } - SubPayChUpdatesResp_Notify_ChUpdateType_value = map[string]int32{ - "open": 0, - "final": 1, - "closed": 2, - } -) - -func (x SubPayChUpdatesResp_Notify_ChUpdateType) Enum() *SubPayChUpdatesResp_Notify_ChUpdateType { - p := new(SubPayChUpdatesResp_Notify_ChUpdateType) - *p = x - return p -} - -func (x SubPayChUpdatesResp_Notify_ChUpdateType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SubPayChUpdatesResp_Notify_ChUpdateType) Descriptor() protoreflect.EnumDescriptor { - return file_api_proto_enumTypes[2].Descriptor() -} - -func (SubPayChUpdatesResp_Notify_ChUpdateType) Type() protoreflect.EnumType { - return &file_api_proto_enumTypes[2] -} - -func (x SubPayChUpdatesResp_Notify_ChUpdateType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SubPayChUpdatesResp_Notify_ChUpdateType.Descriptor instead. -func (SubPayChUpdatesResp_Notify_ChUpdateType) EnumDescriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{49, 0, 0} -} - -// Peer ID represents the data required to identify and communicate -// with a participant in the the off-chain network. -type PeerID struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` - OffChainAddress string `protobuf:"bytes,2,opt,name=offChainAddress,proto3" json:"offChainAddress,omitempty"` - CommAddress string `protobuf:"bytes,3,opt,name=commAddress,proto3" json:"commAddress,omitempty"` - CommType string `protobuf:"bytes,4,opt,name=commType,proto3" json:"commType,omitempty"` -} - -func (x *PeerID) Reset() { - *x = PeerID{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PeerID) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PeerID) ProtoMessage() {} - -func (x *PeerID) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PeerID.ProtoReflect.Descriptor instead. -func (*PeerID) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{0} -} - -func (x *PeerID) GetAlias() string { - if x != nil { - return x.Alias - } - return "" -} - -func (x *PeerID) GetOffChainAddress() string { - if x != nil { - return x.OffChainAddress - } - return "" -} - -func (x *PeerID) GetCommAddress() string { - if x != nil { - return x.CommAddress - } - return "" -} - -func (x *PeerID) GetCommType() string { - if x != nil { - return x.CommType - } - return "" -} - -// BalInfo represents the balance information of the channel: Currency and the channel balance. -// Balance is represented as two corresponding lists: -// Parts contains the list of aliases of the channel participants and -// Balance list contains the amount held by each channel participant in the give currency. -// -// A valid BalInfo should meet the following conditions, it should be validated when using them. -// 1. Lengths of Parts list and Balance list are equal. -// 2. All entries in Parts list are unique. -// 3. Parts list has an entry "self", that represents the user of the session. -// 4. No amount in Balance must be negative. -type BalInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Currencies []string `protobuf:"bytes,1,rep,name=currencies,proto3" json:"currencies,omitempty"` - Parts []string `protobuf:"bytes,2,rep,name=parts,proto3" json:"parts,omitempty"` - Bals []*BalInfoBal `protobuf:"bytes,3,rep,name=bals,proto3" json:"bals,omitempty"` -} - -func (x *BalInfo) Reset() { - *x = BalInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BalInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BalInfo) ProtoMessage() {} - -func (x *BalInfo) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BalInfo.ProtoReflect.Descriptor instead. -func (*BalInfo) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{1} -} - -func (x *BalInfo) GetCurrencies() []string { - if x != nil { - return x.Currencies - } - return nil -} - -func (x *BalInfo) GetParts() []string { - if x != nil { - return x.Parts - } - return nil -} - -func (x *BalInfo) GetBals() []*BalInfoBal { - if x != nil { - return x.Bals - } - return nil -} - -type PayChInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChID string `protobuf:"bytes,1,opt,name=chID,proto3" json:"chID,omitempty"` - BalInfo *BalInfo `protobuf:"bytes,2,opt,name=balInfo,proto3" json:"balInfo,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *PayChInfo) Reset() { - *x = PayChInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PayChInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PayChInfo) ProtoMessage() {} - -func (x *PayChInfo) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PayChInfo.ProtoReflect.Descriptor instead. -func (*PayChInfo) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{2} -} - -func (x *PayChInfo) GetChID() string { - if x != nil { - return x.ChID - } - return "" -} - -func (x *PayChInfo) GetBalInfo() *BalInfo { - if x != nil { - return x.BalInfo - } - return nil -} - -func (x *PayChInfo) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -type Payment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` - Payee string `protobuf:"bytes,2,opt,name=payee,proto3" json:"payee,omitempty"` - Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *Payment) Reset() { - *x = Payment{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Payment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Payment) ProtoMessage() {} - -func (x *Payment) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Payment.ProtoReflect.Descriptor instead. -func (*Payment) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{3} -} - -func (x *Payment) GetCurrency() string { - if x != nil { - return x.Currency - } - return "" -} - -func (x *Payment) GetPayee() string { - if x != nil { - return x.Payee - } - return "" -} - -func (x *Payment) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -type MsgError struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Category ErrorCategory `protobuf:"varint,1,opt,name=category,proto3,enum=pb.ErrorCategory" json:"category,omitempty"` - Code ErrorCode `protobuf:"varint,2,opt,name=code,proto3,enum=pb.ErrorCode" json:"code,omitempty"` - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - // Types that are assignable to AddInfo: - // *MsgError_ErrInfoPeerRequestTimedOut - // *MsgError_ErrInfoPeerRejected - // *MsgError_ErrInfoPeerNotFunded - // *MsgError_ErrInfoUserResponseTimedOut - // *MsgError_ErrInfoResourceNotFound - // *MsgError_ErrInfoResourceExists - // *MsgError_ErrInfoInvalidArgument - // *MsgError_ErrInfoFailedPreCondUnclosedChs - // *MsgError_ErrInfoInvalidConfig - // *MsgError_ErrInfoInvalidContracts - // *MsgError_ErrInfoTxTimedOut - // *MsgError_ErrInfoChainNotReachable - AddInfo isMsgError_AddInfo `protobuf_oneof:"addInfo"` -} - -func (x *MsgError) Reset() { - *x = MsgError{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgError) ProtoMessage() {} - -func (x *MsgError) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MsgError.ProtoReflect.Descriptor instead. -func (*MsgError) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgError) GetCategory() ErrorCategory { - if x != nil { - return x.Category - } - return ErrorCategory_ParticipantError -} - -func (x *MsgError) GetCode() ErrorCode { - if x != nil { - return x.Code - } - return ErrorCode_DefaultInvalidCode -} - -func (x *MsgError) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (m *MsgError) GetAddInfo() isMsgError_AddInfo { - if m != nil { - return m.AddInfo - } - return nil -} - -func (x *MsgError) GetErrInfoPeerRequestTimedOut() *ErrInfoPeerRequestTimedOut { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoPeerRequestTimedOut); ok { - return x.ErrInfoPeerRequestTimedOut - } - return nil -} - -func (x *MsgError) GetErrInfoPeerRejected() *ErrInfoPeerRejected { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoPeerRejected); ok { - return x.ErrInfoPeerRejected - } - return nil -} - -func (x *MsgError) GetErrInfoPeerNotFunded() *ErrInfoPeerNotFunded { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoPeerNotFunded); ok { - return x.ErrInfoPeerNotFunded - } - return nil -} - -func (x *MsgError) GetErrInfoUserResponseTimedOut() *ErrInfoUserResponseTimedOut { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoUserResponseTimedOut); ok { - return x.ErrInfoUserResponseTimedOut - } - return nil -} - -func (x *MsgError) GetErrInfoResourceNotFound() *ErrInfoResourceNotFound { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoResourceNotFound); ok { - return x.ErrInfoResourceNotFound - } - return nil -} - -func (x *MsgError) GetErrInfoResourceExists() *ErrInfoResourceExists { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoResourceExists); ok { - return x.ErrInfoResourceExists - } - return nil -} - -func (x *MsgError) GetErrInfoInvalidArgument() *ErrInfoInvalidArgument { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoInvalidArgument); ok { - return x.ErrInfoInvalidArgument - } - return nil -} - -func (x *MsgError) GetErrInfoFailedPreCondUnclosedChs() *ErrInfoFailedPreCondUnclosedChs { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoFailedPreCondUnclosedChs); ok { - return x.ErrInfoFailedPreCondUnclosedChs - } - return nil -} - -func (x *MsgError) GetErrInfoInvalidConfig() *ErrInfoInvalidConfig { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoInvalidConfig); ok { - return x.ErrInfoInvalidConfig - } - return nil -} - -func (x *MsgError) GetErrInfoInvalidContracts() *ErrInfoInvalidContracts { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoInvalidContracts); ok { - return x.ErrInfoInvalidContracts - } - return nil -} - -func (x *MsgError) GetErrInfoTxTimedOut() *ErrInfoTxTimedOut { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoTxTimedOut); ok { - return x.ErrInfoTxTimedOut - } - return nil -} - -func (x *MsgError) GetErrInfoChainNotReachable() *ErrInfoChainNotReachable { - if x, ok := x.GetAddInfo().(*MsgError_ErrInfoChainNotReachable); ok { - return x.ErrInfoChainNotReachable - } - return nil -} - -type isMsgError_AddInfo interface { - isMsgError_AddInfo() -} - -type MsgError_ErrInfoPeerRequestTimedOut struct { - ErrInfoPeerRequestTimedOut *ErrInfoPeerRequestTimedOut `protobuf:"bytes,4,opt,name=ErrInfoPeerRequestTimedOut,proto3,oneof"` -} - -type MsgError_ErrInfoPeerRejected struct { - ErrInfoPeerRejected *ErrInfoPeerRejected `protobuf:"bytes,5,opt,name=ErrInfoPeerRejected,proto3,oneof"` -} - -type MsgError_ErrInfoPeerNotFunded struct { - ErrInfoPeerNotFunded *ErrInfoPeerNotFunded `protobuf:"bytes,6,opt,name=ErrInfoPeerNotFunded,proto3,oneof"` -} - -type MsgError_ErrInfoUserResponseTimedOut struct { - ErrInfoUserResponseTimedOut *ErrInfoUserResponseTimedOut `protobuf:"bytes,7,opt,name=ErrInfoUserResponseTimedOut,proto3,oneof"` -} - -type MsgError_ErrInfoResourceNotFound struct { - ErrInfoResourceNotFound *ErrInfoResourceNotFound `protobuf:"bytes,8,opt,name=ErrInfoResourceNotFound,proto3,oneof"` -} - -type MsgError_ErrInfoResourceExists struct { - ErrInfoResourceExists *ErrInfoResourceExists `protobuf:"bytes,9,opt,name=ErrInfoResourceExists,proto3,oneof"` -} - -type MsgError_ErrInfoInvalidArgument struct { - ErrInfoInvalidArgument *ErrInfoInvalidArgument `protobuf:"bytes,10,opt,name=ErrInfoInvalidArgument,proto3,oneof"` -} - -type MsgError_ErrInfoFailedPreCondUnclosedChs struct { - ErrInfoFailedPreCondUnclosedChs *ErrInfoFailedPreCondUnclosedChs `protobuf:"bytes,11,opt,name=ErrInfoFailedPreCondUnclosedChs,proto3,oneof"` -} - -type MsgError_ErrInfoInvalidConfig struct { - ErrInfoInvalidConfig *ErrInfoInvalidConfig `protobuf:"bytes,13,opt,name=ErrInfoInvalidConfig,proto3,oneof"` -} - -type MsgError_ErrInfoInvalidContracts struct { - ErrInfoInvalidContracts *ErrInfoInvalidContracts `protobuf:"bytes,14,opt,name=ErrInfoInvalidContracts,proto3,oneof"` -} - -type MsgError_ErrInfoTxTimedOut struct { - ErrInfoTxTimedOut *ErrInfoTxTimedOut `protobuf:"bytes,15,opt,name=ErrInfoTxTimedOut,proto3,oneof"` -} - -type MsgError_ErrInfoChainNotReachable struct { - ErrInfoChainNotReachable *ErrInfoChainNotReachable `protobuf:"bytes,16,opt,name=ErrInfoChainNotReachable,proto3,oneof"` -} - -func (*MsgError_ErrInfoPeerRequestTimedOut) isMsgError_AddInfo() {} - -func (*MsgError_ErrInfoPeerRejected) isMsgError_AddInfo() {} - -func (*MsgError_ErrInfoPeerNotFunded) isMsgError_AddInfo() {} - -func (*MsgError_ErrInfoUserResponseTimedOut) isMsgError_AddInfo() {} - -func (*MsgError_ErrInfoResourceNotFound) isMsgError_AddInfo() {} - -func (*MsgError_ErrInfoResourceExists) isMsgError_AddInfo() {} - -func (*MsgError_ErrInfoInvalidArgument) isMsgError_AddInfo() {} - -func (*MsgError_ErrInfoFailedPreCondUnclosedChs) isMsgError_AddInfo() {} - -func (*MsgError_ErrInfoInvalidConfig) isMsgError_AddInfo() {} - -func (*MsgError_ErrInfoInvalidContracts) isMsgError_AddInfo() {} - -func (*MsgError_ErrInfoTxTimedOut) isMsgError_AddInfo() {} - -func (*MsgError_ErrInfoChainNotReachable) isMsgError_AddInfo() {} - -type ErrInfoPeerRequestTimedOut struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PeerAlias string `protobuf:"bytes,1,opt,name=peerAlias,proto3" json:"peerAlias,omitempty"` - Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` -} - -func (x *ErrInfoPeerRequestTimedOut) Reset() { - *x = ErrInfoPeerRequestTimedOut{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoPeerRequestTimedOut) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoPeerRequestTimedOut) ProtoMessage() {} - -func (x *ErrInfoPeerRequestTimedOut) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoPeerRequestTimedOut.ProtoReflect.Descriptor instead. -func (*ErrInfoPeerRequestTimedOut) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{5} -} - -func (x *ErrInfoPeerRequestTimedOut) GetPeerAlias() string { - if x != nil { - return x.PeerAlias - } - return "" -} - -func (x *ErrInfoPeerRequestTimedOut) GetTimeout() string { - if x != nil { - return x.Timeout - } - return "" -} - -type ErrInfoPeerRejected struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PeerAlias string `protobuf:"bytes,1,opt,name=peerAlias,proto3" json:"peerAlias,omitempty"` - Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` -} - -func (x *ErrInfoPeerRejected) Reset() { - *x = ErrInfoPeerRejected{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoPeerRejected) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoPeerRejected) ProtoMessage() {} - -func (x *ErrInfoPeerRejected) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoPeerRejected.ProtoReflect.Descriptor instead. -func (*ErrInfoPeerRejected) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{6} -} - -func (x *ErrInfoPeerRejected) GetPeerAlias() string { - if x != nil { - return x.PeerAlias - } - return "" -} - -func (x *ErrInfoPeerRejected) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -type ErrInfoPeerNotFunded struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PeerAlias string `protobuf:"bytes,1,opt,name=peerAlias,proto3" json:"peerAlias,omitempty"` -} - -func (x *ErrInfoPeerNotFunded) Reset() { - *x = ErrInfoPeerNotFunded{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoPeerNotFunded) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoPeerNotFunded) ProtoMessage() {} - -func (x *ErrInfoPeerNotFunded) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoPeerNotFunded.ProtoReflect.Descriptor instead. -func (*ErrInfoPeerNotFunded) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{7} -} - -func (x *ErrInfoPeerNotFunded) GetPeerAlias() string { - if x != nil { - return x.PeerAlias - } - return "" -} - -type ErrInfoUserResponseTimedOut struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Expiry int64 `protobuf:"varint,1,opt,name=expiry,proto3" json:"expiry,omitempty"` - ReceivedAt int64 `protobuf:"varint,2,opt,name=receivedAt,proto3" json:"receivedAt,omitempty"` -} - -func (x *ErrInfoUserResponseTimedOut) Reset() { - *x = ErrInfoUserResponseTimedOut{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoUserResponseTimedOut) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoUserResponseTimedOut) ProtoMessage() {} - -func (x *ErrInfoUserResponseTimedOut) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoUserResponseTimedOut.ProtoReflect.Descriptor instead. -func (*ErrInfoUserResponseTimedOut) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{8} -} - -func (x *ErrInfoUserResponseTimedOut) GetExpiry() int64 { - if x != nil { - return x.Expiry - } - return 0 -} - -func (x *ErrInfoUserResponseTimedOut) GetReceivedAt() int64 { - if x != nil { - return x.ReceivedAt - } - return 0 -} - -type ErrInfoResourceNotFound struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *ErrInfoResourceNotFound) Reset() { - *x = ErrInfoResourceNotFound{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoResourceNotFound) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoResourceNotFound) ProtoMessage() {} - -func (x *ErrInfoResourceNotFound) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoResourceNotFound.ProtoReflect.Descriptor instead. -func (*ErrInfoResourceNotFound) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{9} -} - -func (x *ErrInfoResourceNotFound) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *ErrInfoResourceNotFound) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type ErrInfoResourceExists struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *ErrInfoResourceExists) Reset() { - *x = ErrInfoResourceExists{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoResourceExists) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoResourceExists) ProtoMessage() {} - -func (x *ErrInfoResourceExists) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoResourceExists.ProtoReflect.Descriptor instead. -func (*ErrInfoResourceExists) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{10} -} - -func (x *ErrInfoResourceExists) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *ErrInfoResourceExists) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type ErrInfoInvalidArgument struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Requirement string `protobuf:"bytes,3,opt,name=requirement,proto3" json:"requirement,omitempty"` -} - -func (x *ErrInfoInvalidArgument) Reset() { - *x = ErrInfoInvalidArgument{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoInvalidArgument) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoInvalidArgument) ProtoMessage() {} - -func (x *ErrInfoInvalidArgument) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoInvalidArgument.ProtoReflect.Descriptor instead. -func (*ErrInfoInvalidArgument) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{11} -} - -func (x *ErrInfoInvalidArgument) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ErrInfoInvalidArgument) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *ErrInfoInvalidArgument) GetRequirement() string { - if x != nil { - return x.Requirement - } - return "" -} - -type ErrInfoFailedPreCondUnclosedChs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Chs []*PayChInfo `protobuf:"bytes,1,rep,name=chs,proto3" json:"chs,omitempty"` -} - -func (x *ErrInfoFailedPreCondUnclosedChs) Reset() { - *x = ErrInfoFailedPreCondUnclosedChs{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoFailedPreCondUnclosedChs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoFailedPreCondUnclosedChs) ProtoMessage() {} - -func (x *ErrInfoFailedPreCondUnclosedChs) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoFailedPreCondUnclosedChs.ProtoReflect.Descriptor instead. -func (*ErrInfoFailedPreCondUnclosedChs) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{12} -} - -func (x *ErrInfoFailedPreCondUnclosedChs) GetChs() []*PayChInfo { - if x != nil { - return x.Chs - } - return nil -} - -type ErrInfoInvalidConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *ErrInfoInvalidConfig) Reset() { - *x = ErrInfoInvalidConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoInvalidConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoInvalidConfig) ProtoMessage() {} - -func (x *ErrInfoInvalidConfig) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoInvalidConfig.ProtoReflect.Descriptor instead. -func (*ErrInfoInvalidConfig) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{13} -} - -func (x *ErrInfoInvalidConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ErrInfoInvalidConfig) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type ContractErrInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *ContractErrInfo) Reset() { - *x = ContractErrInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ContractErrInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContractErrInfo) ProtoMessage() {} - -func (x *ContractErrInfo) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContractErrInfo.ProtoReflect.Descriptor instead. -func (*ContractErrInfo) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{14} -} - -func (x *ContractErrInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ContractErrInfo) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *ContractErrInfo) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type ErrInfoInvalidContracts struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ContractErrInfos []*ContractErrInfo `protobuf:"bytes,1,rep,name=ContractErrInfos,proto3" json:"ContractErrInfos,omitempty"` -} - -func (x *ErrInfoInvalidContracts) Reset() { - *x = ErrInfoInvalidContracts{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoInvalidContracts) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoInvalidContracts) ProtoMessage() {} - -func (x *ErrInfoInvalidContracts) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoInvalidContracts.ProtoReflect.Descriptor instead. -func (*ErrInfoInvalidContracts) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{15} -} - -func (x *ErrInfoInvalidContracts) GetContractErrInfos() []*ContractErrInfo { - if x != nil { - return x.ContractErrInfos - } - return nil -} - -type ErrInfoTxTimedOut struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TxType string `protobuf:"bytes,1,opt,name=txType,proto3" json:"txType,omitempty"` - TxID string `protobuf:"bytes,2,opt,name=txID,proto3" json:"txID,omitempty"` - TxTimeout string `protobuf:"bytes,3,opt,name=txTimeout,proto3" json:"txTimeout,omitempty"` -} - -func (x *ErrInfoTxTimedOut) Reset() { - *x = ErrInfoTxTimedOut{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoTxTimedOut) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoTxTimedOut) ProtoMessage() {} - -func (x *ErrInfoTxTimedOut) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoTxTimedOut.ProtoReflect.Descriptor instead. -func (*ErrInfoTxTimedOut) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{16} -} - -func (x *ErrInfoTxTimedOut) GetTxType() string { - if x != nil { - return x.TxType - } - return "" -} - -func (x *ErrInfoTxTimedOut) GetTxID() string { - if x != nil { - return x.TxID - } - return "" -} - -func (x *ErrInfoTxTimedOut) GetTxTimeout() string { - if x != nil { - return x.TxTimeout - } - return "" -} - -type ErrInfoChainNotReachable struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainURL string `protobuf:"bytes,1,opt,name=chainURL,proto3" json:"chainURL,omitempty"` -} - -func (x *ErrInfoChainNotReachable) Reset() { - *x = ErrInfoChainNotReachable{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrInfoChainNotReachable) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrInfoChainNotReachable) ProtoMessage() {} - -func (x *ErrInfoChainNotReachable) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrInfoChainNotReachable.ProtoReflect.Descriptor instead. -func (*ErrInfoChainNotReachable) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{17} -} - -func (x *ErrInfoChainNotReachable) GetChainURL() string { - if x != nil { - return x.ChainURL - } - return "" -} - -type GetConfigReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetConfigReq) Reset() { - *x = GetConfigReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConfigReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigReq) ProtoMessage() {} - -func (x *GetConfigReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConfigReq.ProtoReflect.Descriptor instead. -func (*GetConfigReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{18} -} - -type GetConfigResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainAddress string `protobuf:"bytes,1,opt,name=chainAddress,proto3" json:"chainAddress,omitempty"` - Adjudicator string `protobuf:"bytes,2,opt,name=adjudicator,proto3" json:"adjudicator,omitempty"` - AssetETH string `protobuf:"bytes,3,opt,name=assetETH,proto3" json:"assetETH,omitempty"` - CommTypes []string `protobuf:"bytes,4,rep,name=commTypes,proto3" json:"commTypes,omitempty"` - IdProviderTypes []string `protobuf:"bytes,5,rep,name=idProviderTypes,proto3" json:"idProviderTypes,omitempty"` -} - -func (x *GetConfigResp) Reset() { - *x = GetConfigResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConfigResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigResp) ProtoMessage() {} - -func (x *GetConfigResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConfigResp.ProtoReflect.Descriptor instead. -func (*GetConfigResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{19} -} - -func (x *GetConfigResp) GetChainAddress() string { - if x != nil { - return x.ChainAddress - } - return "" -} - -func (x *GetConfigResp) GetAdjudicator() string { - if x != nil { - return x.Adjudicator - } - return "" -} - -func (x *GetConfigResp) GetAssetETH() string { - if x != nil { - return x.AssetETH - } - return "" -} - -func (x *GetConfigResp) GetCommTypes() []string { - if x != nil { - return x.CommTypes - } - return nil -} - -func (x *GetConfigResp) GetIdProviderTypes() []string { - if x != nil { - return x.IdProviderTypes - } - return nil -} - -type OpenSessionReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConfigFile string `protobuf:"bytes,1,opt,name=configFile,proto3" json:"configFile,omitempty"` -} - -func (x *OpenSessionReq) Reset() { - *x = OpenSessionReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OpenSessionReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenSessionReq) ProtoMessage() {} - -func (x *OpenSessionReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenSessionReq.ProtoReflect.Descriptor instead. -func (*OpenSessionReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{20} -} - -func (x *OpenSessionReq) GetConfigFile() string { - if x != nil { - return x.ConfigFile - } - return "" -} - -type OpenSessionResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *OpenSessionResp_MsgSuccess_ - // *OpenSessionResp_Error - Response isOpenSessionResp_Response `protobuf_oneof:"response"` -} - -func (x *OpenSessionResp) Reset() { - *x = OpenSessionResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OpenSessionResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenSessionResp) ProtoMessage() {} - -func (x *OpenSessionResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenSessionResp.ProtoReflect.Descriptor instead. -func (*OpenSessionResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{21} -} - -func (m *OpenSessionResp) GetResponse() isOpenSessionResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *OpenSessionResp) GetMsgSuccess() *OpenSessionResp_MsgSuccess { - if x, ok := x.GetResponse().(*OpenSessionResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *OpenSessionResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*OpenSessionResp_Error); ok { - return x.Error - } - return nil -} - -type isOpenSessionResp_Response interface { - isOpenSessionResp_Response() -} - -type OpenSessionResp_MsgSuccess_ struct { - MsgSuccess *OpenSessionResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type OpenSessionResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*OpenSessionResp_MsgSuccess_) isOpenSessionResp_Response() {} - -func (*OpenSessionResp_Error) isOpenSessionResp_Response() {} - -type TimeReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TimeReq) Reset() { - *x = TimeReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TimeReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimeReq) ProtoMessage() {} - -func (x *TimeReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimeReq.ProtoReflect.Descriptor instead. -func (*TimeReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{22} -} - -type TimeResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` -} - -func (x *TimeResp) Reset() { - *x = TimeResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TimeResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimeResp) ProtoMessage() {} - -func (x *TimeResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimeResp.ProtoReflect.Descriptor instead. -func (*TimeResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{23} -} - -func (x *TimeResp) GetTime() int64 { - if x != nil { - return x.Time - } - return 0 -} - -type RegisterCurrencyReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TokenAddr string `protobuf:"bytes,1,opt,name=tokenAddr,proto3" json:"tokenAddr,omitempty"` - AssetAddr string `protobuf:"bytes,2,opt,name=assetAddr,proto3" json:"assetAddr,omitempty"` -} - -func (x *RegisterCurrencyReq) Reset() { - *x = RegisterCurrencyReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterCurrencyReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterCurrencyReq) ProtoMessage() {} - -func (x *RegisterCurrencyReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterCurrencyReq.ProtoReflect.Descriptor instead. -func (*RegisterCurrencyReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{24} -} - -func (x *RegisterCurrencyReq) GetTokenAddr() string { - if x != nil { - return x.TokenAddr - } - return "" -} - -func (x *RegisterCurrencyReq) GetAssetAddr() string { - if x != nil { - return x.AssetAddr - } - return "" -} - -type RegisterCurrencyResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *RegisterCurrencyResp_MsgSuccess_ - // *RegisterCurrencyResp_Error - Response isRegisterCurrencyResp_Response `protobuf_oneof:"response"` -} - -func (x *RegisterCurrencyResp) Reset() { - *x = RegisterCurrencyResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterCurrencyResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterCurrencyResp) ProtoMessage() {} - -func (x *RegisterCurrencyResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterCurrencyResp.ProtoReflect.Descriptor instead. -func (*RegisterCurrencyResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{25} -} - -func (m *RegisterCurrencyResp) GetResponse() isRegisterCurrencyResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *RegisterCurrencyResp) GetMsgSuccess() *RegisterCurrencyResp_MsgSuccess { - if x, ok := x.GetResponse().(*RegisterCurrencyResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *RegisterCurrencyResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*RegisterCurrencyResp_Error); ok { - return x.Error - } - return nil -} - -type isRegisterCurrencyResp_Response interface { - isRegisterCurrencyResp_Response() -} - -type RegisterCurrencyResp_MsgSuccess_ struct { - MsgSuccess *RegisterCurrencyResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type RegisterCurrencyResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*RegisterCurrencyResp_MsgSuccess_) isRegisterCurrencyResp_Response() {} - -func (*RegisterCurrencyResp_Error) isRegisterCurrencyResp_Response() {} - -type HelpReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *HelpReq) Reset() { - *x = HelpReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HelpReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HelpReq) ProtoMessage() {} - -func (x *HelpReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HelpReq.ProtoReflect.Descriptor instead. -func (*HelpReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{26} -} - -type HelpResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Apis []string `protobuf:"bytes,1,rep,name=apis,proto3" json:"apis,omitempty"` -} - -func (x *HelpResp) Reset() { - *x = HelpResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HelpResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HelpResp) ProtoMessage() {} - -func (x *HelpResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HelpResp.ProtoReflect.Descriptor instead. -func (*HelpResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{27} -} - -func (x *HelpResp) GetApis() []string { - if x != nil { - return x.Apis - } - return nil -} - -type AddPeerIDReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - PeerID *PeerID `protobuf:"bytes,2,opt,name=peerID,proto3" json:"peerID,omitempty"` -} - -func (x *AddPeerIDReq) Reset() { - *x = AddPeerIDReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddPeerIDReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddPeerIDReq) ProtoMessage() {} - -func (x *AddPeerIDReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddPeerIDReq.ProtoReflect.Descriptor instead. -func (*AddPeerIDReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{28} -} - -func (x *AddPeerIDReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *AddPeerIDReq) GetPeerID() *PeerID { - if x != nil { - return x.PeerID - } - return nil -} - -type AddPeerIDResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *AddPeerIDResp_MsgSuccess_ - // *AddPeerIDResp_Error - Response isAddPeerIDResp_Response `protobuf_oneof:"response"` -} - -func (x *AddPeerIDResp) Reset() { - *x = AddPeerIDResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddPeerIDResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddPeerIDResp) ProtoMessage() {} - -func (x *AddPeerIDResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddPeerIDResp.ProtoReflect.Descriptor instead. -func (*AddPeerIDResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{29} -} - -func (m *AddPeerIDResp) GetResponse() isAddPeerIDResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *AddPeerIDResp) GetMsgSuccess() *AddPeerIDResp_MsgSuccess { - if x, ok := x.GetResponse().(*AddPeerIDResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *AddPeerIDResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*AddPeerIDResp_Error); ok { - return x.Error - } - return nil -} - -type isAddPeerIDResp_Response interface { - isAddPeerIDResp_Response() -} - -type AddPeerIDResp_MsgSuccess_ struct { - MsgSuccess *AddPeerIDResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type AddPeerIDResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*AddPeerIDResp_MsgSuccess_) isAddPeerIDResp_Response() {} - -func (*AddPeerIDResp_Error) isAddPeerIDResp_Response() {} - -type GetPeerIDReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` -} - -func (x *GetPeerIDReq) Reset() { - *x = GetPeerIDReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPeerIDReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPeerIDReq) ProtoMessage() {} - -func (x *GetPeerIDReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPeerIDReq.ProtoReflect.Descriptor instead. -func (*GetPeerIDReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{30} -} - -func (x *GetPeerIDReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *GetPeerIDReq) GetAlias() string { - if x != nil { - return x.Alias - } - return "" -} - -type GetPeerIDResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *GetPeerIDResp_MsgSuccess_ - // *GetPeerIDResp_Error - Response isGetPeerIDResp_Response `protobuf_oneof:"response"` -} - -func (x *GetPeerIDResp) Reset() { - *x = GetPeerIDResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPeerIDResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPeerIDResp) ProtoMessage() {} - -func (x *GetPeerIDResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPeerIDResp.ProtoReflect.Descriptor instead. -func (*GetPeerIDResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{31} -} - -func (m *GetPeerIDResp) GetResponse() isGetPeerIDResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *GetPeerIDResp) GetMsgSuccess() *GetPeerIDResp_MsgSuccess { - if x, ok := x.GetResponse().(*GetPeerIDResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *GetPeerIDResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*GetPeerIDResp_Error); ok { - return x.Error - } - return nil -} - -type isGetPeerIDResp_Response interface { - isGetPeerIDResp_Response() -} - -type GetPeerIDResp_MsgSuccess_ struct { - MsgSuccess *GetPeerIDResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type GetPeerIDResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*GetPeerIDResp_MsgSuccess_) isGetPeerIDResp_Response() {} - -func (*GetPeerIDResp_Error) isGetPeerIDResp_Response() {} - -type OpenPayChReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - OpeningBalInfo *BalInfo `protobuf:"bytes,2,opt,name=openingBalInfo,proto3" json:"openingBalInfo,omitempty"` - ChallengeDurSecs uint64 `protobuf:"varint,3,opt,name=challengeDurSecs,proto3" json:"challengeDurSecs,omitempty"` -} - -func (x *OpenPayChReq) Reset() { - *x = OpenPayChReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OpenPayChReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenPayChReq) ProtoMessage() {} - -func (x *OpenPayChReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenPayChReq.ProtoReflect.Descriptor instead. -func (*OpenPayChReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{32} -} - -func (x *OpenPayChReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *OpenPayChReq) GetOpeningBalInfo() *BalInfo { - if x != nil { - return x.OpeningBalInfo - } - return nil -} - -func (x *OpenPayChReq) GetChallengeDurSecs() uint64 { - if x != nil { - return x.ChallengeDurSecs - } - return 0 -} - -type OpenPayChResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *OpenPayChResp_MsgSuccess_ - // *OpenPayChResp_Error - Response isOpenPayChResp_Response `protobuf_oneof:"response"` -} - -func (x *OpenPayChResp) Reset() { - *x = OpenPayChResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OpenPayChResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenPayChResp) ProtoMessage() {} - -func (x *OpenPayChResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenPayChResp.ProtoReflect.Descriptor instead. -func (*OpenPayChResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{33} -} - -func (m *OpenPayChResp) GetResponse() isOpenPayChResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *OpenPayChResp) GetMsgSuccess() *OpenPayChResp_MsgSuccess { - if x, ok := x.GetResponse().(*OpenPayChResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *OpenPayChResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*OpenPayChResp_Error); ok { - return x.Error - } - return nil -} - -type isOpenPayChResp_Response interface { - isOpenPayChResp_Response() -} - -type OpenPayChResp_MsgSuccess_ struct { - MsgSuccess *OpenPayChResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type OpenPayChResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*OpenPayChResp_MsgSuccess_) isOpenPayChResp_Response() {} - -func (*OpenPayChResp_Error) isOpenPayChResp_Response() {} - -type GetPayChsInfoReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` -} - -func (x *GetPayChsInfoReq) Reset() { - *x = GetPayChsInfoReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPayChsInfoReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPayChsInfoReq) ProtoMessage() {} - -func (x *GetPayChsInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPayChsInfoReq.ProtoReflect.Descriptor instead. -func (*GetPayChsInfoReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{34} -} - -func (x *GetPayChsInfoReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -type GetPayChsInfoResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *GetPayChsInfoResp_MsgSuccess_ - // *GetPayChsInfoResp_Error - Response isGetPayChsInfoResp_Response `protobuf_oneof:"response"` -} - -func (x *GetPayChsInfoResp) Reset() { - *x = GetPayChsInfoResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPayChsInfoResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPayChsInfoResp) ProtoMessage() {} - -func (x *GetPayChsInfoResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPayChsInfoResp.ProtoReflect.Descriptor instead. -func (*GetPayChsInfoResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{35} -} - -func (m *GetPayChsInfoResp) GetResponse() isGetPayChsInfoResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *GetPayChsInfoResp) GetMsgSuccess() *GetPayChsInfoResp_MsgSuccess { - if x, ok := x.GetResponse().(*GetPayChsInfoResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *GetPayChsInfoResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*GetPayChsInfoResp_Error); ok { - return x.Error - } - return nil -} - -type isGetPayChsInfoResp_Response interface { - isGetPayChsInfoResp_Response() -} - -type GetPayChsInfoResp_MsgSuccess_ struct { - MsgSuccess *GetPayChsInfoResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type GetPayChsInfoResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*GetPayChsInfoResp_MsgSuccess_) isGetPayChsInfoResp_Response() {} - -func (*GetPayChsInfoResp_Error) isGetPayChsInfoResp_Response() {} - -type SubPayChProposalsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` -} - -func (x *SubPayChProposalsReq) Reset() { - *x = SubPayChProposalsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubPayChProposalsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubPayChProposalsReq) ProtoMessage() {} - -func (x *SubPayChProposalsReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubPayChProposalsReq.ProtoReflect.Descriptor instead. -func (*SubPayChProposalsReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{36} -} - -func (x *SubPayChProposalsReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -type SubPayChProposalsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *SubPayChProposalsResp_Notify_ - // *SubPayChProposalsResp_Error - Response isSubPayChProposalsResp_Response `protobuf_oneof:"response"` -} - -func (x *SubPayChProposalsResp) Reset() { - *x = SubPayChProposalsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubPayChProposalsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubPayChProposalsResp) ProtoMessage() {} - -func (x *SubPayChProposalsResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubPayChProposalsResp.ProtoReflect.Descriptor instead. -func (*SubPayChProposalsResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{37} -} - -func (m *SubPayChProposalsResp) GetResponse() isSubPayChProposalsResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *SubPayChProposalsResp) GetNotify() *SubPayChProposalsResp_Notify { - if x, ok := x.GetResponse().(*SubPayChProposalsResp_Notify_); ok { - return x.Notify - } - return nil -} - -func (x *SubPayChProposalsResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*SubPayChProposalsResp_Error); ok { - return x.Error - } - return nil -} - -type isSubPayChProposalsResp_Response interface { - isSubPayChProposalsResp_Response() -} - -type SubPayChProposalsResp_Notify_ struct { - Notify *SubPayChProposalsResp_Notify `protobuf:"bytes,1,opt,name=notify,proto3,oneof"` -} - -type SubPayChProposalsResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*SubPayChProposalsResp_Notify_) isSubPayChProposalsResp_Response() {} - -func (*SubPayChProposalsResp_Error) isSubPayChProposalsResp_Response() {} - -type UnsubPayChProposalsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` -} - -func (x *UnsubPayChProposalsReq) Reset() { - *x = UnsubPayChProposalsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnsubPayChProposalsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnsubPayChProposalsReq) ProtoMessage() {} - -func (x *UnsubPayChProposalsReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnsubPayChProposalsReq.ProtoReflect.Descriptor instead. -func (*UnsubPayChProposalsReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{38} -} - -func (x *UnsubPayChProposalsReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -type UnsubPayChProposalsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *UnsubPayChProposalsResp_MsgSuccess_ - // *UnsubPayChProposalsResp_Error - Response isUnsubPayChProposalsResp_Response `protobuf_oneof:"response"` -} - -func (x *UnsubPayChProposalsResp) Reset() { - *x = UnsubPayChProposalsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnsubPayChProposalsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnsubPayChProposalsResp) ProtoMessage() {} - -func (x *UnsubPayChProposalsResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnsubPayChProposalsResp.ProtoReflect.Descriptor instead. -func (*UnsubPayChProposalsResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{39} -} - -func (m *UnsubPayChProposalsResp) GetResponse() isUnsubPayChProposalsResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *UnsubPayChProposalsResp) GetMsgSuccess() *UnsubPayChProposalsResp_MsgSuccess { - if x, ok := x.GetResponse().(*UnsubPayChProposalsResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *UnsubPayChProposalsResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*UnsubPayChProposalsResp_Error); ok { - return x.Error - } - return nil -} - -type isUnsubPayChProposalsResp_Response interface { - isUnsubPayChProposalsResp_Response() -} - -type UnsubPayChProposalsResp_MsgSuccess_ struct { - MsgSuccess *UnsubPayChProposalsResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type UnsubPayChProposalsResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*UnsubPayChProposalsResp_MsgSuccess_) isUnsubPayChProposalsResp_Response() {} - -func (*UnsubPayChProposalsResp_Error) isUnsubPayChProposalsResp_Response() {} - -type RespondPayChProposalReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - ProposalID string `protobuf:"bytes,2,opt,name=proposalID,proto3" json:"proposalID,omitempty"` - Accept bool `protobuf:"varint,3,opt,name=accept,proto3" json:"accept,omitempty"` -} - -func (x *RespondPayChProposalReq) Reset() { - *x = RespondPayChProposalReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RespondPayChProposalReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RespondPayChProposalReq) ProtoMessage() {} - -func (x *RespondPayChProposalReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RespondPayChProposalReq.ProtoReflect.Descriptor instead. -func (*RespondPayChProposalReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{40} -} - -func (x *RespondPayChProposalReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *RespondPayChProposalReq) GetProposalID() string { - if x != nil { - return x.ProposalID - } - return "" -} - -func (x *RespondPayChProposalReq) GetAccept() bool { - if x != nil { - return x.Accept - } - return false -} - -type RespondPayChProposalResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *RespondPayChProposalResp_MsgSuccess_ - // *RespondPayChProposalResp_Error - Response isRespondPayChProposalResp_Response `protobuf_oneof:"response"` -} - -func (x *RespondPayChProposalResp) Reset() { - *x = RespondPayChProposalResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RespondPayChProposalResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RespondPayChProposalResp) ProtoMessage() {} - -func (x *RespondPayChProposalResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RespondPayChProposalResp.ProtoReflect.Descriptor instead. -func (*RespondPayChProposalResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{41} -} - -func (m *RespondPayChProposalResp) GetResponse() isRespondPayChProposalResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *RespondPayChProposalResp) GetMsgSuccess() *RespondPayChProposalResp_MsgSuccess { - if x, ok := x.GetResponse().(*RespondPayChProposalResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *RespondPayChProposalResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*RespondPayChProposalResp_Error); ok { - return x.Error - } - return nil -} - -type isRespondPayChProposalResp_Response interface { - isRespondPayChProposalResp_Response() -} - -type RespondPayChProposalResp_MsgSuccess_ struct { - MsgSuccess *RespondPayChProposalResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type RespondPayChProposalResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*RespondPayChProposalResp_MsgSuccess_) isRespondPayChProposalResp_Response() {} - -func (*RespondPayChProposalResp_Error) isRespondPayChProposalResp_Response() {} - -type CloseSessionReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` -} - -func (x *CloseSessionReq) Reset() { - *x = CloseSessionReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CloseSessionReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CloseSessionReq) ProtoMessage() {} - -func (x *CloseSessionReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CloseSessionReq.ProtoReflect.Descriptor instead. -func (*CloseSessionReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{42} -} - -func (x *CloseSessionReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *CloseSessionReq) GetForce() bool { - if x != nil { - return x.Force - } - return false -} - -type CloseSessionResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *CloseSessionResp_MsgSuccess_ - // *CloseSessionResp_Error - Response isCloseSessionResp_Response `protobuf_oneof:"response"` -} - -func (x *CloseSessionResp) Reset() { - *x = CloseSessionResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CloseSessionResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CloseSessionResp) ProtoMessage() {} - -func (x *CloseSessionResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CloseSessionResp.ProtoReflect.Descriptor instead. -func (*CloseSessionResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{43} -} - -func (m *CloseSessionResp) GetResponse() isCloseSessionResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *CloseSessionResp) GetMsgSuccess() *CloseSessionResp_MsgSuccess { - if x, ok := x.GetResponse().(*CloseSessionResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *CloseSessionResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*CloseSessionResp_Error); ok { - return x.Error - } - return nil -} - -type isCloseSessionResp_Response interface { - isCloseSessionResp_Response() -} - -type CloseSessionResp_MsgSuccess_ struct { - MsgSuccess *CloseSessionResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type CloseSessionResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*CloseSessionResp_MsgSuccess_) isCloseSessionResp_Response() {} - -func (*CloseSessionResp_Error) isCloseSessionResp_Response() {} - -type DeployAssetERC20Req struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - TokenAddr string `protobuf:"bytes,2,opt,name=tokenAddr,proto3" json:"tokenAddr,omitempty"` -} - -func (x *DeployAssetERC20Req) Reset() { - *x = DeployAssetERC20Req{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeployAssetERC20Req) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeployAssetERC20Req) ProtoMessage() {} - -func (x *DeployAssetERC20Req) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeployAssetERC20Req.ProtoReflect.Descriptor instead. -func (*DeployAssetERC20Req) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{44} -} - -func (x *DeployAssetERC20Req) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *DeployAssetERC20Req) GetTokenAddr() string { - if x != nil { - return x.TokenAddr - } - return "" -} - -type DeployAssetERC20Resp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *DeployAssetERC20Resp_MsgSuccess_ - // *DeployAssetERC20Resp_Error - Response isDeployAssetERC20Resp_Response `protobuf_oneof:"response"` -} - -func (x *DeployAssetERC20Resp) Reset() { - *x = DeployAssetERC20Resp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeployAssetERC20Resp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeployAssetERC20Resp) ProtoMessage() {} - -func (x *DeployAssetERC20Resp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeployAssetERC20Resp.ProtoReflect.Descriptor instead. -func (*DeployAssetERC20Resp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{45} -} - -func (m *DeployAssetERC20Resp) GetResponse() isDeployAssetERC20Resp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *DeployAssetERC20Resp) GetMsgSuccess() *DeployAssetERC20Resp_MsgSuccess { - if x, ok := x.GetResponse().(*DeployAssetERC20Resp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *DeployAssetERC20Resp) GetError() *MsgError { - if x, ok := x.GetResponse().(*DeployAssetERC20Resp_Error); ok { - return x.Error - } - return nil -} - -type isDeployAssetERC20Resp_Response interface { - isDeployAssetERC20Resp_Response() -} - -type DeployAssetERC20Resp_MsgSuccess_ struct { - MsgSuccess *DeployAssetERC20Resp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type DeployAssetERC20Resp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*DeployAssetERC20Resp_MsgSuccess_) isDeployAssetERC20Resp_Response() {} - -func (*DeployAssetERC20Resp_Error) isDeployAssetERC20Resp_Response() {} - -type SendPayChUpdateReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` - Payments []*Payment `protobuf:"bytes,3,rep,name=payments,proto3" json:"payments,omitempty"` -} - -func (x *SendPayChUpdateReq) Reset() { - *x = SendPayChUpdateReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendPayChUpdateReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendPayChUpdateReq) ProtoMessage() {} - -func (x *SendPayChUpdateReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendPayChUpdateReq.ProtoReflect.Descriptor instead. -func (*SendPayChUpdateReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{46} -} - -func (x *SendPayChUpdateReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *SendPayChUpdateReq) GetChID() string { - if x != nil { - return x.ChID - } - return "" -} - -func (x *SendPayChUpdateReq) GetPayments() []*Payment { - if x != nil { - return x.Payments - } - return nil -} - -type SendPayChUpdateResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *SendPayChUpdateResp_MsgSuccess_ - // *SendPayChUpdateResp_Error - Response isSendPayChUpdateResp_Response `protobuf_oneof:"response"` -} - -func (x *SendPayChUpdateResp) Reset() { - *x = SendPayChUpdateResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendPayChUpdateResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendPayChUpdateResp) ProtoMessage() {} - -func (x *SendPayChUpdateResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendPayChUpdateResp.ProtoReflect.Descriptor instead. -func (*SendPayChUpdateResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{47} -} - -func (m *SendPayChUpdateResp) GetResponse() isSendPayChUpdateResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *SendPayChUpdateResp) GetMsgSuccess() *SendPayChUpdateResp_MsgSuccess { - if x, ok := x.GetResponse().(*SendPayChUpdateResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *SendPayChUpdateResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*SendPayChUpdateResp_Error); ok { - return x.Error - } - return nil -} - -type isSendPayChUpdateResp_Response interface { - isSendPayChUpdateResp_Response() -} - -type SendPayChUpdateResp_MsgSuccess_ struct { - MsgSuccess *SendPayChUpdateResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type SendPayChUpdateResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*SendPayChUpdateResp_MsgSuccess_) isSendPayChUpdateResp_Response() {} - -func (*SendPayChUpdateResp_Error) isSendPayChUpdateResp_Response() {} - -type SubpayChUpdatesReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` -} - -func (x *SubpayChUpdatesReq) Reset() { - *x = SubpayChUpdatesReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubpayChUpdatesReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubpayChUpdatesReq) ProtoMessage() {} - -func (x *SubpayChUpdatesReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubpayChUpdatesReq.ProtoReflect.Descriptor instead. -func (*SubpayChUpdatesReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{48} -} - -func (x *SubpayChUpdatesReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *SubpayChUpdatesReq) GetChID() string { - if x != nil { - return x.ChID - } - return "" -} - -type SubPayChUpdatesResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *SubPayChUpdatesResp_Notify_ - // *SubPayChUpdatesResp_Error - Response isSubPayChUpdatesResp_Response `protobuf_oneof:"response"` -} - -func (x *SubPayChUpdatesResp) Reset() { - *x = SubPayChUpdatesResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubPayChUpdatesResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubPayChUpdatesResp) ProtoMessage() {} - -func (x *SubPayChUpdatesResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubPayChUpdatesResp.ProtoReflect.Descriptor instead. -func (*SubPayChUpdatesResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{49} -} - -func (m *SubPayChUpdatesResp) GetResponse() isSubPayChUpdatesResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *SubPayChUpdatesResp) GetNotify() *SubPayChUpdatesResp_Notify { - if x, ok := x.GetResponse().(*SubPayChUpdatesResp_Notify_); ok { - return x.Notify - } - return nil -} - -func (x *SubPayChUpdatesResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*SubPayChUpdatesResp_Error); ok { - return x.Error - } - return nil -} - -type isSubPayChUpdatesResp_Response interface { - isSubPayChUpdatesResp_Response() -} - -type SubPayChUpdatesResp_Notify_ struct { - Notify *SubPayChUpdatesResp_Notify `protobuf:"bytes,1,opt,name=notify,proto3,oneof"` -} - -type SubPayChUpdatesResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*SubPayChUpdatesResp_Notify_) isSubPayChUpdatesResp_Response() {} - -func (*SubPayChUpdatesResp_Error) isSubPayChUpdatesResp_Response() {} - -type UnsubPayChUpdatesReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` -} - -func (x *UnsubPayChUpdatesReq) Reset() { - *x = UnsubPayChUpdatesReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnsubPayChUpdatesReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnsubPayChUpdatesReq) ProtoMessage() {} - -func (x *UnsubPayChUpdatesReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnsubPayChUpdatesReq.ProtoReflect.Descriptor instead. -func (*UnsubPayChUpdatesReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{50} -} - -func (x *UnsubPayChUpdatesReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *UnsubPayChUpdatesReq) GetChID() string { - if x != nil { - return x.ChID - } - return "" -} - -type UnsubPayChUpdatesResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *UnsubPayChUpdatesResp_MsgSuccess_ - // *UnsubPayChUpdatesResp_Error - Response isUnsubPayChUpdatesResp_Response `protobuf_oneof:"response"` -} - -func (x *UnsubPayChUpdatesResp) Reset() { - *x = UnsubPayChUpdatesResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnsubPayChUpdatesResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnsubPayChUpdatesResp) ProtoMessage() {} - -func (x *UnsubPayChUpdatesResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnsubPayChUpdatesResp.ProtoReflect.Descriptor instead. -func (*UnsubPayChUpdatesResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{51} -} - -func (m *UnsubPayChUpdatesResp) GetResponse() isUnsubPayChUpdatesResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *UnsubPayChUpdatesResp) GetMsgSuccess() *UnsubPayChUpdatesResp_MsgSuccess { - if x, ok := x.GetResponse().(*UnsubPayChUpdatesResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *UnsubPayChUpdatesResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*UnsubPayChUpdatesResp_Error); ok { - return x.Error - } - return nil -} - -type isUnsubPayChUpdatesResp_Response interface { - isUnsubPayChUpdatesResp_Response() -} - -type UnsubPayChUpdatesResp_MsgSuccess_ struct { - MsgSuccess *UnsubPayChUpdatesResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type UnsubPayChUpdatesResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*UnsubPayChUpdatesResp_MsgSuccess_) isUnsubPayChUpdatesResp_Response() {} - -func (*UnsubPayChUpdatesResp_Error) isUnsubPayChUpdatesResp_Response() {} - -type RespondPayChUpdateReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` - UpdateID string `protobuf:"bytes,3,opt,name=updateID,proto3" json:"updateID,omitempty"` - Accept bool `protobuf:"varint,4,opt,name=accept,proto3" json:"accept,omitempty"` -} - -func (x *RespondPayChUpdateReq) Reset() { - *x = RespondPayChUpdateReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RespondPayChUpdateReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RespondPayChUpdateReq) ProtoMessage() {} - -func (x *RespondPayChUpdateReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RespondPayChUpdateReq.ProtoReflect.Descriptor instead. -func (*RespondPayChUpdateReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{52} -} - -func (x *RespondPayChUpdateReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *RespondPayChUpdateReq) GetChID() string { - if x != nil { - return x.ChID - } - return "" -} - -func (x *RespondPayChUpdateReq) GetUpdateID() string { - if x != nil { - return x.UpdateID - } - return "" -} - -func (x *RespondPayChUpdateReq) GetAccept() bool { - if x != nil { - return x.Accept - } - return false -} - -type RespondPayChUpdateResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *RespondPayChUpdateResp_MsgSuccess_ - // *RespondPayChUpdateResp_Error - Response isRespondPayChUpdateResp_Response `protobuf_oneof:"response"` -} - -func (x *RespondPayChUpdateResp) Reset() { - *x = RespondPayChUpdateResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RespondPayChUpdateResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RespondPayChUpdateResp) ProtoMessage() {} - -func (x *RespondPayChUpdateResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RespondPayChUpdateResp.ProtoReflect.Descriptor instead. -func (*RespondPayChUpdateResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{53} -} - -func (m *RespondPayChUpdateResp) GetResponse() isRespondPayChUpdateResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *RespondPayChUpdateResp) GetMsgSuccess() *RespondPayChUpdateResp_MsgSuccess { - if x, ok := x.GetResponse().(*RespondPayChUpdateResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *RespondPayChUpdateResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*RespondPayChUpdateResp_Error); ok { - return x.Error - } - return nil -} - -type isRespondPayChUpdateResp_Response interface { - isRespondPayChUpdateResp_Response() -} - -type RespondPayChUpdateResp_MsgSuccess_ struct { - MsgSuccess *RespondPayChUpdateResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type RespondPayChUpdateResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*RespondPayChUpdateResp_MsgSuccess_) isRespondPayChUpdateResp_Response() {} - -func (*RespondPayChUpdateResp_Error) isRespondPayChUpdateResp_Response() {} - -type GetPayChInfoReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` -} - -func (x *GetPayChInfoReq) Reset() { - *x = GetPayChInfoReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPayChInfoReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPayChInfoReq) ProtoMessage() {} - -func (x *GetPayChInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPayChInfoReq.ProtoReflect.Descriptor instead. -func (*GetPayChInfoReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{54} -} - -func (x *GetPayChInfoReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *GetPayChInfoReq) GetChID() string { - if x != nil { - return x.ChID - } - return "" -} - -type GetPayChInfoResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *GetPayChInfoResp_MsgSuccess_ - // *GetPayChInfoResp_Error - Response isGetPayChInfoResp_Response `protobuf_oneof:"response"` -} - -func (x *GetPayChInfoResp) Reset() { - *x = GetPayChInfoResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPayChInfoResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPayChInfoResp) ProtoMessage() {} - -func (x *GetPayChInfoResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPayChInfoResp.ProtoReflect.Descriptor instead. -func (*GetPayChInfoResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{55} -} - -func (m *GetPayChInfoResp) GetResponse() isGetPayChInfoResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *GetPayChInfoResp) GetMsgSuccess() *GetPayChInfoResp_MsgSuccess { - if x, ok := x.GetResponse().(*GetPayChInfoResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *GetPayChInfoResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*GetPayChInfoResp_Error); ok { - return x.Error - } - return nil -} - -type isGetPayChInfoResp_Response interface { - isGetPayChInfoResp_Response() -} - -type GetPayChInfoResp_MsgSuccess_ struct { - MsgSuccess *GetPayChInfoResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type GetPayChInfoResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*GetPayChInfoResp_MsgSuccess_) isGetPayChInfoResp_Response() {} - -func (*GetPayChInfoResp_Error) isGetPayChInfoResp_Response() {} - -type ClosePayChReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` -} - -func (x *ClosePayChReq) Reset() { - *x = ClosePayChReq{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClosePayChReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClosePayChReq) ProtoMessage() {} - -func (x *ClosePayChReq) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClosePayChReq.ProtoReflect.Descriptor instead. -func (*ClosePayChReq) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{56} -} - -func (x *ClosePayChReq) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *ClosePayChReq) GetChID() string { - if x != nil { - return x.ChID - } - return "" -} - -type ClosePayChResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *ClosePayChResp_MsgSuccess_ - // *ClosePayChResp_Error - Response isClosePayChResp_Response `protobuf_oneof:"response"` -} - -func (x *ClosePayChResp) Reset() { - *x = ClosePayChResp{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClosePayChResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClosePayChResp) ProtoMessage() {} - -func (x *ClosePayChResp) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClosePayChResp.ProtoReflect.Descriptor instead. -func (*ClosePayChResp) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{57} -} - -func (m *ClosePayChResp) GetResponse() isClosePayChResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *ClosePayChResp) GetMsgSuccess() *ClosePayChResp_MsgSuccess { - if x, ok := x.GetResponse().(*ClosePayChResp_MsgSuccess_); ok { - return x.MsgSuccess - } - return nil -} - -func (x *ClosePayChResp) GetError() *MsgError { - if x, ok := x.GetResponse().(*ClosePayChResp_Error); ok { - return x.Error - } - return nil -} - -type isClosePayChResp_Response interface { - isClosePayChResp_Response() -} - -type ClosePayChResp_MsgSuccess_ struct { - MsgSuccess *ClosePayChResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` -} - -type ClosePayChResp_Error struct { - Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*ClosePayChResp_MsgSuccess_) isClosePayChResp_Response() {} - -func (*ClosePayChResp_Error) isClosePayChResp_Response() {} - -type BalInfoBal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bal []string `protobuf:"bytes,1,rep,name=bal,proto3" json:"bal,omitempty"` -} - -func (x *BalInfoBal) Reset() { - *x = BalInfoBal{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BalInfoBal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BalInfoBal) ProtoMessage() {} - -func (x *BalInfoBal) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BalInfoBal.ProtoReflect.Descriptor instead. -func (*BalInfoBal) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *BalInfoBal) GetBal() []string { - if x != nil { - return x.Bal - } - return nil -} - -type OpenSessionResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` - RestoredChs []*PayChInfo `protobuf:"bytes,2,rep,name=restoredChs,proto3" json:"restoredChs,omitempty"` -} - -func (x *OpenSessionResp_MsgSuccess) Reset() { - *x = OpenSessionResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OpenSessionResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenSessionResp_MsgSuccess) ProtoMessage() {} - -func (x *OpenSessionResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenSessionResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*OpenSessionResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{21, 0} -} - -func (x *OpenSessionResp_MsgSuccess) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *OpenSessionResp_MsgSuccess) GetRestoredChs() []*PayChInfo { - if x != nil { - return x.RestoredChs - } - return nil -} - -type RegisterCurrencyResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` -} - -func (x *RegisterCurrencyResp_MsgSuccess) Reset() { - *x = RegisterCurrencyResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterCurrencyResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterCurrencyResp_MsgSuccess) ProtoMessage() {} - -func (x *RegisterCurrencyResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterCurrencyResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*RegisterCurrencyResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{25, 0} -} - -func (x *RegisterCurrencyResp_MsgSuccess) GetSymbol() string { - if x != nil { - return x.Symbol - } - return "" -} - -type AddPeerIDResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (x *AddPeerIDResp_MsgSuccess) Reset() { - *x = AddPeerIDResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddPeerIDResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddPeerIDResp_MsgSuccess) ProtoMessage() {} - -func (x *AddPeerIDResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddPeerIDResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*AddPeerIDResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{29, 0} -} - -func (x *AddPeerIDResp_MsgSuccess) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -type GetPeerIDResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PeerID *PeerID `protobuf:"bytes,1,opt,name=peerID,proto3" json:"peerID,omitempty"` -} - -func (x *GetPeerIDResp_MsgSuccess) Reset() { - *x = GetPeerIDResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPeerIDResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPeerIDResp_MsgSuccess) ProtoMessage() {} - -func (x *GetPeerIDResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPeerIDResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*GetPeerIDResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{31, 0} -} - -func (x *GetPeerIDResp_MsgSuccess) GetPeerID() *PeerID { - if x != nil { - return x.PeerID - } - return nil -} - -type OpenPayChResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OpenedPayChInfo *PayChInfo `protobuf:"bytes,1,opt,name=openedPayChInfo,proto3" json:"openedPayChInfo,omitempty"` -} - -func (x *OpenPayChResp_MsgSuccess) Reset() { - *x = OpenPayChResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OpenPayChResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenPayChResp_MsgSuccess) ProtoMessage() {} - -func (x *OpenPayChResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenPayChResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*OpenPayChResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{33, 0} -} - -func (x *OpenPayChResp_MsgSuccess) GetOpenedPayChInfo() *PayChInfo { - if x != nil { - return x.OpenedPayChInfo - } - return nil -} - -type GetPayChsInfoResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OpenPayChsInfo []*PayChInfo `protobuf:"bytes,1,rep,name=openPayChsInfo,proto3" json:"openPayChsInfo,omitempty"` -} - -func (x *GetPayChsInfoResp_MsgSuccess) Reset() { - *x = GetPayChsInfoResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPayChsInfoResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPayChsInfoResp_MsgSuccess) ProtoMessage() {} - -func (x *GetPayChsInfoResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPayChsInfoResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*GetPayChsInfoResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{35, 0} -} - -func (x *GetPayChsInfoResp_MsgSuccess) GetOpenPayChsInfo() []*PayChInfo { - if x != nil { - return x.OpenPayChsInfo - } - return nil -} - -type SubPayChProposalsResp_Notify struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProposalID string `protobuf:"bytes,2,opt,name=proposalID,proto3" json:"proposalID,omitempty"` - OpeningBalInfo *BalInfo `protobuf:"bytes,4,opt,name=openingBalInfo,proto3" json:"openingBalInfo,omitempty"` - ChallengeDurSecs uint64 `protobuf:"varint,5,opt,name=challengeDurSecs,proto3" json:"challengeDurSecs,omitempty"` - Expiry int64 `protobuf:"varint,6,opt,name=expiry,proto3" json:"expiry,omitempty"` -} - -func (x *SubPayChProposalsResp_Notify) Reset() { - *x = SubPayChProposalsResp_Notify{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubPayChProposalsResp_Notify) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubPayChProposalsResp_Notify) ProtoMessage() {} - -func (x *SubPayChProposalsResp_Notify) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubPayChProposalsResp_Notify.ProtoReflect.Descriptor instead. -func (*SubPayChProposalsResp_Notify) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{37, 0} -} - -func (x *SubPayChProposalsResp_Notify) GetProposalID() string { - if x != nil { - return x.ProposalID - } - return "" -} - -func (x *SubPayChProposalsResp_Notify) GetOpeningBalInfo() *BalInfo { - if x != nil { - return x.OpeningBalInfo - } - return nil -} - -func (x *SubPayChProposalsResp_Notify) GetChallengeDurSecs() uint64 { - if x != nil { - return x.ChallengeDurSecs - } - return 0 -} - -func (x *SubPayChProposalsResp_Notify) GetExpiry() int64 { - if x != nil { - return x.Expiry - } - return 0 -} - -type UnsubPayChProposalsResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (x *UnsubPayChProposalsResp_MsgSuccess) Reset() { - *x = UnsubPayChProposalsResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnsubPayChProposalsResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnsubPayChProposalsResp_MsgSuccess) ProtoMessage() {} - -func (x *UnsubPayChProposalsResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnsubPayChProposalsResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*UnsubPayChProposalsResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{39, 0} -} - -func (x *UnsubPayChProposalsResp_MsgSuccess) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -type RespondPayChProposalResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OpenedPayChInfo *PayChInfo `protobuf:"bytes,2,opt,name=openedPayChInfo,proto3" json:"openedPayChInfo,omitempty"` -} - -func (x *RespondPayChProposalResp_MsgSuccess) Reset() { - *x = RespondPayChProposalResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RespondPayChProposalResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RespondPayChProposalResp_MsgSuccess) ProtoMessage() {} - -func (x *RespondPayChProposalResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RespondPayChProposalResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*RespondPayChProposalResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{41, 0} -} - -func (x *RespondPayChProposalResp_MsgSuccess) GetOpenedPayChInfo() *PayChInfo { - if x != nil { - return x.OpenedPayChInfo - } - return nil -} - -type CloseSessionResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OpenPayChsInfo []*PayChInfo `protobuf:"bytes,1,rep,name=openPayChsInfo,proto3" json:"openPayChsInfo,omitempty"` -} - -func (x *CloseSessionResp_MsgSuccess) Reset() { - *x = CloseSessionResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CloseSessionResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CloseSessionResp_MsgSuccess) ProtoMessage() {} - -func (x *CloseSessionResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CloseSessionResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*CloseSessionResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{43, 0} -} - -func (x *CloseSessionResp_MsgSuccess) GetOpenPayChsInfo() []*PayChInfo { - if x != nil { - return x.OpenPayChsInfo - } - return nil -} - -type DeployAssetERC20Resp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AssetAddr string `protobuf:"bytes,2,opt,name=AssetAddr,proto3" json:"AssetAddr,omitempty"` -} - -func (x *DeployAssetERC20Resp_MsgSuccess) Reset() { - *x = DeployAssetERC20Resp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeployAssetERC20Resp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeployAssetERC20Resp_MsgSuccess) ProtoMessage() {} - -func (x *DeployAssetERC20Resp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeployAssetERC20Resp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*DeployAssetERC20Resp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{45, 0} -} - -func (x *DeployAssetERC20Resp_MsgSuccess) GetAssetAddr() string { - if x != nil { - return x.AssetAddr - } - return "" -} - -type SendPayChUpdateResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UpdatedPayChInfo *PayChInfo `protobuf:"bytes,1,opt,name=updatedPayChInfo,proto3" json:"updatedPayChInfo,omitempty"` -} - -func (x *SendPayChUpdateResp_MsgSuccess) Reset() { - *x = SendPayChUpdateResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendPayChUpdateResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendPayChUpdateResp_MsgSuccess) ProtoMessage() {} - -func (x *SendPayChUpdateResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendPayChUpdateResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*SendPayChUpdateResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{47, 0} -} - -func (x *SendPayChUpdateResp_MsgSuccess) GetUpdatedPayChInfo() *PayChInfo { - if x != nil { - return x.UpdatedPayChInfo - } - return nil -} - -type SubPayChUpdatesResp_Notify struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UpdateID string `protobuf:"bytes,1,opt,name=updateID,proto3" json:"updateID,omitempty"` - ProposedPayChInfo *PayChInfo `protobuf:"bytes,2,opt,name=proposedPayChInfo,proto3" json:"proposedPayChInfo,omitempty"` - Type SubPayChUpdatesResp_Notify_ChUpdateType `protobuf:"varint,3,opt,name=Type,proto3,enum=pb.SubPayChUpdatesResp_Notify_ChUpdateType" json:"Type,omitempty"` - Expiry int64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"` - Error *MsgError `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *SubPayChUpdatesResp_Notify) Reset() { - *x = SubPayChUpdatesResp_Notify{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubPayChUpdatesResp_Notify) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubPayChUpdatesResp_Notify) ProtoMessage() {} - -func (x *SubPayChUpdatesResp_Notify) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubPayChUpdatesResp_Notify.ProtoReflect.Descriptor instead. -func (*SubPayChUpdatesResp_Notify) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{49, 0} -} - -func (x *SubPayChUpdatesResp_Notify) GetUpdateID() string { - if x != nil { - return x.UpdateID - } - return "" -} - -func (x *SubPayChUpdatesResp_Notify) GetProposedPayChInfo() *PayChInfo { - if x != nil { - return x.ProposedPayChInfo - } - return nil -} - -func (x *SubPayChUpdatesResp_Notify) GetType() SubPayChUpdatesResp_Notify_ChUpdateType { - if x != nil { - return x.Type - } - return SubPayChUpdatesResp_Notify_open -} - -func (x *SubPayChUpdatesResp_Notify) GetExpiry() int64 { - if x != nil { - return x.Expiry - } - return 0 -} - -func (x *SubPayChUpdatesResp_Notify) GetError() *MsgError { - if x != nil { - return x.Error - } - return nil -} - -type UnsubPayChUpdatesResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (x *UnsubPayChUpdatesResp_MsgSuccess) Reset() { - *x = UnsubPayChUpdatesResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnsubPayChUpdatesResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnsubPayChUpdatesResp_MsgSuccess) ProtoMessage() {} - -func (x *UnsubPayChUpdatesResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnsubPayChUpdatesResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*UnsubPayChUpdatesResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{51, 0} -} - -func (x *UnsubPayChUpdatesResp_MsgSuccess) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -type RespondPayChUpdateResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UpdatedPayChInfo *PayChInfo `protobuf:"bytes,1,opt,name=updatedPayChInfo,proto3" json:"updatedPayChInfo,omitempty"` -} - -func (x *RespondPayChUpdateResp_MsgSuccess) Reset() { - *x = RespondPayChUpdateResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RespondPayChUpdateResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RespondPayChUpdateResp_MsgSuccess) ProtoMessage() {} - -func (x *RespondPayChUpdateResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RespondPayChUpdateResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*RespondPayChUpdateResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{53, 0} -} - -func (x *RespondPayChUpdateResp_MsgSuccess) GetUpdatedPayChInfo() *PayChInfo { - if x != nil { - return x.UpdatedPayChInfo - } - return nil -} - -type GetPayChInfoResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PayChInfo *PayChInfo `protobuf:"bytes,1,opt,name=payChInfo,proto3" json:"payChInfo,omitempty"` -} - -func (x *GetPayChInfoResp_MsgSuccess) Reset() { - *x = GetPayChInfoResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPayChInfoResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPayChInfoResp_MsgSuccess) ProtoMessage() {} - -func (x *GetPayChInfoResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPayChInfoResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*GetPayChInfoResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{55, 0} -} - -func (x *GetPayChInfoResp_MsgSuccess) GetPayChInfo() *PayChInfo { - if x != nil { - return x.PayChInfo - } - return nil -} - -type ClosePayChResp_MsgSuccess struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClosedPayChInfo *PayChInfo `protobuf:"bytes,1,opt,name=closedPayChInfo,proto3" json:"closedPayChInfo,omitempty"` -} - -func (x *ClosePayChResp_MsgSuccess) Reset() { - *x = ClosePayChResp_MsgSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClosePayChResp_MsgSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClosePayChResp_MsgSuccess) ProtoMessage() {} - -func (x *ClosePayChResp_MsgSuccess) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClosePayChResp_MsgSuccess.ProtoReflect.Descriptor instead. -func (*ClosePayChResp_MsgSuccess) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{57, 0} -} - -func (x *ClosePayChResp_MsgSuccess) GetClosedPayChInfo() *PayChInfo { - if x != nil { - return x.ClosedPayChInfo - } - return nil -} - -var File_api_proto protoreflect.FileDescriptor - -var file_api_proto_rawDesc = []byte{ - 0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, - 0x86, 0x01, 0x0a, 0x06, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, - 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x66, 0x66, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x66, 0x66, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, - 0x6d, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x63, 0x6f, 0x6d, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x63, 0x6f, 0x6d, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x22, 0x7d, 0x0a, 0x07, 0x42, 0x61, 0x6c, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x69, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x69, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x62, 0x61, 0x6c, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x6c, - 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x62, 0x61, 0x6c, 0x52, 0x04, 0x62, 0x61, 0x6c, 0x73, 0x1a, 0x17, - 0x0a, 0x03, 0x62, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x03, 0x62, 0x61, 0x6c, 0x22, 0x60, 0x0a, 0x09, 0x50, 0x61, 0x79, 0x43, 0x68, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x12, 0x25, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x49, - 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x42, - 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x53, 0x0a, 0x07, 0x50, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x70, 0x61, 0x79, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa4, - 0x09, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2d, 0x0a, 0x08, 0x63, - 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, - 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, - 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x60, 0x0a, 0x1a, 0x45, 0x72, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x64, 0x4f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, - 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x1a, 0x45, - 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x4b, 0x0a, 0x13, 0x45, 0x72, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x48, - 0x00, 0x52, 0x13, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, - 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x4e, 0x0a, 0x14, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x48, 0x00, - 0x52, 0x14, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, - 0x46, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x63, 0x0a, 0x1b, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x64, 0x4f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x62, - 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x1b, - 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x57, 0x0a, 0x17, 0x45, - 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, - 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, - 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x17, 0x45, 0x72, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, - 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x51, 0x0a, 0x15, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x48, 0x00, - 0x52, 0x15, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x54, 0x0a, 0x16, 0x45, 0x72, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x16, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x6f, 0x0a, - 0x1f, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x50, 0x72, - 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x73, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x50, 0x72, 0x65, 0x43, 0x6f, 0x6e, 0x64, - 0x55, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x73, 0x48, 0x00, 0x52, 0x1f, 0x45, - 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x50, 0x72, 0x65, 0x43, - 0x6f, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x73, 0x12, 0x4e, - 0x0a, 0x14, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, - 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x14, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x57, - 0x0a, 0x17, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x48, 0x00, 0x52, 0x17, - 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x11, 0x45, 0x72, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x54, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x54, - 0x78, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x48, 0x00, 0x52, 0x11, 0x45, 0x72, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x54, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x5a, - 0x0a, 0x18, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, - 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x00, - 0x52, 0x18, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, - 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x54, 0x0a, 0x1a, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x64, - 0x4f, 0x75, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x4b, 0x0a, 0x13, 0x45, - 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x41, 0x6c, 0x69, 0x61, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x34, 0x0a, 0x14, 0x45, 0x72, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x65, 0x64, - 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x55, - 0x0a, 0x1b, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x41, 0x74, 0x22, 0x3d, 0x0a, 0x17, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x15, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x64, 0x0a, 0x16, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x42, 0x0a, 0x1f, 0x45, 0x72, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x50, 0x72, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x55, - 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x73, 0x12, 0x1f, 0x0a, 0x03, 0x63, 0x68, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, - 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x63, 0x68, 0x73, 0x22, 0x40, 0x0a, 0x14, 0x45, - 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x55, 0x0a, - 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x22, 0x5a, 0x0a, 0x17, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, - 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x12, - 0x3f, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x45, 0x72, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, - 0x22, 0x5d, 0x0a, 0x11, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x54, 0x78, 0x54, 0x69, 0x6d, - 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x78, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x49, - 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, - 0x36, 0x0a, 0x18, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4e, - 0x6f, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x55, 0x52, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x55, 0x52, 0x4c, 0x22, 0x0e, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x22, 0xb9, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, - 0x0b, 0x61, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x61, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x1a, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x45, 0x54, 0x48, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x45, 0x54, 0x48, 0x12, 0x1c, 0x0a, 0x09, 0x63, - 0x6f, 0x6d, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, - 0x63, 0x6f, 0x6d, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x69, 0x64, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, - 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x46, 0x69, 0x6c, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0a, 0x6d, 0x73, 0x67, - 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, - 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x1a, 0x5b, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, - 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x2f, 0x0a, - 0x0b, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x43, 0x68, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x43, 0x68, 0x73, 0x42, 0x0a, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x09, 0x0a, 0x07, 0x54, 0x69, - 0x6d, 0x65, 0x52, 0x65, 0x71, 0x22, 0x1e, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x13, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x22, 0xb5, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x45, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x2e, - 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, - 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x24, - 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x09, 0x0a, 0x07, 0x48, 0x65, 0x6c, 0x70, 0x52, 0x65, 0x71, 0x22, 0x1e, 0x0a, 0x08, 0x48, - 0x65, 0x6c, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x70, 0x69, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x70, 0x69, 0x73, 0x22, 0x50, 0x0a, 0x0c, 0x41, - 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x06, 0x70, 0x65, 0x65, - 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, - 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x44, 0x22, 0xa9, 0x01, - 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x3e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, - 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, - 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x26, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x0a, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x0c, 0x47, 0x65, 0x74, - 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0xb3, 0x01, - 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x3e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x65, 0x72, - 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, - 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x30, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, - 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x44, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, - 0x68, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x12, 0x33, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, - 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, - 0x42, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, - 0x42, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x68, 0x61, 0x6c, 0x6c, - 0x65, 0x6e, 0x67, 0x65, 0x44, 0x75, 0x72, 0x53, 0x65, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x10, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x44, 0x75, 0x72, 0x53, - 0x65, 0x63, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, - 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x45, 0x0a, 0x0a, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x0f, 0x6f, 0x70, 0x65, - 0x6e, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, - 0x66, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, - 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x22, 0xce, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x62, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, - 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, - 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x1a, 0x43, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x35, - 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, - 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, 0x68, - 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x34, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xa9, 0x02, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x50, - 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x3a, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4e, 0x6f, 0x74, - 0x69, 0x66, 0x79, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x24, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, - 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x1a, 0xa1, 0x01, 0x0a, 0x06, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x1e, - 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x44, 0x12, 0x33, - 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x6c, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, - 0x44, 0x75, 0x72, 0x53, 0x65, 0x63, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x63, - 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x44, 0x75, 0x72, 0x53, 0x65, 0x63, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x36, 0x0a, 0x16, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, - 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, - 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xbd, 0x01, 0x0a, 0x17, - 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x62, - 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x26, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, - 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x0a, 0x17, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x22, 0xde, 0x01, 0x0a, - 0x18, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0a, 0x6d, 0x73, 0x67, - 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x45, 0x0a, 0x0a, 0x4d, 0x73, - 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, - 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, - 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, - 0x0f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x14, - 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, 0x0a, 0x6d, 0x73, 0x67, - 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, - 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, - 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x1a, 0x43, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x12, 0x35, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, - 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, - 0x43, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x13, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x22, 0xbb, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x45, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x2a, 0x0a, 0x0a, - 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, - 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, 0x44, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x12, 0x27, 0x0a, 0x08, - 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x70, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd6, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, - 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x44, 0x0a, - 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x47, 0x0a, 0x0a, 0x4d, 0x73, 0x67, - 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, - 0x66, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, - 0x0a, 0x12, 0x53, 0x75, 0x62, 0x70, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x22, 0x93, 0x03, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x50, 0x61, - 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, - 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x48, 0x00, - 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x8f, - 0x02, 0x0a, 0x06, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x49, 0x44, 0x12, 0x3b, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x3f, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, - 0x2e, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x22, 0x0a, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, - 0x2f, 0x0a, 0x0c, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x08, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x66, 0x69, 0x6e, - 0x61, 0x6c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x10, 0x02, - 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x0a, 0x14, - 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x22, 0xb9, 0x01, 0x0a, 0x15, 0x55, 0x6e, 0x73, 0x75, 0x62, - 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x46, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, - 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, - 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, - 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x26, - 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x7d, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, - 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, - 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x12, 0x1a, 0x0a, - 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x22, 0xdc, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, - 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x0a, - 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, - 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, - 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x47, 0x0a, 0x0a, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x10, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, - 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x43, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x63, 0x68, 0x49, 0x44, 0x22, 0xc2, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, - 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, 0x0a, 0x6d, 0x73, - 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, - 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, - 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x1a, 0x39, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x2b, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x70, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x0a, 0x0d, 0x43, 0x6c, - 0x6f, 0x73, 0x65, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, - 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x22, 0xca, 0x01, - 0x0a, 0x0e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x3f, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, - 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x45, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x0f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x50, - 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x63, - 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x5c, 0x0a, 0x0d, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x50, - 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, - 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x2a, 0xe7, 0x02, 0x0a, 0x09, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x10, 0x00, 0x12, 0x1a, - 0x0a, 0x16, 0x45, 0x72, 0x72, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x10, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x72, - 0x72, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, 0x66, 0x12, - 0x14, 0x0a, 0x10, 0x45, 0x72, 0x72, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x75, 0x6e, - 0x64, 0x65, 0x64, 0x10, 0x67, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x72, 0x72, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, - 0x10, 0x68, 0x12, 0x18, 0x0a, 0x13, 0x45, 0x72, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xc9, 0x01, 0x12, 0x16, 0x0a, 0x11, - 0x45, 0x72, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, - 0x73, 0x10, 0xca, 0x01, 0x12, 0x17, 0x0a, 0x12, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xcb, 0x01, 0x12, 0x1a, 0x0a, - 0x15, 0x45, 0x72, 0x72, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x50, 0x72, 0x65, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xcc, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x45, 0x72, 0x72, - 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0xcd, 0x01, - 0x12, 0x18, 0x0a, 0x13, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x10, 0xce, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x45, 0x72, - 0x72, 0x54, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x10, 0xad, 0x02, 0x12, 0x19, - 0x0a, 0x14, 0x45, 0x72, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, - 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xae, 0x02, 0x12, 0x17, 0x0a, 0x12, 0x45, 0x72, 0x72, - 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, - 0x91, 0x03, 0x32, 0x82, 0x0a, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x41, - 0x50, 0x49, 0x12, 0x32, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x71, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, - 0x12, 0x23, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, - 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x23, - 0x0a, 0x04, 0x48, 0x65, 0x6c, 0x70, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x65, 0x6c, 0x70, - 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, - 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, - 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x49, - 0x44, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x65, - 0x65, 0x72, 0x49, 0x44, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x65, - 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x09, 0x4f, - 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, - 0x3e, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, - 0x4c, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, - 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x19, - 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x30, 0x01, 0x12, 0x50, 0x0a, - 0x13, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, - 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, - 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, - 0x53, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x43, - 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, - 0x00, 0x12, 0x47, 0x0a, 0x10, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x45, 0x52, 0x43, 0x32, 0x30, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x71, 0x1a, 0x18, - 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, - 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0f, 0x53, 0x65, - 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, - 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x50, - 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, - 0x12, 0x46, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x70, 0x61, 0x79, 0x43, - 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x70, 0x62, - 0x2e, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x30, 0x01, 0x12, 0x4a, 0x0a, 0x11, 0x55, 0x6e, 0x73, 0x75, - 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x18, 0x2e, - 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, - 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, - 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, - 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, - 0x12, 0x35, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x61, 0x79, 0x43, 0x68, 0x12, 0x11, - 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, - 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x61, 0x79, 0x43, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_api_proto_rawDescOnce sync.Once - file_api_proto_rawDescData = file_api_proto_rawDesc -) - -func file_api_proto_rawDescGZIP() []byte { - file_api_proto_rawDescOnce.Do(func() { - file_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_proto_rawDescData) - }) - return file_api_proto_rawDescData -} - -var file_api_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 76) -var file_api_proto_goTypes = []interface{}{ - (ErrorCategory)(0), // 0: pb.ErrorCategory - (ErrorCode)(0), // 1: pb.ErrorCode - (SubPayChUpdatesResp_Notify_ChUpdateType)(0), // 2: pb.SubPayChUpdatesResp.Notify.ChUpdateType - (*PeerID)(nil), // 3: pb.PeerID - (*BalInfo)(nil), // 4: pb.BalInfo - (*PayChInfo)(nil), // 5: pb.PayChInfo - (*Payment)(nil), // 6: pb.Payment - (*MsgError)(nil), // 7: pb.MsgError - (*ErrInfoPeerRequestTimedOut)(nil), // 8: pb.ErrInfoPeerRequestTimedOut - (*ErrInfoPeerRejected)(nil), // 9: pb.ErrInfoPeerRejected - (*ErrInfoPeerNotFunded)(nil), // 10: pb.ErrInfoPeerNotFunded - (*ErrInfoUserResponseTimedOut)(nil), // 11: pb.ErrInfoUserResponseTimedOut - (*ErrInfoResourceNotFound)(nil), // 12: pb.ErrInfoResourceNotFound - (*ErrInfoResourceExists)(nil), // 13: pb.ErrInfoResourceExists - (*ErrInfoInvalidArgument)(nil), // 14: pb.ErrInfoInvalidArgument - (*ErrInfoFailedPreCondUnclosedChs)(nil), // 15: pb.ErrInfoFailedPreCondUnclosedChs - (*ErrInfoInvalidConfig)(nil), // 16: pb.ErrInfoInvalidConfig - (*ContractErrInfo)(nil), // 17: pb.ContractErrInfo - (*ErrInfoInvalidContracts)(nil), // 18: pb.ErrInfoInvalidContracts - (*ErrInfoTxTimedOut)(nil), // 19: pb.ErrInfoTxTimedOut - (*ErrInfoChainNotReachable)(nil), // 20: pb.ErrInfoChainNotReachable - (*GetConfigReq)(nil), // 21: pb.GetConfigReq - (*GetConfigResp)(nil), // 22: pb.GetConfigResp - (*OpenSessionReq)(nil), // 23: pb.OpenSessionReq - (*OpenSessionResp)(nil), // 24: pb.OpenSessionResp - (*TimeReq)(nil), // 25: pb.TimeReq - (*TimeResp)(nil), // 26: pb.TimeResp - (*RegisterCurrencyReq)(nil), // 27: pb.RegisterCurrencyReq - (*RegisterCurrencyResp)(nil), // 28: pb.RegisterCurrencyResp - (*HelpReq)(nil), // 29: pb.HelpReq - (*HelpResp)(nil), // 30: pb.HelpResp - (*AddPeerIDReq)(nil), // 31: pb.AddPeerIDReq - (*AddPeerIDResp)(nil), // 32: pb.AddPeerIDResp - (*GetPeerIDReq)(nil), // 33: pb.GetPeerIDReq - (*GetPeerIDResp)(nil), // 34: pb.GetPeerIDResp - (*OpenPayChReq)(nil), // 35: pb.OpenPayChReq - (*OpenPayChResp)(nil), // 36: pb.OpenPayChResp - (*GetPayChsInfoReq)(nil), // 37: pb.GetPayChsInfoReq - (*GetPayChsInfoResp)(nil), // 38: pb.GetPayChsInfoResp - (*SubPayChProposalsReq)(nil), // 39: pb.SubPayChProposalsReq - (*SubPayChProposalsResp)(nil), // 40: pb.SubPayChProposalsResp - (*UnsubPayChProposalsReq)(nil), // 41: pb.UnsubPayChProposalsReq - (*UnsubPayChProposalsResp)(nil), // 42: pb.UnsubPayChProposalsResp - (*RespondPayChProposalReq)(nil), // 43: pb.RespondPayChProposalReq - (*RespondPayChProposalResp)(nil), // 44: pb.RespondPayChProposalResp - (*CloseSessionReq)(nil), // 45: pb.CloseSessionReq - (*CloseSessionResp)(nil), // 46: pb.CloseSessionResp - (*DeployAssetERC20Req)(nil), // 47: pb.DeployAssetERC20Req - (*DeployAssetERC20Resp)(nil), // 48: pb.DeployAssetERC20Resp - (*SendPayChUpdateReq)(nil), // 49: pb.SendPayChUpdateReq - (*SendPayChUpdateResp)(nil), // 50: pb.SendPayChUpdateResp - (*SubpayChUpdatesReq)(nil), // 51: pb.SubpayChUpdatesReq - (*SubPayChUpdatesResp)(nil), // 52: pb.SubPayChUpdatesResp - (*UnsubPayChUpdatesReq)(nil), // 53: pb.UnsubPayChUpdatesReq - (*UnsubPayChUpdatesResp)(nil), // 54: pb.UnsubPayChUpdatesResp - (*RespondPayChUpdateReq)(nil), // 55: pb.RespondPayChUpdateReq - (*RespondPayChUpdateResp)(nil), // 56: pb.RespondPayChUpdateResp - (*GetPayChInfoReq)(nil), // 57: pb.GetPayChInfoReq - (*GetPayChInfoResp)(nil), // 58: pb.GetPayChInfoResp - (*ClosePayChReq)(nil), // 59: pb.ClosePayChReq - (*ClosePayChResp)(nil), // 60: pb.ClosePayChResp - (*BalInfoBal)(nil), // 61: pb.BalInfo.bal - (*OpenSessionResp_MsgSuccess)(nil), // 62: pb.OpenSessionResp.MsgSuccess - (*RegisterCurrencyResp_MsgSuccess)(nil), // 63: pb.RegisterCurrencyResp.MsgSuccess - (*AddPeerIDResp_MsgSuccess)(nil), // 64: pb.AddPeerIDResp.MsgSuccess - (*GetPeerIDResp_MsgSuccess)(nil), // 65: pb.GetPeerIDResp.MsgSuccess - (*OpenPayChResp_MsgSuccess)(nil), // 66: pb.OpenPayChResp.MsgSuccess - (*GetPayChsInfoResp_MsgSuccess)(nil), // 67: pb.GetPayChsInfoResp.MsgSuccess - (*SubPayChProposalsResp_Notify)(nil), // 68: pb.SubPayChProposalsResp.Notify - (*UnsubPayChProposalsResp_MsgSuccess)(nil), // 69: pb.UnsubPayChProposalsResp.MsgSuccess - (*RespondPayChProposalResp_MsgSuccess)(nil), // 70: pb.RespondPayChProposalResp.MsgSuccess - (*CloseSessionResp_MsgSuccess)(nil), // 71: pb.CloseSessionResp.MsgSuccess - (*DeployAssetERC20Resp_MsgSuccess)(nil), // 72: pb.DeployAssetERC20Resp.MsgSuccess - (*SendPayChUpdateResp_MsgSuccess)(nil), // 73: pb.SendPayChUpdateResp.MsgSuccess - (*SubPayChUpdatesResp_Notify)(nil), // 74: pb.SubPayChUpdatesResp.Notify - (*UnsubPayChUpdatesResp_MsgSuccess)(nil), // 75: pb.UnsubPayChUpdatesResp.MsgSuccess - (*RespondPayChUpdateResp_MsgSuccess)(nil), // 76: pb.RespondPayChUpdateResp.MsgSuccess - (*GetPayChInfoResp_MsgSuccess)(nil), // 77: pb.GetPayChInfoResp.MsgSuccess - (*ClosePayChResp_MsgSuccess)(nil), // 78: pb.ClosePayChResp.MsgSuccess -} -var file_api_proto_depIdxs = []int32{ - 61, // 0: pb.BalInfo.bals:type_name -> pb.BalInfo.bal - 4, // 1: pb.PayChInfo.balInfo:type_name -> pb.BalInfo - 0, // 2: pb.MsgError.category:type_name -> pb.ErrorCategory - 1, // 3: pb.MsgError.code:type_name -> pb.ErrorCode - 8, // 4: pb.MsgError.ErrInfoPeerRequestTimedOut:type_name -> pb.ErrInfoPeerRequestTimedOut - 9, // 5: pb.MsgError.ErrInfoPeerRejected:type_name -> pb.ErrInfoPeerRejected - 10, // 6: pb.MsgError.ErrInfoPeerNotFunded:type_name -> pb.ErrInfoPeerNotFunded - 11, // 7: pb.MsgError.ErrInfoUserResponseTimedOut:type_name -> pb.ErrInfoUserResponseTimedOut - 12, // 8: pb.MsgError.ErrInfoResourceNotFound:type_name -> pb.ErrInfoResourceNotFound - 13, // 9: pb.MsgError.ErrInfoResourceExists:type_name -> pb.ErrInfoResourceExists - 14, // 10: pb.MsgError.ErrInfoInvalidArgument:type_name -> pb.ErrInfoInvalidArgument - 15, // 11: pb.MsgError.ErrInfoFailedPreCondUnclosedChs:type_name -> pb.ErrInfoFailedPreCondUnclosedChs - 16, // 12: pb.MsgError.ErrInfoInvalidConfig:type_name -> pb.ErrInfoInvalidConfig - 18, // 13: pb.MsgError.ErrInfoInvalidContracts:type_name -> pb.ErrInfoInvalidContracts - 19, // 14: pb.MsgError.ErrInfoTxTimedOut:type_name -> pb.ErrInfoTxTimedOut - 20, // 15: pb.MsgError.ErrInfoChainNotReachable:type_name -> pb.ErrInfoChainNotReachable - 5, // 16: pb.ErrInfoFailedPreCondUnclosedChs.chs:type_name -> pb.PayChInfo - 17, // 17: pb.ErrInfoInvalidContracts.ContractErrInfos:type_name -> pb.ContractErrInfo - 62, // 18: pb.OpenSessionResp.msgSuccess:type_name -> pb.OpenSessionResp.MsgSuccess - 7, // 19: pb.OpenSessionResp.error:type_name -> pb.MsgError - 63, // 20: pb.RegisterCurrencyResp.msgSuccess:type_name -> pb.RegisterCurrencyResp.MsgSuccess - 7, // 21: pb.RegisterCurrencyResp.error:type_name -> pb.MsgError - 3, // 22: pb.AddPeerIDReq.peerID:type_name -> pb.PeerID - 64, // 23: pb.AddPeerIDResp.msgSuccess:type_name -> pb.AddPeerIDResp.MsgSuccess - 7, // 24: pb.AddPeerIDResp.error:type_name -> pb.MsgError - 65, // 25: pb.GetPeerIDResp.msgSuccess:type_name -> pb.GetPeerIDResp.MsgSuccess - 7, // 26: pb.GetPeerIDResp.error:type_name -> pb.MsgError - 4, // 27: pb.OpenPayChReq.openingBalInfo:type_name -> pb.BalInfo - 66, // 28: pb.OpenPayChResp.msgSuccess:type_name -> pb.OpenPayChResp.MsgSuccess - 7, // 29: pb.OpenPayChResp.error:type_name -> pb.MsgError - 67, // 30: pb.GetPayChsInfoResp.msgSuccess:type_name -> pb.GetPayChsInfoResp.MsgSuccess - 7, // 31: pb.GetPayChsInfoResp.error:type_name -> pb.MsgError - 68, // 32: pb.SubPayChProposalsResp.notify:type_name -> pb.SubPayChProposalsResp.Notify - 7, // 33: pb.SubPayChProposalsResp.error:type_name -> pb.MsgError - 69, // 34: pb.UnsubPayChProposalsResp.msgSuccess:type_name -> pb.UnsubPayChProposalsResp.MsgSuccess - 7, // 35: pb.UnsubPayChProposalsResp.error:type_name -> pb.MsgError - 70, // 36: pb.RespondPayChProposalResp.msgSuccess:type_name -> pb.RespondPayChProposalResp.MsgSuccess - 7, // 37: pb.RespondPayChProposalResp.error:type_name -> pb.MsgError - 71, // 38: pb.CloseSessionResp.msgSuccess:type_name -> pb.CloseSessionResp.MsgSuccess - 7, // 39: pb.CloseSessionResp.error:type_name -> pb.MsgError - 72, // 40: pb.DeployAssetERC20Resp.msgSuccess:type_name -> pb.DeployAssetERC20Resp.MsgSuccess - 7, // 41: pb.DeployAssetERC20Resp.error:type_name -> pb.MsgError - 6, // 42: pb.SendPayChUpdateReq.payments:type_name -> pb.Payment - 73, // 43: pb.SendPayChUpdateResp.msgSuccess:type_name -> pb.SendPayChUpdateResp.MsgSuccess - 7, // 44: pb.SendPayChUpdateResp.error:type_name -> pb.MsgError - 74, // 45: pb.SubPayChUpdatesResp.notify:type_name -> pb.SubPayChUpdatesResp.Notify - 7, // 46: pb.SubPayChUpdatesResp.error:type_name -> pb.MsgError - 75, // 47: pb.UnsubPayChUpdatesResp.msgSuccess:type_name -> pb.UnsubPayChUpdatesResp.MsgSuccess - 7, // 48: pb.UnsubPayChUpdatesResp.error:type_name -> pb.MsgError - 76, // 49: pb.RespondPayChUpdateResp.msgSuccess:type_name -> pb.RespondPayChUpdateResp.MsgSuccess - 7, // 50: pb.RespondPayChUpdateResp.error:type_name -> pb.MsgError - 77, // 51: pb.GetPayChInfoResp.msgSuccess:type_name -> pb.GetPayChInfoResp.MsgSuccess - 7, // 52: pb.GetPayChInfoResp.error:type_name -> pb.MsgError - 78, // 53: pb.ClosePayChResp.msgSuccess:type_name -> pb.ClosePayChResp.MsgSuccess - 7, // 54: pb.ClosePayChResp.error:type_name -> pb.MsgError - 5, // 55: pb.OpenSessionResp.MsgSuccess.restoredChs:type_name -> pb.PayChInfo - 3, // 56: pb.GetPeerIDResp.MsgSuccess.peerID:type_name -> pb.PeerID - 5, // 57: pb.OpenPayChResp.MsgSuccess.openedPayChInfo:type_name -> pb.PayChInfo - 5, // 58: pb.GetPayChsInfoResp.MsgSuccess.openPayChsInfo:type_name -> pb.PayChInfo - 4, // 59: pb.SubPayChProposalsResp.Notify.openingBalInfo:type_name -> pb.BalInfo - 5, // 60: pb.RespondPayChProposalResp.MsgSuccess.openedPayChInfo:type_name -> pb.PayChInfo - 5, // 61: pb.CloseSessionResp.MsgSuccess.openPayChsInfo:type_name -> pb.PayChInfo - 5, // 62: pb.SendPayChUpdateResp.MsgSuccess.updatedPayChInfo:type_name -> pb.PayChInfo - 5, // 63: pb.SubPayChUpdatesResp.Notify.proposedPayChInfo:type_name -> pb.PayChInfo - 2, // 64: pb.SubPayChUpdatesResp.Notify.Type:type_name -> pb.SubPayChUpdatesResp.Notify.ChUpdateType - 7, // 65: pb.SubPayChUpdatesResp.Notify.error:type_name -> pb.MsgError - 5, // 66: pb.RespondPayChUpdateResp.MsgSuccess.updatedPayChInfo:type_name -> pb.PayChInfo - 5, // 67: pb.GetPayChInfoResp.MsgSuccess.payChInfo:type_name -> pb.PayChInfo - 5, // 68: pb.ClosePayChResp.MsgSuccess.closedPayChInfo:type_name -> pb.PayChInfo - 21, // 69: pb.Payment_API.GetConfig:input_type -> pb.GetConfigReq - 23, // 70: pb.Payment_API.OpenSession:input_type -> pb.OpenSessionReq - 25, // 71: pb.Payment_API.Time:input_type -> pb.TimeReq - 27, // 72: pb.Payment_API.RegisterCurrency:input_type -> pb.RegisterCurrencyReq - 29, // 73: pb.Payment_API.Help:input_type -> pb.HelpReq - 31, // 74: pb.Payment_API.AddPeerID:input_type -> pb.AddPeerIDReq - 33, // 75: pb.Payment_API.GetPeerID:input_type -> pb.GetPeerIDReq - 35, // 76: pb.Payment_API.OpenPayCh:input_type -> pb.OpenPayChReq - 37, // 77: pb.Payment_API.GetPayChsInfo:input_type -> pb.GetPayChsInfoReq - 39, // 78: pb.Payment_API.SubPayChProposals:input_type -> pb.SubPayChProposalsReq - 41, // 79: pb.Payment_API.UnsubPayChProposals:input_type -> pb.UnsubPayChProposalsReq - 43, // 80: pb.Payment_API.RespondPayChProposal:input_type -> pb.RespondPayChProposalReq - 45, // 81: pb.Payment_API.CloseSession:input_type -> pb.CloseSessionReq - 47, // 82: pb.Payment_API.DeployAssetERC20:input_type -> pb.DeployAssetERC20Req - 49, // 83: pb.Payment_API.SendPayChUpdate:input_type -> pb.SendPayChUpdateReq - 51, // 84: pb.Payment_API.SubPayChUpdates:input_type -> pb.SubpayChUpdatesReq - 53, // 85: pb.Payment_API.UnsubPayChUpdates:input_type -> pb.UnsubPayChUpdatesReq - 55, // 86: pb.Payment_API.RespondPayChUpdate:input_type -> pb.RespondPayChUpdateReq - 57, // 87: pb.Payment_API.GetPayChInfo:input_type -> pb.GetPayChInfoReq - 59, // 88: pb.Payment_API.ClosePayCh:input_type -> pb.ClosePayChReq - 22, // 89: pb.Payment_API.GetConfig:output_type -> pb.GetConfigResp - 24, // 90: pb.Payment_API.OpenSession:output_type -> pb.OpenSessionResp - 26, // 91: pb.Payment_API.Time:output_type -> pb.TimeResp - 28, // 92: pb.Payment_API.RegisterCurrency:output_type -> pb.RegisterCurrencyResp - 30, // 93: pb.Payment_API.Help:output_type -> pb.HelpResp - 32, // 94: pb.Payment_API.AddPeerID:output_type -> pb.AddPeerIDResp - 34, // 95: pb.Payment_API.GetPeerID:output_type -> pb.GetPeerIDResp - 36, // 96: pb.Payment_API.OpenPayCh:output_type -> pb.OpenPayChResp - 38, // 97: pb.Payment_API.GetPayChsInfo:output_type -> pb.GetPayChsInfoResp - 40, // 98: pb.Payment_API.SubPayChProposals:output_type -> pb.SubPayChProposalsResp - 42, // 99: pb.Payment_API.UnsubPayChProposals:output_type -> pb.UnsubPayChProposalsResp - 44, // 100: pb.Payment_API.RespondPayChProposal:output_type -> pb.RespondPayChProposalResp - 46, // 101: pb.Payment_API.CloseSession:output_type -> pb.CloseSessionResp - 48, // 102: pb.Payment_API.DeployAssetERC20:output_type -> pb.DeployAssetERC20Resp - 50, // 103: pb.Payment_API.SendPayChUpdate:output_type -> pb.SendPayChUpdateResp - 52, // 104: pb.Payment_API.SubPayChUpdates:output_type -> pb.SubPayChUpdatesResp - 54, // 105: pb.Payment_API.UnsubPayChUpdates:output_type -> pb.UnsubPayChUpdatesResp - 56, // 106: pb.Payment_API.RespondPayChUpdate:output_type -> pb.RespondPayChUpdateResp - 58, // 107: pb.Payment_API.GetPayChInfo:output_type -> pb.GetPayChInfoResp - 60, // 108: pb.Payment_API.ClosePayCh:output_type -> pb.ClosePayChResp - 89, // [89:109] is the sub-list for method output_type - 69, // [69:89] is the sub-list for method input_type - 69, // [69:69] is the sub-list for extension type_name - 69, // [69:69] is the sub-list for extension extendee - 0, // [0:69] is the sub-list for field type_name -} - -func init() { file_api_proto_init() } -func file_api_proto_init() { - if File_api_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerID); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BalInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PayChInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Payment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoPeerRequestTimedOut); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoPeerRejected); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoPeerNotFunded); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoUserResponseTimedOut); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoResourceNotFound); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoResourceExists); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoInvalidArgument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoFailedPreCondUnclosedChs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoInvalidConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContractErrInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoInvalidContracts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoTxTimedOut); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrInfoChainNotReachable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConfigReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConfigResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenSessionReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenSessionResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimeReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimeResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterCurrencyReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterCurrencyResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HelpReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HelpResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddPeerIDReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddPeerIDResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPeerIDReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPeerIDResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenPayChReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenPayChResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPayChsInfoReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPayChsInfoResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubPayChProposalsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubPayChProposalsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnsubPayChProposalsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnsubPayChProposalsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RespondPayChProposalReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RespondPayChProposalResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CloseSessionReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CloseSessionResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployAssetERC20Req); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployAssetERC20Resp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendPayChUpdateReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendPayChUpdateResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubpayChUpdatesReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubPayChUpdatesResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnsubPayChUpdatesReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnsubPayChUpdatesResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RespondPayChUpdateReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RespondPayChUpdateResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPayChInfoReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPayChInfoResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClosePayChReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClosePayChResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BalInfoBal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenSessionResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterCurrencyResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddPeerIDResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPeerIDResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenPayChResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPayChsInfoResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubPayChProposalsResp_Notify); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnsubPayChProposalsResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RespondPayChProposalResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CloseSessionResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployAssetERC20Resp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendPayChUpdateResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubPayChUpdatesResp_Notify); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnsubPayChUpdatesResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RespondPayChUpdateResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPayChInfoResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClosePayChResp_MsgSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_api_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*MsgError_ErrInfoPeerRequestTimedOut)(nil), - (*MsgError_ErrInfoPeerRejected)(nil), - (*MsgError_ErrInfoPeerNotFunded)(nil), - (*MsgError_ErrInfoUserResponseTimedOut)(nil), - (*MsgError_ErrInfoResourceNotFound)(nil), - (*MsgError_ErrInfoResourceExists)(nil), - (*MsgError_ErrInfoInvalidArgument)(nil), - (*MsgError_ErrInfoFailedPreCondUnclosedChs)(nil), - (*MsgError_ErrInfoInvalidConfig)(nil), - (*MsgError_ErrInfoInvalidContracts)(nil), - (*MsgError_ErrInfoTxTimedOut)(nil), - (*MsgError_ErrInfoChainNotReachable)(nil), - } - file_api_proto_msgTypes[21].OneofWrappers = []interface{}{ - (*OpenSessionResp_MsgSuccess_)(nil), - (*OpenSessionResp_Error)(nil), - } - file_api_proto_msgTypes[25].OneofWrappers = []interface{}{ - (*RegisterCurrencyResp_MsgSuccess_)(nil), - (*RegisterCurrencyResp_Error)(nil), - } - file_api_proto_msgTypes[29].OneofWrappers = []interface{}{ - (*AddPeerIDResp_MsgSuccess_)(nil), - (*AddPeerIDResp_Error)(nil), - } - file_api_proto_msgTypes[31].OneofWrappers = []interface{}{ - (*GetPeerIDResp_MsgSuccess_)(nil), - (*GetPeerIDResp_Error)(nil), - } - file_api_proto_msgTypes[33].OneofWrappers = []interface{}{ - (*OpenPayChResp_MsgSuccess_)(nil), - (*OpenPayChResp_Error)(nil), - } - file_api_proto_msgTypes[35].OneofWrappers = []interface{}{ - (*GetPayChsInfoResp_MsgSuccess_)(nil), - (*GetPayChsInfoResp_Error)(nil), - } - file_api_proto_msgTypes[37].OneofWrappers = []interface{}{ - (*SubPayChProposalsResp_Notify_)(nil), - (*SubPayChProposalsResp_Error)(nil), - } - file_api_proto_msgTypes[39].OneofWrappers = []interface{}{ - (*UnsubPayChProposalsResp_MsgSuccess_)(nil), - (*UnsubPayChProposalsResp_Error)(nil), - } - file_api_proto_msgTypes[41].OneofWrappers = []interface{}{ - (*RespondPayChProposalResp_MsgSuccess_)(nil), - (*RespondPayChProposalResp_Error)(nil), - } - file_api_proto_msgTypes[43].OneofWrappers = []interface{}{ - (*CloseSessionResp_MsgSuccess_)(nil), - (*CloseSessionResp_Error)(nil), - } - file_api_proto_msgTypes[45].OneofWrappers = []interface{}{ - (*DeployAssetERC20Resp_MsgSuccess_)(nil), - (*DeployAssetERC20Resp_Error)(nil), - } - file_api_proto_msgTypes[47].OneofWrappers = []interface{}{ - (*SendPayChUpdateResp_MsgSuccess_)(nil), - (*SendPayChUpdateResp_Error)(nil), - } - file_api_proto_msgTypes[49].OneofWrappers = []interface{}{ - (*SubPayChUpdatesResp_Notify_)(nil), - (*SubPayChUpdatesResp_Error)(nil), - } - file_api_proto_msgTypes[51].OneofWrappers = []interface{}{ - (*UnsubPayChUpdatesResp_MsgSuccess_)(nil), - (*UnsubPayChUpdatesResp_Error)(nil), - } - file_api_proto_msgTypes[53].OneofWrappers = []interface{}{ - (*RespondPayChUpdateResp_MsgSuccess_)(nil), - (*RespondPayChUpdateResp_Error)(nil), - } - file_api_proto_msgTypes[55].OneofWrappers = []interface{}{ - (*GetPayChInfoResp_MsgSuccess_)(nil), - (*GetPayChInfoResp_Error)(nil), - } - file_api_proto_msgTypes[57].OneofWrappers = []interface{}{ - (*ClosePayChResp_MsgSuccess_)(nil), - (*ClosePayChResp_Error)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_proto_rawDesc, - NumEnums: 3, - NumMessages: 76, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_api_proto_goTypes, - DependencyIndexes: file_api_proto_depIdxs, - EnumInfos: file_api_proto_enumTypes, - MessageInfos: file_api_proto_msgTypes, - }.Build() - File_api_proto = out.File - file_api_proto_rawDesc = nil - file_api_proto_goTypes = nil - file_api_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// Payment_APIClient is the client API for Payment_API service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type Payment_APIClient interface { - GetConfig(ctx context.Context, in *GetConfigReq, opts ...grpc.CallOption) (*GetConfigResp, error) - OpenSession(ctx context.Context, in *OpenSessionReq, opts ...grpc.CallOption) (*OpenSessionResp, error) - Time(ctx context.Context, in *TimeReq, opts ...grpc.CallOption) (*TimeResp, error) - RegisterCurrency(ctx context.Context, in *RegisterCurrencyReq, opts ...grpc.CallOption) (*RegisterCurrencyResp, error) - Help(ctx context.Context, in *HelpReq, opts ...grpc.CallOption) (*HelpResp, error) - AddPeerID(ctx context.Context, in *AddPeerIDReq, opts ...grpc.CallOption) (*AddPeerIDResp, error) - GetPeerID(ctx context.Context, in *GetPeerIDReq, opts ...grpc.CallOption) (*GetPeerIDResp, error) - OpenPayCh(ctx context.Context, in *OpenPayChReq, opts ...grpc.CallOption) (*OpenPayChResp, error) - GetPayChsInfo(ctx context.Context, in *GetPayChsInfoReq, opts ...grpc.CallOption) (*GetPayChsInfoResp, error) - SubPayChProposals(ctx context.Context, in *SubPayChProposalsReq, opts ...grpc.CallOption) (Payment_API_SubPayChProposalsClient, error) - UnsubPayChProposals(ctx context.Context, in *UnsubPayChProposalsReq, opts ...grpc.CallOption) (*UnsubPayChProposalsResp, error) - RespondPayChProposal(ctx context.Context, in *RespondPayChProposalReq, opts ...grpc.CallOption) (*RespondPayChProposalResp, error) - CloseSession(ctx context.Context, in *CloseSessionReq, opts ...grpc.CallOption) (*CloseSessionResp, error) - DeployAssetERC20(ctx context.Context, in *DeployAssetERC20Req, opts ...grpc.CallOption) (*DeployAssetERC20Resp, error) - SendPayChUpdate(ctx context.Context, in *SendPayChUpdateReq, opts ...grpc.CallOption) (*SendPayChUpdateResp, error) - SubPayChUpdates(ctx context.Context, in *SubpayChUpdatesReq, opts ...grpc.CallOption) (Payment_API_SubPayChUpdatesClient, error) - UnsubPayChUpdates(ctx context.Context, in *UnsubPayChUpdatesReq, opts ...grpc.CallOption) (*UnsubPayChUpdatesResp, error) - RespondPayChUpdate(ctx context.Context, in *RespondPayChUpdateReq, opts ...grpc.CallOption) (*RespondPayChUpdateResp, error) - GetPayChInfo(ctx context.Context, in *GetPayChInfoReq, opts ...grpc.CallOption) (*GetPayChInfoResp, error) - ClosePayCh(ctx context.Context, in *ClosePayChReq, opts ...grpc.CallOption) (*ClosePayChResp, error) -} - -type payment_APIClient struct { - cc grpc.ClientConnInterface -} - -func NewPayment_APIClient(cc grpc.ClientConnInterface) Payment_APIClient { - return &payment_APIClient{cc} -} - -func (c *payment_APIClient) GetConfig(ctx context.Context, in *GetConfigReq, opts ...grpc.CallOption) (*GetConfigResp, error) { - out := new(GetConfigResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/GetConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) OpenSession(ctx context.Context, in *OpenSessionReq, opts ...grpc.CallOption) (*OpenSessionResp, error) { - out := new(OpenSessionResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/OpenSession", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) Time(ctx context.Context, in *TimeReq, opts ...grpc.CallOption) (*TimeResp, error) { - out := new(TimeResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/Time", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) RegisterCurrency(ctx context.Context, in *RegisterCurrencyReq, opts ...grpc.CallOption) (*RegisterCurrencyResp, error) { - out := new(RegisterCurrencyResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/RegisterCurrency", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) Help(ctx context.Context, in *HelpReq, opts ...grpc.CallOption) (*HelpResp, error) { - out := new(HelpResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/Help", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) AddPeerID(ctx context.Context, in *AddPeerIDReq, opts ...grpc.CallOption) (*AddPeerIDResp, error) { - out := new(AddPeerIDResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/AddPeerID", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) GetPeerID(ctx context.Context, in *GetPeerIDReq, opts ...grpc.CallOption) (*GetPeerIDResp, error) { - out := new(GetPeerIDResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/GetPeerID", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) OpenPayCh(ctx context.Context, in *OpenPayChReq, opts ...grpc.CallOption) (*OpenPayChResp, error) { - out := new(OpenPayChResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/OpenPayCh", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) GetPayChsInfo(ctx context.Context, in *GetPayChsInfoReq, opts ...grpc.CallOption) (*GetPayChsInfoResp, error) { - out := new(GetPayChsInfoResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/GetPayChsInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) SubPayChProposals(ctx context.Context, in *SubPayChProposalsReq, opts ...grpc.CallOption) (Payment_API_SubPayChProposalsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Payment_API_serviceDesc.Streams[0], "/pb.Payment_API/SubPayChProposals", opts...) - if err != nil { - return nil, err - } - x := &payment_APISubPayChProposalsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Payment_API_SubPayChProposalsClient interface { - Recv() (*SubPayChProposalsResp, error) - grpc.ClientStream -} - -type payment_APISubPayChProposalsClient struct { - grpc.ClientStream -} - -func (x *payment_APISubPayChProposalsClient) Recv() (*SubPayChProposalsResp, error) { - m := new(SubPayChProposalsResp) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *payment_APIClient) UnsubPayChProposals(ctx context.Context, in *UnsubPayChProposalsReq, opts ...grpc.CallOption) (*UnsubPayChProposalsResp, error) { - out := new(UnsubPayChProposalsResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/UnsubPayChProposals", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) RespondPayChProposal(ctx context.Context, in *RespondPayChProposalReq, opts ...grpc.CallOption) (*RespondPayChProposalResp, error) { - out := new(RespondPayChProposalResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/RespondPayChProposal", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) CloseSession(ctx context.Context, in *CloseSessionReq, opts ...grpc.CallOption) (*CloseSessionResp, error) { - out := new(CloseSessionResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/CloseSession", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) DeployAssetERC20(ctx context.Context, in *DeployAssetERC20Req, opts ...grpc.CallOption) (*DeployAssetERC20Resp, error) { - out := new(DeployAssetERC20Resp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/DeployAssetERC20", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) SendPayChUpdate(ctx context.Context, in *SendPayChUpdateReq, opts ...grpc.CallOption) (*SendPayChUpdateResp, error) { - out := new(SendPayChUpdateResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/SendPayChUpdate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) SubPayChUpdates(ctx context.Context, in *SubpayChUpdatesReq, opts ...grpc.CallOption) (Payment_API_SubPayChUpdatesClient, error) { - stream, err := c.cc.NewStream(ctx, &_Payment_API_serviceDesc.Streams[1], "/pb.Payment_API/SubPayChUpdates", opts...) - if err != nil { - return nil, err - } - x := &payment_APISubPayChUpdatesClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Payment_API_SubPayChUpdatesClient interface { - Recv() (*SubPayChUpdatesResp, error) - grpc.ClientStream -} - -type payment_APISubPayChUpdatesClient struct { - grpc.ClientStream -} - -func (x *payment_APISubPayChUpdatesClient) Recv() (*SubPayChUpdatesResp, error) { - m := new(SubPayChUpdatesResp) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *payment_APIClient) UnsubPayChUpdates(ctx context.Context, in *UnsubPayChUpdatesReq, opts ...grpc.CallOption) (*UnsubPayChUpdatesResp, error) { - out := new(UnsubPayChUpdatesResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/UnsubPayChUpdates", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) RespondPayChUpdate(ctx context.Context, in *RespondPayChUpdateReq, opts ...grpc.CallOption) (*RespondPayChUpdateResp, error) { - out := new(RespondPayChUpdateResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/RespondPayChUpdate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) GetPayChInfo(ctx context.Context, in *GetPayChInfoReq, opts ...grpc.CallOption) (*GetPayChInfoResp, error) { - out := new(GetPayChInfoResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/GetPayChInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *payment_APIClient) ClosePayCh(ctx context.Context, in *ClosePayChReq, opts ...grpc.CallOption) (*ClosePayChResp, error) { - out := new(ClosePayChResp) - err := c.cc.Invoke(ctx, "/pb.Payment_API/ClosePayCh", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Payment_APIServer is the server API for Payment_API service. -type Payment_APIServer interface { - GetConfig(context.Context, *GetConfigReq) (*GetConfigResp, error) - OpenSession(context.Context, *OpenSessionReq) (*OpenSessionResp, error) - Time(context.Context, *TimeReq) (*TimeResp, error) - RegisterCurrency(context.Context, *RegisterCurrencyReq) (*RegisterCurrencyResp, error) - Help(context.Context, *HelpReq) (*HelpResp, error) - AddPeerID(context.Context, *AddPeerIDReq) (*AddPeerIDResp, error) - GetPeerID(context.Context, *GetPeerIDReq) (*GetPeerIDResp, error) - OpenPayCh(context.Context, *OpenPayChReq) (*OpenPayChResp, error) - GetPayChsInfo(context.Context, *GetPayChsInfoReq) (*GetPayChsInfoResp, error) - SubPayChProposals(*SubPayChProposalsReq, Payment_API_SubPayChProposalsServer) error - UnsubPayChProposals(context.Context, *UnsubPayChProposalsReq) (*UnsubPayChProposalsResp, error) - RespondPayChProposal(context.Context, *RespondPayChProposalReq) (*RespondPayChProposalResp, error) - CloseSession(context.Context, *CloseSessionReq) (*CloseSessionResp, error) - DeployAssetERC20(context.Context, *DeployAssetERC20Req) (*DeployAssetERC20Resp, error) - SendPayChUpdate(context.Context, *SendPayChUpdateReq) (*SendPayChUpdateResp, error) - SubPayChUpdates(*SubpayChUpdatesReq, Payment_API_SubPayChUpdatesServer) error - UnsubPayChUpdates(context.Context, *UnsubPayChUpdatesReq) (*UnsubPayChUpdatesResp, error) - RespondPayChUpdate(context.Context, *RespondPayChUpdateReq) (*RespondPayChUpdateResp, error) - GetPayChInfo(context.Context, *GetPayChInfoReq) (*GetPayChInfoResp, error) - ClosePayCh(context.Context, *ClosePayChReq) (*ClosePayChResp, error) -} - -// UnimplementedPayment_APIServer can be embedded to have forward compatible implementations. -type UnimplementedPayment_APIServer struct { -} - -func (*UnimplementedPayment_APIServer) GetConfig(context.Context, *GetConfigReq) (*GetConfigResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented") -} -func (*UnimplementedPayment_APIServer) OpenSession(context.Context, *OpenSessionReq) (*OpenSessionResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method OpenSession not implemented") -} -func (*UnimplementedPayment_APIServer) Time(context.Context, *TimeReq) (*TimeResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method Time not implemented") -} -func (*UnimplementedPayment_APIServer) RegisterCurrency(context.Context, *RegisterCurrencyReq) (*RegisterCurrencyResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterCurrency not implemented") -} -func (*UnimplementedPayment_APIServer) Help(context.Context, *HelpReq) (*HelpResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method Help not implemented") -} -func (*UnimplementedPayment_APIServer) AddPeerID(context.Context, *AddPeerIDReq) (*AddPeerIDResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddPeerID not implemented") -} -func (*UnimplementedPayment_APIServer) GetPeerID(context.Context, *GetPeerIDReq) (*GetPeerIDResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPeerID not implemented") -} -func (*UnimplementedPayment_APIServer) OpenPayCh(context.Context, *OpenPayChReq) (*OpenPayChResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method OpenPayCh not implemented") -} -func (*UnimplementedPayment_APIServer) GetPayChsInfo(context.Context, *GetPayChsInfoReq) (*GetPayChsInfoResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPayChsInfo not implemented") -} -func (*UnimplementedPayment_APIServer) SubPayChProposals(*SubPayChProposalsReq, Payment_API_SubPayChProposalsServer) error { - return status.Errorf(codes.Unimplemented, "method SubPayChProposals not implemented") -} -func (*UnimplementedPayment_APIServer) UnsubPayChProposals(context.Context, *UnsubPayChProposalsReq) (*UnsubPayChProposalsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnsubPayChProposals not implemented") -} -func (*UnimplementedPayment_APIServer) RespondPayChProposal(context.Context, *RespondPayChProposalReq) (*RespondPayChProposalResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method RespondPayChProposal not implemented") -} -func (*UnimplementedPayment_APIServer) CloseSession(context.Context, *CloseSessionReq) (*CloseSessionResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method CloseSession not implemented") -} -func (*UnimplementedPayment_APIServer) DeployAssetERC20(context.Context, *DeployAssetERC20Req) (*DeployAssetERC20Resp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeployAssetERC20 not implemented") -} -func (*UnimplementedPayment_APIServer) SendPayChUpdate(context.Context, *SendPayChUpdateReq) (*SendPayChUpdateResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendPayChUpdate not implemented") -} -func (*UnimplementedPayment_APIServer) SubPayChUpdates(*SubpayChUpdatesReq, Payment_API_SubPayChUpdatesServer) error { - return status.Errorf(codes.Unimplemented, "method SubPayChUpdates not implemented") -} -func (*UnimplementedPayment_APIServer) UnsubPayChUpdates(context.Context, *UnsubPayChUpdatesReq) (*UnsubPayChUpdatesResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnsubPayChUpdates not implemented") -} -func (*UnimplementedPayment_APIServer) RespondPayChUpdate(context.Context, *RespondPayChUpdateReq) (*RespondPayChUpdateResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method RespondPayChUpdate not implemented") -} -func (*UnimplementedPayment_APIServer) GetPayChInfo(context.Context, *GetPayChInfoReq) (*GetPayChInfoResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPayChInfo not implemented") -} -func (*UnimplementedPayment_APIServer) ClosePayCh(context.Context, *ClosePayChReq) (*ClosePayChResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClosePayCh not implemented") -} - -func RegisterPayment_APIServer(s *grpc.Server, srv Payment_APIServer) { - s.RegisterService(&_Payment_API_serviceDesc, srv) -} - -func _Payment_API_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConfigReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).GetConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/GetConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).GetConfig(ctx, req.(*GetConfigReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_OpenSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OpenSessionReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).OpenSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/OpenSession", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).OpenSession(ctx, req.(*OpenSessionReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_Time_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TimeReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).Time(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/Time", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).Time(ctx, req.(*TimeReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_RegisterCurrency_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegisterCurrencyReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).RegisterCurrency(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/RegisterCurrency", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).RegisterCurrency(ctx, req.(*RegisterCurrencyReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_Help_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HelpReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).Help(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/Help", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).Help(ctx, req.(*HelpReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_AddPeerID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddPeerIDReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).AddPeerID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/AddPeerID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).AddPeerID(ctx, req.(*AddPeerIDReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_GetPeerID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPeerIDReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).GetPeerID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/GetPeerID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).GetPeerID(ctx, req.(*GetPeerIDReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_OpenPayCh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OpenPayChReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).OpenPayCh(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/OpenPayCh", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).OpenPayCh(ctx, req.(*OpenPayChReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_GetPayChsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPayChsInfoReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).GetPayChsInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/GetPayChsInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).GetPayChsInfo(ctx, req.(*GetPayChsInfoReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_SubPayChProposals_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SubPayChProposalsReq) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(Payment_APIServer).SubPayChProposals(m, &payment_APISubPayChProposalsServer{stream}) -} - -type Payment_API_SubPayChProposalsServer interface { - Send(*SubPayChProposalsResp) error - grpc.ServerStream -} - -type payment_APISubPayChProposalsServer struct { - grpc.ServerStream -} - -func (x *payment_APISubPayChProposalsServer) Send(m *SubPayChProposalsResp) error { - return x.ServerStream.SendMsg(m) -} - -func _Payment_API_UnsubPayChProposals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnsubPayChProposalsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).UnsubPayChProposals(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/UnsubPayChProposals", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).UnsubPayChProposals(ctx, req.(*UnsubPayChProposalsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_RespondPayChProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RespondPayChProposalReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).RespondPayChProposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/RespondPayChProposal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).RespondPayChProposal(ctx, req.(*RespondPayChProposalReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_CloseSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CloseSessionReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).CloseSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/CloseSession", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).CloseSession(ctx, req.(*CloseSessionReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_DeployAssetERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeployAssetERC20Req) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).DeployAssetERC20(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/DeployAssetERC20", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).DeployAssetERC20(ctx, req.(*DeployAssetERC20Req)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_SendPayChUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendPayChUpdateReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).SendPayChUpdate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/SendPayChUpdate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).SendPayChUpdate(ctx, req.(*SendPayChUpdateReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_SubPayChUpdates_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SubpayChUpdatesReq) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(Payment_APIServer).SubPayChUpdates(m, &payment_APISubPayChUpdatesServer{stream}) -} - -type Payment_API_SubPayChUpdatesServer interface { - Send(*SubPayChUpdatesResp) error - grpc.ServerStream -} - -type payment_APISubPayChUpdatesServer struct { - grpc.ServerStream -} - -func (x *payment_APISubPayChUpdatesServer) Send(m *SubPayChUpdatesResp) error { - return x.ServerStream.SendMsg(m) -} - -func _Payment_API_UnsubPayChUpdates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnsubPayChUpdatesReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).UnsubPayChUpdates(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/UnsubPayChUpdates", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).UnsubPayChUpdates(ctx, req.(*UnsubPayChUpdatesReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_RespondPayChUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RespondPayChUpdateReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).RespondPayChUpdate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/RespondPayChUpdate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).RespondPayChUpdate(ctx, req.(*RespondPayChUpdateReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_GetPayChInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPayChInfoReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).GetPayChInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/GetPayChInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).GetPayChInfo(ctx, req.(*GetPayChInfoReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Payment_API_ClosePayCh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClosePayChReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(Payment_APIServer).ClosePayCh(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Payment_API/ClosePayCh", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(Payment_APIServer).ClosePayCh(ctx, req.(*ClosePayChReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _Payment_API_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pb.Payment_API", - HandlerType: (*Payment_APIServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetConfig", - Handler: _Payment_API_GetConfig_Handler, - }, - { - MethodName: "OpenSession", - Handler: _Payment_API_OpenSession_Handler, - }, - { - MethodName: "Time", - Handler: _Payment_API_Time_Handler, - }, - { - MethodName: "RegisterCurrency", - Handler: _Payment_API_RegisterCurrency_Handler, - }, - { - MethodName: "Help", - Handler: _Payment_API_Help_Handler, - }, - { - MethodName: "AddPeerID", - Handler: _Payment_API_AddPeerID_Handler, - }, - { - MethodName: "GetPeerID", - Handler: _Payment_API_GetPeerID_Handler, - }, - { - MethodName: "OpenPayCh", - Handler: _Payment_API_OpenPayCh_Handler, - }, - { - MethodName: "GetPayChsInfo", - Handler: _Payment_API_GetPayChsInfo_Handler, - }, - { - MethodName: "UnsubPayChProposals", - Handler: _Payment_API_UnsubPayChProposals_Handler, - }, - { - MethodName: "RespondPayChProposal", - Handler: _Payment_API_RespondPayChProposal_Handler, - }, - { - MethodName: "CloseSession", - Handler: _Payment_API_CloseSession_Handler, - }, - { - MethodName: "DeployAssetERC20", - Handler: _Payment_API_DeployAssetERC20_Handler, - }, - { - MethodName: "SendPayChUpdate", - Handler: _Payment_API_SendPayChUpdate_Handler, - }, - { - MethodName: "UnsubPayChUpdates", - Handler: _Payment_API_UnsubPayChUpdates_Handler, - }, - { - MethodName: "RespondPayChUpdate", - Handler: _Payment_API_RespondPayChUpdate_Handler, - }, - { - MethodName: "GetPayChInfo", - Handler: _Payment_API_GetPayChInfo_Handler, - }, - { - MethodName: "ClosePayCh", - Handler: _Payment_API_ClosePayCh_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "SubPayChProposals", - Handler: _Payment_API_SubPayChProposals_Handler, - ServerStreams: true, - }, - { - StreamName: "SubPayChUpdates", - Handler: _Payment_API_SubPayChUpdates_Handler, - ServerStreams: true, - }, - }, - Metadata: "api.proto", -} diff --git a/api/grpc/pb/api_messages.pb.go b/api/grpc/pb/api_messages.pb.go new file mode 100644 index 00000000..54eadf49 --- /dev/null +++ b/api/grpc/pb/api_messages.pb.go @@ -0,0 +1,342 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v4.23.3 +// source: api_messages.proto + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This type is defined as the enumeration of all messages in funding and +// watching service, in order to be able to parse the messages in api/tcp +// package. +type APIMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Msg: + // + // *APIMessage_FundReq + // *APIMessage_FundResp + // *APIMessage_RegisterReq + // *APIMessage_RegisterResp + // *APIMessage_WithdrawReq + // *APIMessage_WithdrawResp + // *APIMessage_StartWatchingLedgerChannelReq + // *APIMessage_StopWatchingReq + Msg isAPIMessage_Msg `protobuf_oneof:"msg"` +} + +func (x *APIMessage) Reset() { + *x = APIMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_api_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *APIMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*APIMessage) ProtoMessage() {} + +func (x *APIMessage) ProtoReflect() protoreflect.Message { + mi := &file_api_messages_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use APIMessage.ProtoReflect.Descriptor instead. +func (*APIMessage) Descriptor() ([]byte, []int) { + return file_api_messages_proto_rawDescGZIP(), []int{0} +} + +func (m *APIMessage) GetMsg() isAPIMessage_Msg { + if m != nil { + return m.Msg + } + return nil +} + +func (x *APIMessage) GetFundReq() *FundReq { + if x, ok := x.GetMsg().(*APIMessage_FundReq); ok { + return x.FundReq + } + return nil +} + +func (x *APIMessage) GetFundResp() *FundResp { + if x, ok := x.GetMsg().(*APIMessage_FundResp); ok { + return x.FundResp + } + return nil +} + +func (x *APIMessage) GetRegisterReq() *RegisterReq { + if x, ok := x.GetMsg().(*APIMessage_RegisterReq); ok { + return x.RegisterReq + } + return nil +} + +func (x *APIMessage) GetRegisterResp() *RegisterResp { + if x, ok := x.GetMsg().(*APIMessage_RegisterResp); ok { + return x.RegisterResp + } + return nil +} + +func (x *APIMessage) GetWithdrawReq() *WithdrawReq { + if x, ok := x.GetMsg().(*APIMessage_WithdrawReq); ok { + return x.WithdrawReq + } + return nil +} + +func (x *APIMessage) GetWithdrawResp() *WithdrawResp { + if x, ok := x.GetMsg().(*APIMessage_WithdrawResp); ok { + return x.WithdrawResp + } + return nil +} + +func (x *APIMessage) GetStartWatchingLedgerChannelReq() *StartWatchingLedgerChannelReq { + if x, ok := x.GetMsg().(*APIMessage_StartWatchingLedgerChannelReq); ok { + return x.StartWatchingLedgerChannelReq + } + return nil +} + +func (x *APIMessage) GetStopWatchingReq() *StopWatchingReq { + if x, ok := x.GetMsg().(*APIMessage_StopWatchingReq); ok { + return x.StopWatchingReq + } + return nil +} + +type isAPIMessage_Msg interface { + isAPIMessage_Msg() +} + +type APIMessage_FundReq struct { + FundReq *FundReq `protobuf:"bytes,1,opt,name=fund_req,json=fundReq,proto3,oneof"` +} + +type APIMessage_FundResp struct { + FundResp *FundResp `protobuf:"bytes,2,opt,name=fund_resp,json=fundResp,proto3,oneof"` +} + +type APIMessage_RegisterReq struct { + RegisterReq *RegisterReq `protobuf:"bytes,3,opt,name=register_req,json=registerReq,proto3,oneof"` +} + +type APIMessage_RegisterResp struct { + RegisterResp *RegisterResp `protobuf:"bytes,4,opt,name=register_resp,json=registerResp,proto3,oneof"` +} + +type APIMessage_WithdrawReq struct { + WithdrawReq *WithdrawReq `protobuf:"bytes,5,opt,name=withdraw_req,json=withdrawReq,proto3,oneof"` +} + +type APIMessage_WithdrawResp struct { + WithdrawResp *WithdrawResp `protobuf:"bytes,6,opt,name=withdraw_resp,json=withdrawResp,proto3,oneof"` +} + +type APIMessage_StartWatchingLedgerChannelReq struct { + StartWatchingLedgerChannelReq *StartWatchingLedgerChannelReq `protobuf:"bytes,7,opt,name=start_watching_ledger_channel_req,json=startWatchingLedgerChannelReq,proto3,oneof"` +} + +type APIMessage_StopWatchingReq struct { + StopWatchingReq *StopWatchingReq `protobuf:"bytes,8,opt,name=stop_watching_req,json=stopWatchingReq,proto3,oneof"` +} + +func (*APIMessage_FundReq) isAPIMessage_Msg() {} + +func (*APIMessage_FundResp) isAPIMessage_Msg() {} + +func (*APIMessage_RegisterReq) isAPIMessage_Msg() {} + +func (*APIMessage_RegisterResp) isAPIMessage_Msg() {} + +func (*APIMessage_WithdrawReq) isAPIMessage_Msg() {} + +func (*APIMessage_WithdrawResp) isAPIMessage_Msg() {} + +func (*APIMessage_StartWatchingLedgerChannelReq) isAPIMessage_Msg() {} + +func (*APIMessage_StopWatchingReq) isAPIMessage_Msg() {} + +var File_api_messages_proto protoreflect.FileDescriptor + +var file_api_messages_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x61, 0x70, 0x69, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x15, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x16, 0x77, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x03, 0x0a, 0x0a, 0x41, 0x50, 0x49, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x72, + 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x75, + 0x6e, 0x64, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, 0x07, 0x66, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, + 0x12, 0x2b, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x48, 0x00, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, + 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x12, 0x37, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x72, 0x65, 0x73, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x48, 0x00, 0x52, 0x0c, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x0c, + 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x72, 0x65, 0x71, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, + 0x65, 0x71, 0x12, 0x37, 0x0a, 0x0d, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x72, + 0x65, 0x73, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x48, 0x00, 0x52, 0x0c, 0x77, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6d, 0x0a, 0x21, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x65, + 0x64, 0x67, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x71, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x43, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, 0x1d, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x41, 0x0a, 0x11, 0x73, 0x74, + 0x6f, 0x70, 0x5f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, + 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, + 0x6f, 0x70, 0x57, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x42, 0x05, 0x0a, + 0x03, 0x6d, 0x73, 0x67, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_api_messages_proto_rawDescOnce sync.Once + file_api_messages_proto_rawDescData = file_api_messages_proto_rawDesc +) + +func file_api_messages_proto_rawDescGZIP() []byte { + file_api_messages_proto_rawDescOnce.Do(func() { + file_api_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_messages_proto_rawDescData) + }) + return file_api_messages_proto_rawDescData +} + +var file_api_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_api_messages_proto_goTypes = []interface{}{ + (*APIMessage)(nil), // 0: pb.APIMessage + (*FundReq)(nil), // 1: pb.FundReq + (*FundResp)(nil), // 2: pb.FundResp + (*RegisterReq)(nil), // 3: pb.RegisterReq + (*RegisterResp)(nil), // 4: pb.RegisterResp + (*WithdrawReq)(nil), // 5: pb.WithdrawReq + (*WithdrawResp)(nil), // 6: pb.WithdrawResp + (*StartWatchingLedgerChannelReq)(nil), // 7: pb.StartWatchingLedgerChannelReq + (*StopWatchingReq)(nil), // 8: pb.StopWatchingReq +} +var file_api_messages_proto_depIdxs = []int32{ + 1, // 0: pb.APIMessage.fund_req:type_name -> pb.FundReq + 2, // 1: pb.APIMessage.fund_resp:type_name -> pb.FundResp + 3, // 2: pb.APIMessage.register_req:type_name -> pb.RegisterReq + 4, // 3: pb.APIMessage.register_resp:type_name -> pb.RegisterResp + 5, // 4: pb.APIMessage.withdraw_req:type_name -> pb.WithdrawReq + 6, // 5: pb.APIMessage.withdraw_resp:type_name -> pb.WithdrawResp + 7, // 6: pb.APIMessage.start_watching_ledger_channel_req:type_name -> pb.StartWatchingLedgerChannelReq + 8, // 7: pb.APIMessage.stop_watching_req:type_name -> pb.StopWatchingReq + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_api_messages_proto_init() } +func file_api_messages_proto_init() { + if File_api_messages_proto != nil { + return + } + file_funding_service_proto_init() + file_watching_service_proto_init() + if !protoimpl.UnsafeEnabled { + file_api_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*APIMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_api_messages_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*APIMessage_FundReq)(nil), + (*APIMessage_FundResp)(nil), + (*APIMessage_RegisterReq)(nil), + (*APIMessage_RegisterResp)(nil), + (*APIMessage_WithdrawReq)(nil), + (*APIMessage_WithdrawResp)(nil), + (*APIMessage_StartWatchingLedgerChannelReq)(nil), + (*APIMessage_StopWatchingReq)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_messages_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_api_messages_proto_goTypes, + DependencyIndexes: file_api_messages_proto_depIdxs, + MessageInfos: file_api_messages_proto_msgTypes, + }.Build() + File_api_messages_proto = out.File + file_api_messages_proto_rawDesc = nil + file_api_messages_proto_goTypes = nil + file_api_messages_proto_depIdxs = nil +} diff --git a/api/grpc/pb/generate.go b/api/grpc/pb/doc.go similarity index 80% rename from api/grpc/pb/generate.go rename to api/grpc/pb/doc.go index accfd9e8..79cb7cf2 100644 --- a/api/grpc/pb/generate.go +++ b/api/grpc/pb/doc.go @@ -14,8 +14,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package pb contains proto3 definitions for user API and the corresponding -// generated code for grpc server and client. +// Package pb contains generated protobuf and grpc bindings; and the helper +// functions to convert data protobuf <-> perun format. package pb - -//go:generate protoc --go_out=plugins=grpc:. api.proto diff --git a/api/grpc/pb/errors.go b/api/grpc/pb/errors.go new file mode 100644 index 00000000..620cfb77 --- /dev/null +++ b/api/grpc/pb/errors.go @@ -0,0 +1,222 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pb + +import ( + "github.com/pkg/errors" + + "github.com/hyperledger-labs/perun-node" + "github.com/hyperledger-labs/perun-node/app/payment" +) + +// ToError is a helper function to convert APIError struct defined in the grpc +// package back to APIError struct defined in the perun-node package. +func ToError(grpcErr *MsgError) perun.APIError { //nolint:funlen + var addInfo interface{} + + switch info := grpcErr.AddInfo.(type) { + case *MsgError_ErrInfoPeerRequestTimedOut: + addInfo = perun.ErrInfoPeerRequestTimedOut{ + Timeout: info.ErrInfoPeerRequestTimedOut.Timeout, + } + case *MsgError_ErrInfoPeerRejected: + addInfo = perun.ErrInfoPeerRejected{ + PeerAlias: info.ErrInfoPeerRejected.PeerAlias, + Reason: info.ErrInfoPeerRejected.Reason, + } + case *MsgError_ErrInfoPeerNotFunded: + addInfo = perun.ErrInfoPeerNotFunded{ + PeerAlias: info.ErrInfoPeerNotFunded.PeerAlias, + } + case *MsgError_ErrInfoUserResponseTimedOut: + addInfo = perun.ErrInfoUserResponseTimedOut{ + Expiry: info.ErrInfoUserResponseTimedOut.Expiry, + ReceivedAt: info.ErrInfoUserResponseTimedOut.ReceivedAt, + } + case *MsgError_ErrInfoResourceNotFound: + addInfo = perun.ErrInfoResourceNotFound{ + Type: info.ErrInfoResourceNotFound.Type, + ID: info.ErrInfoResourceNotFound.Id, + } + case *MsgError_ErrInfoResourceExists: + addInfo = perun.ErrInfoResourceExists{ + Type: info.ErrInfoResourceExists.Type, + ID: info.ErrInfoResourceExists.Id, + } + case *MsgError_ErrInfoInvalidArgument: + addInfo = perun.ErrInfoInvalidArgument{ + Name: info.ErrInfoInvalidArgument.Name, + Value: info.ErrInfoInvalidArgument.Value, + Requirement: info.ErrInfoInvalidArgument.Requirement, + } + case *MsgError_ErrInfoFailedPreCondUnclosedChs: + addInfo = payment.ErrInfoFailedPreCondUnclosedPayChs{ + PayChs: ToPayChsInfo(info.ErrInfoFailedPreCondUnclosedChs.Chs), + } + case *MsgError_ErrInfoInvalidConfig: + addInfo = perun.ErrInfoInvalidConfig{ + Name: info.ErrInfoInvalidConfig.Name, + Value: info.ErrInfoInvalidConfig.Value, + } + case *MsgError_ErrInfoInvalidContracts: + addInfo = perun.ErrInfoInvalidContracts{ + ContractErrInfos: ToContractErrInfos(info.ErrInfoInvalidContracts.ContractErrInfos), + } + case *MsgError_ErrInfoTxTimedOut: + addInfo = perun.ErrInfoTxTimedOut{ + TxType: info.ErrInfoTxTimedOut.TxType, + TxID: info.ErrInfoTxTimedOut.TxID, + TxTimeout: info.ErrInfoTxTimedOut.TxTimeout, + } + case *MsgError_ErrInfoChainNotReachable: + addInfo = perun.ErrInfoChainNotReachable{ + ChainURL: info.ErrInfoChainNotReachable.ChainURL, + } + default: + addInfo = nil + } + + return perun.NewAPIErr( + perun.ErrorCategory(grpcErr.Category), + perun.ErrorCode(grpcErr.Code), + errors.New(grpcErr.Message), + addInfo, + ) +} + +// FromError is a helper function to convert APIError struct defined in perun-node +// to APIError struct defined in grpc package. +func FromError(err perun.APIError) *MsgError { //nolint:funlen + grpcErr := MsgError{ + Category: ErrorCategory(err.Category()), + Code: ErrorCode(err.Code()), + Message: err.Message(), + } + switch info := err.AddInfo().(type) { + case perun.ErrInfoPeerRequestTimedOut: + grpcErr.AddInfo = &MsgError_ErrInfoPeerRequestTimedOut{ + ErrInfoPeerRequestTimedOut: &ErrInfoPeerRequestTimedOut{ + Timeout: info.Timeout, + }, + } + case perun.ErrInfoPeerRejected: + grpcErr.AddInfo = &MsgError_ErrInfoPeerRejected{ + ErrInfoPeerRejected: &ErrInfoPeerRejected{ + PeerAlias: info.PeerAlias, + Reason: info.Reason, + }, + } + case perun.ErrInfoPeerNotFunded: + grpcErr.AddInfo = &MsgError_ErrInfoPeerNotFunded{ + ErrInfoPeerNotFunded: &ErrInfoPeerNotFunded{ + PeerAlias: info.PeerAlias, + }, + } + case perun.ErrInfoUserResponseTimedOut: + grpcErr.AddInfo = &MsgError_ErrInfoUserResponseTimedOut{ + ErrInfoUserResponseTimedOut: &ErrInfoUserResponseTimedOut{ + Expiry: info.Expiry, + ReceivedAt: info.ReceivedAt, + }, + } + case perun.ErrInfoResourceNotFound: + grpcErr.AddInfo = &MsgError_ErrInfoResourceNotFound{ + ErrInfoResourceNotFound: &ErrInfoResourceNotFound{ + Type: info.Type, + Id: info.ID, + }, + } + case perun.ErrInfoResourceExists: + grpcErr.AddInfo = &MsgError_ErrInfoResourceExists{ + ErrInfoResourceExists: &ErrInfoResourceExists{ + Type: info.Type, + Id: info.ID, + }, + } + case perun.ErrInfoInvalidArgument: + grpcErr.AddInfo = &MsgError_ErrInfoInvalidArgument{ + ErrInfoInvalidArgument: &ErrInfoInvalidArgument{ + Name: info.Name, + Value: info.Value, + Requirement: info.Requirement, + }, + } + case payment.ErrInfoFailedPreCondUnclosedPayChs: + grpcErr.AddInfo = &MsgError_ErrInfoFailedPreCondUnclosedChs{ + ErrInfoFailedPreCondUnclosedChs: &ErrInfoFailedPreCondUnclosedChs{ + Chs: FromPayChsInfo(info.PayChs), + }, + } + case perun.ErrInfoInvalidConfig: + grpcErr.AddInfo = &MsgError_ErrInfoInvalidConfig{ + ErrInfoInvalidConfig: &ErrInfoInvalidConfig{ + Name: info.Name, + Value: info.Value, + }, + } + case perun.ErrInfoInvalidContracts: + grpcErr.AddInfo = &MsgError_ErrInfoInvalidContracts{ + ErrInfoInvalidContracts: &ErrInfoInvalidContracts{ + ContractErrInfos: FromContractErrInfos(info.ContractErrInfos), + }, + } + case perun.ErrInfoTxTimedOut: + grpcErr.AddInfo = &MsgError_ErrInfoTxTimedOut{ + ErrInfoTxTimedOut: &ErrInfoTxTimedOut{ + TxType: info.TxType, + TxID: info.TxID, + TxTimeout: info.TxTimeout, + }, + } + case perun.ErrInfoChainNotReachable: + grpcErr.AddInfo = &MsgError_ErrInfoChainNotReachable{ + ErrInfoChainNotReachable: &ErrInfoChainNotReachable{ + ChainURL: info.ChainURL, + }, + } + default: + // It is Unknonwn Internal Error which has no additional info. + grpcErr.AddInfo = nil + } + return &grpcErr +} + +// FromContractErrInfos is a helper function to convert a slice of +// ContractErrInfo struct defined in perun-node to a slice of ContractErrInfo +// struct defined in grpc package. +func FromContractErrInfos(src []perun.ContractErrInfo) []*ContractErrInfo { + output := make([]*ContractErrInfo, len(src)) + for i := range src { + output[i].Name = src[i].Name + output[i].Address = src[i].Address + output[i].Error = src[i].Error + } + return output +} + +// ToContractErrInfos is a helper function to convert a slice of +// ContractErrInfo struct defined in the grpc package to a slice of +// ContractErrInfo struct defined in the perun-node package. +func ToContractErrInfos(src []*ContractErrInfo) []perun.ContractErrInfo { + output := make([]perun.ContractErrInfo, len(src)) + for i := range src { + output[i].Name = src[i].Name + output[i].Address = src[i].Address + output[i].Error = src[i].Error + } + return output +} diff --git a/api/grpc/pb/errors.pb.go b/api/grpc/pb/errors.pb.go new file mode 100644 index 00000000..bdfdeb16 --- /dev/null +++ b/api/grpc/pb/errors.pb.go @@ -0,0 +1,1571 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v4.23.3 +// source: errors.proto + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ErrorCategory int32 + +const ( + ErrorCategory_ParticipantError ErrorCategory = 0 + ErrorCategory_ClientError ErrorCategory = 1 + ErrorCategory_ProtocolError ErrorCategory = 2 + ErrorCategory_InternalError ErrorCategory = 3 +) + +// Enum value maps for ErrorCategory. +var ( + ErrorCategory_name = map[int32]string{ + 0: "ParticipantError", + 1: "ClientError", + 2: "ProtocolError", + 3: "InternalError", + } + ErrorCategory_value = map[string]int32{ + "ParticipantError": 0, + "ClientError": 1, + "ProtocolError": 2, + "InternalError": 3, + } +) + +func (x ErrorCategory) Enum() *ErrorCategory { + p := new(ErrorCategory) + *p = x + return p +} + +func (x ErrorCategory) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorCategory) Descriptor() protoreflect.EnumDescriptor { + return file_errors_proto_enumTypes[0].Descriptor() +} + +func (ErrorCategory) Type() protoreflect.EnumType { + return &file_errors_proto_enumTypes[0] +} + +func (x ErrorCategory) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ErrorCategory.Descriptor instead. +func (ErrorCategory) EnumDescriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{0} +} + +type ErrorCode int32 + +const ( + // Though "0" is an invalid error code, we still define it, because + // proto3 requires that every enum definition should have 0 mapped to + // atleast one constant. + ErrorCode_DefaultInvalidCode ErrorCode = 0 + ErrorCode_ErrPeerRequestTimedOut ErrorCode = 101 + ErrorCode_ErrPeerRejected ErrorCode = 102 + ErrorCode_ErrPeerNotFunded ErrorCode = 103 + ErrorCode_ErrUserResponseTimedOut ErrorCode = 104 + ErrorCode_ErrResourceNotFound ErrorCode = 201 + ErrorCode_ErrResourceExists ErrorCode = 202 + ErrorCode_ErrInvalidArgument ErrorCode = 203 + ErrorCode_ErrFailedPreCondition ErrorCode = 204 + ErrorCode_ErrInvalidConfig ErrorCode = 205 + ErrorCode_ErrInvalidContracts ErrorCode = 206 + ErrorCode_ErrTxTimedOut ErrorCode = 301 + ErrorCode_ErrChainNotReachable ErrorCode = 302 + ErrorCode_ErrUnknownInternal ErrorCode = 401 +) + +// Enum value maps for ErrorCode. +var ( + ErrorCode_name = map[int32]string{ + 0: "DefaultInvalidCode", + 101: "ErrPeerRequestTimedOut", + 102: "ErrPeerRejected", + 103: "ErrPeerNotFunded", + 104: "ErrUserResponseTimedOut", + 201: "ErrResourceNotFound", + 202: "ErrResourceExists", + 203: "ErrInvalidArgument", + 204: "ErrFailedPreCondition", + 205: "ErrInvalidConfig", + 206: "ErrInvalidContracts", + 301: "ErrTxTimedOut", + 302: "ErrChainNotReachable", + 401: "ErrUnknownInternal", + } + ErrorCode_value = map[string]int32{ + "DefaultInvalidCode": 0, + "ErrPeerRequestTimedOut": 101, + "ErrPeerRejected": 102, + "ErrPeerNotFunded": 103, + "ErrUserResponseTimedOut": 104, + "ErrResourceNotFound": 201, + "ErrResourceExists": 202, + "ErrInvalidArgument": 203, + "ErrFailedPreCondition": 204, + "ErrInvalidConfig": 205, + "ErrInvalidContracts": 206, + "ErrTxTimedOut": 301, + "ErrChainNotReachable": 302, + "ErrUnknownInternal": 401, + } +) + +func (x ErrorCode) Enum() *ErrorCode { + p := new(ErrorCode) + *p = x + return p +} + +func (x ErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_errors_proto_enumTypes[1].Descriptor() +} + +func (ErrorCode) Type() protoreflect.EnumType { + return &file_errors_proto_enumTypes[1] +} + +func (x ErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ErrorCode.Descriptor instead. +func (ErrorCode) EnumDescriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{1} +} + +type MsgError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Category ErrorCategory `protobuf:"varint,1,opt,name=category,proto3,enum=pb.ErrorCategory" json:"category,omitempty"` + Code ErrorCode `protobuf:"varint,2,opt,name=code,proto3,enum=pb.ErrorCode" json:"code,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + // Types that are assignable to AddInfo: + // + // *MsgError_ErrInfoPeerRequestTimedOut + // *MsgError_ErrInfoPeerRejected + // *MsgError_ErrInfoPeerNotFunded + // *MsgError_ErrInfoUserResponseTimedOut + // *MsgError_ErrInfoResourceNotFound + // *MsgError_ErrInfoResourceExists + // *MsgError_ErrInfoInvalidArgument + // *MsgError_ErrInfoFailedPreCondUnclosedChs + // *MsgError_ErrInfoInvalidConfig + // *MsgError_ErrInfoInvalidContracts + // *MsgError_ErrInfoTxTimedOut + // *MsgError_ErrInfoChainNotReachable + AddInfo isMsgError_AddInfo `protobuf_oneof:"addInfo"` +} + +func (x *MsgError) Reset() { + *x = MsgError{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgError) ProtoMessage() {} + +func (x *MsgError) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgError.ProtoReflect.Descriptor instead. +func (*MsgError) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgError) GetCategory() ErrorCategory { + if x != nil { + return x.Category + } + return ErrorCategory_ParticipantError +} + +func (x *MsgError) GetCode() ErrorCode { + if x != nil { + return x.Code + } + return ErrorCode_DefaultInvalidCode +} + +func (x *MsgError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (m *MsgError) GetAddInfo() isMsgError_AddInfo { + if m != nil { + return m.AddInfo + } + return nil +} + +func (x *MsgError) GetErrInfoPeerRequestTimedOut() *ErrInfoPeerRequestTimedOut { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoPeerRequestTimedOut); ok { + return x.ErrInfoPeerRequestTimedOut + } + return nil +} + +func (x *MsgError) GetErrInfoPeerRejected() *ErrInfoPeerRejected { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoPeerRejected); ok { + return x.ErrInfoPeerRejected + } + return nil +} + +func (x *MsgError) GetErrInfoPeerNotFunded() *ErrInfoPeerNotFunded { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoPeerNotFunded); ok { + return x.ErrInfoPeerNotFunded + } + return nil +} + +func (x *MsgError) GetErrInfoUserResponseTimedOut() *ErrInfoUserResponseTimedOut { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoUserResponseTimedOut); ok { + return x.ErrInfoUserResponseTimedOut + } + return nil +} + +func (x *MsgError) GetErrInfoResourceNotFound() *ErrInfoResourceNotFound { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoResourceNotFound); ok { + return x.ErrInfoResourceNotFound + } + return nil +} + +func (x *MsgError) GetErrInfoResourceExists() *ErrInfoResourceExists { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoResourceExists); ok { + return x.ErrInfoResourceExists + } + return nil +} + +func (x *MsgError) GetErrInfoInvalidArgument() *ErrInfoInvalidArgument { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoInvalidArgument); ok { + return x.ErrInfoInvalidArgument + } + return nil +} + +func (x *MsgError) GetErrInfoFailedPreCondUnclosedChs() *ErrInfoFailedPreCondUnclosedChs { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoFailedPreCondUnclosedChs); ok { + return x.ErrInfoFailedPreCondUnclosedChs + } + return nil +} + +func (x *MsgError) GetErrInfoInvalidConfig() *ErrInfoInvalidConfig { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoInvalidConfig); ok { + return x.ErrInfoInvalidConfig + } + return nil +} + +func (x *MsgError) GetErrInfoInvalidContracts() *ErrInfoInvalidContracts { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoInvalidContracts); ok { + return x.ErrInfoInvalidContracts + } + return nil +} + +func (x *MsgError) GetErrInfoTxTimedOut() *ErrInfoTxTimedOut { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoTxTimedOut); ok { + return x.ErrInfoTxTimedOut + } + return nil +} + +func (x *MsgError) GetErrInfoChainNotReachable() *ErrInfoChainNotReachable { + if x, ok := x.GetAddInfo().(*MsgError_ErrInfoChainNotReachable); ok { + return x.ErrInfoChainNotReachable + } + return nil +} + +type isMsgError_AddInfo interface { + isMsgError_AddInfo() +} + +type MsgError_ErrInfoPeerRequestTimedOut struct { + ErrInfoPeerRequestTimedOut *ErrInfoPeerRequestTimedOut `protobuf:"bytes,4,opt,name=ErrInfoPeerRequestTimedOut,proto3,oneof"` +} + +type MsgError_ErrInfoPeerRejected struct { + ErrInfoPeerRejected *ErrInfoPeerRejected `protobuf:"bytes,5,opt,name=ErrInfoPeerRejected,proto3,oneof"` +} + +type MsgError_ErrInfoPeerNotFunded struct { + ErrInfoPeerNotFunded *ErrInfoPeerNotFunded `protobuf:"bytes,6,opt,name=ErrInfoPeerNotFunded,proto3,oneof"` +} + +type MsgError_ErrInfoUserResponseTimedOut struct { + ErrInfoUserResponseTimedOut *ErrInfoUserResponseTimedOut `protobuf:"bytes,7,opt,name=ErrInfoUserResponseTimedOut,proto3,oneof"` +} + +type MsgError_ErrInfoResourceNotFound struct { + ErrInfoResourceNotFound *ErrInfoResourceNotFound `protobuf:"bytes,8,opt,name=ErrInfoResourceNotFound,proto3,oneof"` +} + +type MsgError_ErrInfoResourceExists struct { + ErrInfoResourceExists *ErrInfoResourceExists `protobuf:"bytes,9,opt,name=ErrInfoResourceExists,proto3,oneof"` +} + +type MsgError_ErrInfoInvalidArgument struct { + ErrInfoInvalidArgument *ErrInfoInvalidArgument `protobuf:"bytes,10,opt,name=ErrInfoInvalidArgument,proto3,oneof"` +} + +type MsgError_ErrInfoFailedPreCondUnclosedChs struct { + ErrInfoFailedPreCondUnclosedChs *ErrInfoFailedPreCondUnclosedChs `protobuf:"bytes,11,opt,name=ErrInfoFailedPreCondUnclosedChs,proto3,oneof"` +} + +type MsgError_ErrInfoInvalidConfig struct { + ErrInfoInvalidConfig *ErrInfoInvalidConfig `protobuf:"bytes,13,opt,name=ErrInfoInvalidConfig,proto3,oneof"` +} + +type MsgError_ErrInfoInvalidContracts struct { + ErrInfoInvalidContracts *ErrInfoInvalidContracts `protobuf:"bytes,14,opt,name=ErrInfoInvalidContracts,proto3,oneof"` +} + +type MsgError_ErrInfoTxTimedOut struct { + ErrInfoTxTimedOut *ErrInfoTxTimedOut `protobuf:"bytes,15,opt,name=ErrInfoTxTimedOut,proto3,oneof"` +} + +type MsgError_ErrInfoChainNotReachable struct { + ErrInfoChainNotReachable *ErrInfoChainNotReachable `protobuf:"bytes,16,opt,name=ErrInfoChainNotReachable,proto3,oneof"` +} + +func (*MsgError_ErrInfoPeerRequestTimedOut) isMsgError_AddInfo() {} + +func (*MsgError_ErrInfoPeerRejected) isMsgError_AddInfo() {} + +func (*MsgError_ErrInfoPeerNotFunded) isMsgError_AddInfo() {} + +func (*MsgError_ErrInfoUserResponseTimedOut) isMsgError_AddInfo() {} + +func (*MsgError_ErrInfoResourceNotFound) isMsgError_AddInfo() {} + +func (*MsgError_ErrInfoResourceExists) isMsgError_AddInfo() {} + +func (*MsgError_ErrInfoInvalidArgument) isMsgError_AddInfo() {} + +func (*MsgError_ErrInfoFailedPreCondUnclosedChs) isMsgError_AddInfo() {} + +func (*MsgError_ErrInfoInvalidConfig) isMsgError_AddInfo() {} + +func (*MsgError_ErrInfoInvalidContracts) isMsgError_AddInfo() {} + +func (*MsgError_ErrInfoTxTimedOut) isMsgError_AddInfo() {} + +func (*MsgError_ErrInfoChainNotReachable) isMsgError_AddInfo() {} + +type ErrInfoPeerRequestTimedOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerAlias string `protobuf:"bytes,1,opt,name=peerAlias,proto3" json:"peerAlias,omitempty"` + Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` +} + +func (x *ErrInfoPeerRequestTimedOut) Reset() { + *x = ErrInfoPeerRequestTimedOut{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoPeerRequestTimedOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoPeerRequestTimedOut) ProtoMessage() {} + +func (x *ErrInfoPeerRequestTimedOut) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoPeerRequestTimedOut.ProtoReflect.Descriptor instead. +func (*ErrInfoPeerRequestTimedOut) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{1} +} + +func (x *ErrInfoPeerRequestTimedOut) GetPeerAlias() string { + if x != nil { + return x.PeerAlias + } + return "" +} + +func (x *ErrInfoPeerRequestTimedOut) GetTimeout() string { + if x != nil { + return x.Timeout + } + return "" +} + +type ErrInfoPeerRejected struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerAlias string `protobuf:"bytes,1,opt,name=peerAlias,proto3" json:"peerAlias,omitempty"` + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` +} + +func (x *ErrInfoPeerRejected) Reset() { + *x = ErrInfoPeerRejected{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoPeerRejected) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoPeerRejected) ProtoMessage() {} + +func (x *ErrInfoPeerRejected) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoPeerRejected.ProtoReflect.Descriptor instead. +func (*ErrInfoPeerRejected) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{2} +} + +func (x *ErrInfoPeerRejected) GetPeerAlias() string { + if x != nil { + return x.PeerAlias + } + return "" +} + +func (x *ErrInfoPeerRejected) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type ErrInfoPeerNotFunded struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerAlias string `protobuf:"bytes,1,opt,name=peerAlias,proto3" json:"peerAlias,omitempty"` +} + +func (x *ErrInfoPeerNotFunded) Reset() { + *x = ErrInfoPeerNotFunded{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoPeerNotFunded) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoPeerNotFunded) ProtoMessage() {} + +func (x *ErrInfoPeerNotFunded) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoPeerNotFunded.ProtoReflect.Descriptor instead. +func (*ErrInfoPeerNotFunded) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{3} +} + +func (x *ErrInfoPeerNotFunded) GetPeerAlias() string { + if x != nil { + return x.PeerAlias + } + return "" +} + +type ErrInfoUserResponseTimedOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Expiry int64 `protobuf:"varint,1,opt,name=expiry,proto3" json:"expiry,omitempty"` + ReceivedAt int64 `protobuf:"varint,2,opt,name=receivedAt,proto3" json:"receivedAt,omitempty"` +} + +func (x *ErrInfoUserResponseTimedOut) Reset() { + *x = ErrInfoUserResponseTimedOut{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoUserResponseTimedOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoUserResponseTimedOut) ProtoMessage() {} + +func (x *ErrInfoUserResponseTimedOut) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoUserResponseTimedOut.ProtoReflect.Descriptor instead. +func (*ErrInfoUserResponseTimedOut) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{4} +} + +func (x *ErrInfoUserResponseTimedOut) GetExpiry() int64 { + if x != nil { + return x.Expiry + } + return 0 +} + +func (x *ErrInfoUserResponseTimedOut) GetReceivedAt() int64 { + if x != nil { + return x.ReceivedAt + } + return 0 +} + +type ErrInfoResourceNotFound struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ErrInfoResourceNotFound) Reset() { + *x = ErrInfoResourceNotFound{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoResourceNotFound) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoResourceNotFound) ProtoMessage() {} + +func (x *ErrInfoResourceNotFound) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoResourceNotFound.ProtoReflect.Descriptor instead. +func (*ErrInfoResourceNotFound) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{5} +} + +func (x *ErrInfoResourceNotFound) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *ErrInfoResourceNotFound) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ErrInfoResourceExists struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ErrInfoResourceExists) Reset() { + *x = ErrInfoResourceExists{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoResourceExists) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoResourceExists) ProtoMessage() {} + +func (x *ErrInfoResourceExists) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoResourceExists.ProtoReflect.Descriptor instead. +func (*ErrInfoResourceExists) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{6} +} + +func (x *ErrInfoResourceExists) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *ErrInfoResourceExists) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ErrInfoInvalidArgument struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Requirement string `protobuf:"bytes,3,opt,name=requirement,proto3" json:"requirement,omitempty"` +} + +func (x *ErrInfoInvalidArgument) Reset() { + *x = ErrInfoInvalidArgument{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoInvalidArgument) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoInvalidArgument) ProtoMessage() {} + +func (x *ErrInfoInvalidArgument) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoInvalidArgument.ProtoReflect.Descriptor instead. +func (*ErrInfoInvalidArgument) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{7} +} + +func (x *ErrInfoInvalidArgument) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ErrInfoInvalidArgument) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *ErrInfoInvalidArgument) GetRequirement() string { + if x != nil { + return x.Requirement + } + return "" +} + +type ErrInfoFailedPreCondUnclosedChs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Chs []*PayChInfo `protobuf:"bytes,1,rep,name=chs,proto3" json:"chs,omitempty"` +} + +func (x *ErrInfoFailedPreCondUnclosedChs) Reset() { + *x = ErrInfoFailedPreCondUnclosedChs{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoFailedPreCondUnclosedChs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoFailedPreCondUnclosedChs) ProtoMessage() {} + +func (x *ErrInfoFailedPreCondUnclosedChs) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoFailedPreCondUnclosedChs.ProtoReflect.Descriptor instead. +func (*ErrInfoFailedPreCondUnclosedChs) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{8} +} + +func (x *ErrInfoFailedPreCondUnclosedChs) GetChs() []*PayChInfo { + if x != nil { + return x.Chs + } + return nil +} + +type ErrInfoInvalidConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *ErrInfoInvalidConfig) Reset() { + *x = ErrInfoInvalidConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoInvalidConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoInvalidConfig) ProtoMessage() {} + +func (x *ErrInfoInvalidConfig) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoInvalidConfig.ProtoReflect.Descriptor instead. +func (*ErrInfoInvalidConfig) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{9} +} + +func (x *ErrInfoInvalidConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ErrInfoInvalidConfig) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type ContractErrInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *ContractErrInfo) Reset() { + *x = ContractErrInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContractErrInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractErrInfo) ProtoMessage() {} + +func (x *ContractErrInfo) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContractErrInfo.ProtoReflect.Descriptor instead. +func (*ContractErrInfo) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{10} +} + +func (x *ContractErrInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ContractErrInfo) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ContractErrInfo) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type ErrInfoInvalidContracts struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ContractErrInfos []*ContractErrInfo `protobuf:"bytes,1,rep,name=ContractErrInfos,proto3" json:"ContractErrInfos,omitempty"` +} + +func (x *ErrInfoInvalidContracts) Reset() { + *x = ErrInfoInvalidContracts{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoInvalidContracts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoInvalidContracts) ProtoMessage() {} + +func (x *ErrInfoInvalidContracts) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoInvalidContracts.ProtoReflect.Descriptor instead. +func (*ErrInfoInvalidContracts) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{11} +} + +func (x *ErrInfoInvalidContracts) GetContractErrInfos() []*ContractErrInfo { + if x != nil { + return x.ContractErrInfos + } + return nil +} + +type ErrInfoTxTimedOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxType string `protobuf:"bytes,1,opt,name=txType,proto3" json:"txType,omitempty"` + TxID string `protobuf:"bytes,2,opt,name=txID,proto3" json:"txID,omitempty"` + TxTimeout string `protobuf:"bytes,3,opt,name=txTimeout,proto3" json:"txTimeout,omitempty"` +} + +func (x *ErrInfoTxTimedOut) Reset() { + *x = ErrInfoTxTimedOut{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoTxTimedOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoTxTimedOut) ProtoMessage() {} + +func (x *ErrInfoTxTimedOut) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoTxTimedOut.ProtoReflect.Descriptor instead. +func (*ErrInfoTxTimedOut) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{12} +} + +func (x *ErrInfoTxTimedOut) GetTxType() string { + if x != nil { + return x.TxType + } + return "" +} + +func (x *ErrInfoTxTimedOut) GetTxID() string { + if x != nil { + return x.TxID + } + return "" +} + +func (x *ErrInfoTxTimedOut) GetTxTimeout() string { + if x != nil { + return x.TxTimeout + } + return "" +} + +type ErrInfoChainNotReachable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainURL string `protobuf:"bytes,1,opt,name=chainURL,proto3" json:"chainURL,omitempty"` +} + +func (x *ErrInfoChainNotReachable) Reset() { + *x = ErrInfoChainNotReachable{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrInfoChainNotReachable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrInfoChainNotReachable) ProtoMessage() {} + +func (x *ErrInfoChainNotReachable) ProtoReflect() protoreflect.Message { + mi := &file_errors_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrInfoChainNotReachable.ProtoReflect.Descriptor instead. +func (*ErrInfoChainNotReachable) Descriptor() ([]byte, []int) { + return file_errors_proto_rawDescGZIP(), []int{13} +} + +func (x *ErrInfoChainNotReachable) GetChainURL() string { + if x != nil { + return x.ChainURL + } + return "" +} + +var File_errors_proto protoreflect.FileDescriptor + +var file_errors_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, + 0x70, 0x62, 0x1a, 0x0f, 0x6e, 0x6f, 0x64, 0x65, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x09, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x2d, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x61, 0x74, + 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, + 0x21, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, + 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x60, 0x0a, 0x1a, + 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, + 0x48, 0x00, 0x52, 0x1a, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x4b, + 0x0a, 0x13, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x6a, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, + 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x6a, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x13, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, + 0x65, 0x65, 0x72, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x4e, 0x0a, 0x14, 0x45, + 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x75, 0x6e, + 0x64, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x45, + 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x75, 0x6e, + 0x64, 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, + 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x63, 0x0a, 0x1b, 0x45, + 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, + 0x74, 0x48, 0x00, 0x52, 0x1b, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, + 0x12, 0x57, 0x0a, 0x17, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x00, + 0x52, 0x17, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x51, 0x0a, 0x15, 0x45, 0x72, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, 0x69, 0x73, + 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x48, 0x00, 0x52, 0x15, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x54, 0x0a, 0x16, + 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x72, + 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, + 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x16, 0x45, 0x72, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x6f, 0x0a, 0x1f, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x50, 0x72, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6c, 0x6f, 0x73, + 0x65, 0x64, 0x43, 0x68, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x62, + 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x50, 0x72, + 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x73, + 0x48, 0x00, 0x52, 0x1f, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x50, 0x72, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, + 0x43, 0x68, 0x73, 0x12, 0x4e, 0x0a, 0x14, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x14, 0x45, + 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x57, 0x0a, 0x17, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x73, 0x48, 0x00, 0x52, 0x17, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x11, + 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x54, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, + 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x54, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x48, 0x00, + 0x52, 0x11, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x54, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x64, + 0x4f, 0x75, 0x74, 0x12, 0x5a, 0x0a, 0x18, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, + 0x62, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x18, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x42, + 0x09, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x54, 0x0a, 0x1a, 0x45, 0x72, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, + 0x72, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x22, 0x4b, 0x0a, 0x13, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x52, + 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x34, 0x0a, + 0x14, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, + 0x75, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x22, 0x55, 0x0a, 0x1b, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, + 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x41, 0x74, 0x22, 0x3d, 0x0a, 0x17, 0x45, 0x72, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x74, + 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x15, 0x45, 0x72, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, 0x69, 0x73, + 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x16, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x42, 0x0a, 0x1f, + 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x50, 0x72, 0x65, + 0x43, 0x6f, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x68, 0x73, 0x12, + 0x1f, 0x0a, 0x03, 0x63, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, + 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x63, 0x68, 0x73, + 0x22, 0x40, 0x0a, 0x14, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x55, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x45, 0x72, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x5a, 0x0a, 0x17, 0x45, 0x72, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x45, 0x72, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x45, 0x72, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x5d, 0x0a, 0x11, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x54, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x78, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x78, 0x54, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x78, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x22, 0x36, 0x0a, 0x18, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x55, 0x52, 0x4c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x55, 0x52, 0x4c, 0x2a, 0x5c, 0x0a, 0x0d, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, + 0x10, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x2a, 0xe7, 0x02, 0x0a, 0x09, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x10, 0x00, + 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x72, 0x72, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x10, 0x65, 0x12, 0x13, 0x0a, 0x0f, + 0x45, 0x72, 0x72, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, + 0x66, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x72, 0x72, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, + 0x75, 0x6e, 0x64, 0x65, 0x64, 0x10, 0x67, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x72, 0x72, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, + 0x75, 0x74, 0x10, 0x68, 0x12, 0x18, 0x0a, 0x13, 0x45, 0x72, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xc9, 0x01, 0x12, 0x16, + 0x0a, 0x11, 0x45, 0x72, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x10, 0xca, 0x01, 0x12, 0x17, 0x0a, 0x12, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xcb, 0x01, 0x12, + 0x1a, 0x0a, 0x15, 0x45, 0x72, 0x72, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x50, 0x72, 0x65, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xcc, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x45, + 0x72, 0x72, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, + 0xcd, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x45, 0x72, 0x72, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x10, 0xce, 0x01, 0x12, 0x12, 0x0a, 0x0d, + 0x45, 0x72, 0x72, 0x54, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x10, 0xad, 0x02, + 0x12, 0x19, 0x0a, 0x14, 0x45, 0x72, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x52, + 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xae, 0x02, 0x12, 0x17, 0x0a, 0x12, 0x45, + 0x72, 0x72, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x10, 0x91, 0x03, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_errors_proto_rawDescOnce sync.Once + file_errors_proto_rawDescData = file_errors_proto_rawDesc +) + +func file_errors_proto_rawDescGZIP() []byte { + file_errors_proto_rawDescOnce.Do(func() { + file_errors_proto_rawDescData = protoimpl.X.CompressGZIP(file_errors_proto_rawDescData) + }) + return file_errors_proto_rawDescData +} + +var file_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_errors_proto_goTypes = []interface{}{ + (ErrorCategory)(0), // 0: pb.ErrorCategory + (ErrorCode)(0), // 1: pb.ErrorCode + (*MsgError)(nil), // 2: pb.MsgError + (*ErrInfoPeerRequestTimedOut)(nil), // 3: pb.ErrInfoPeerRequestTimedOut + (*ErrInfoPeerRejected)(nil), // 4: pb.ErrInfoPeerRejected + (*ErrInfoPeerNotFunded)(nil), // 5: pb.ErrInfoPeerNotFunded + (*ErrInfoUserResponseTimedOut)(nil), // 6: pb.ErrInfoUserResponseTimedOut + (*ErrInfoResourceNotFound)(nil), // 7: pb.ErrInfoResourceNotFound + (*ErrInfoResourceExists)(nil), // 8: pb.ErrInfoResourceExists + (*ErrInfoInvalidArgument)(nil), // 9: pb.ErrInfoInvalidArgument + (*ErrInfoFailedPreCondUnclosedChs)(nil), // 10: pb.ErrInfoFailedPreCondUnclosedChs + (*ErrInfoInvalidConfig)(nil), // 11: pb.ErrInfoInvalidConfig + (*ContractErrInfo)(nil), // 12: pb.ContractErrInfo + (*ErrInfoInvalidContracts)(nil), // 13: pb.ErrInfoInvalidContracts + (*ErrInfoTxTimedOut)(nil), // 14: pb.ErrInfoTxTimedOut + (*ErrInfoChainNotReachable)(nil), // 15: pb.ErrInfoChainNotReachable + (*PayChInfo)(nil), // 16: pb.PayChInfo +} +var file_errors_proto_depIdxs = []int32{ + 0, // 0: pb.MsgError.category:type_name -> pb.ErrorCategory + 1, // 1: pb.MsgError.code:type_name -> pb.ErrorCode + 3, // 2: pb.MsgError.ErrInfoPeerRequestTimedOut:type_name -> pb.ErrInfoPeerRequestTimedOut + 4, // 3: pb.MsgError.ErrInfoPeerRejected:type_name -> pb.ErrInfoPeerRejected + 5, // 4: pb.MsgError.ErrInfoPeerNotFunded:type_name -> pb.ErrInfoPeerNotFunded + 6, // 5: pb.MsgError.ErrInfoUserResponseTimedOut:type_name -> pb.ErrInfoUserResponseTimedOut + 7, // 6: pb.MsgError.ErrInfoResourceNotFound:type_name -> pb.ErrInfoResourceNotFound + 8, // 7: pb.MsgError.ErrInfoResourceExists:type_name -> pb.ErrInfoResourceExists + 9, // 8: pb.MsgError.ErrInfoInvalidArgument:type_name -> pb.ErrInfoInvalidArgument + 10, // 9: pb.MsgError.ErrInfoFailedPreCondUnclosedChs:type_name -> pb.ErrInfoFailedPreCondUnclosedChs + 11, // 10: pb.MsgError.ErrInfoInvalidConfig:type_name -> pb.ErrInfoInvalidConfig + 13, // 11: pb.MsgError.ErrInfoInvalidContracts:type_name -> pb.ErrInfoInvalidContracts + 14, // 12: pb.MsgError.ErrInfoTxTimedOut:type_name -> pb.ErrInfoTxTimedOut + 15, // 13: pb.MsgError.ErrInfoChainNotReachable:type_name -> pb.ErrInfoChainNotReachable + 16, // 14: pb.ErrInfoFailedPreCondUnclosedChs.chs:type_name -> pb.PayChInfo + 12, // 15: pb.ErrInfoInvalidContracts.ContractErrInfos:type_name -> pb.ContractErrInfo + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_errors_proto_init() } +func file_errors_proto_init() { + if File_errors_proto != nil { + return + } + file_nodetypes_proto_init() + if !protoimpl.UnsafeEnabled { + file_errors_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoPeerRequestTimedOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoPeerRejected); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoPeerNotFunded); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoUserResponseTimedOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoResourceNotFound); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoResourceExists); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoInvalidArgument); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoFailedPreCondUnclosedChs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoInvalidConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContractErrInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoInvalidContracts); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoTxTimedOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_errors_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrInfoChainNotReachable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_errors_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*MsgError_ErrInfoPeerRequestTimedOut)(nil), + (*MsgError_ErrInfoPeerRejected)(nil), + (*MsgError_ErrInfoPeerNotFunded)(nil), + (*MsgError_ErrInfoUserResponseTimedOut)(nil), + (*MsgError_ErrInfoResourceNotFound)(nil), + (*MsgError_ErrInfoResourceExists)(nil), + (*MsgError_ErrInfoInvalidArgument)(nil), + (*MsgError_ErrInfoFailedPreCondUnclosedChs)(nil), + (*MsgError_ErrInfoInvalidConfig)(nil), + (*MsgError_ErrInfoInvalidContracts)(nil), + (*MsgError_ErrInfoTxTimedOut)(nil), + (*MsgError_ErrInfoChainNotReachable)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_errors_proto_rawDesc, + NumEnums: 2, + NumMessages: 14, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_errors_proto_goTypes, + DependencyIndexes: file_errors_proto_depIdxs, + EnumInfos: file_errors_proto_enumTypes, + MessageInfos: file_errors_proto_msgTypes, + }.Build() + File_errors_proto = out.File + file_errors_proto_rawDesc = nil + file_errors_proto_goTypes = nil + file_errors_proto_depIdxs = nil +} diff --git a/api/grpc/grpc_test.go b/api/grpc/pb/errors_test.go similarity index 88% rename from api/grpc/grpc_test.go rename to api/grpc/pb/errors_test.go index 8867e40c..dd87cef0 100644 --- a/api/grpc/grpc_test.go +++ b/api/grpc/pb/errors_test.go @@ -14,7 +14,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package grpc_test +package pb_test import ( "testing" @@ -25,12 +25,6 @@ import ( "github.com/hyperledger-labs/perun-node/api/grpc/pb" ) -func Test_ChUpdateType(t *testing.T) { - assert.EqualValues(t, perun.ChUpdateTypeOpen, pb.SubPayChUpdatesResp_Notify_open) - assert.EqualValues(t, perun.ChUpdateTypeFinal, pb.SubPayChUpdatesResp_Notify_final) - assert.EqualValues(t, perun.ChUpdateTypeClosed, pb.SubPayChUpdatesResp_Notify_closed) -} - func Test_ErrorCategory(t *testing.T) { assert.Equal(t, pb.ErrorCategory_ParticipantError, pb.ErrorCategory(perun.ParticipantError)) assert.Equal(t, pb.ErrorCategory_ClientError, pb.ErrorCategory(perun.ClientError)) diff --git a/api/grpc/pb/funding_service.go b/api/grpc/pb/funding_service.go new file mode 100644 index 00000000..383bd258 --- /dev/null +++ b/api/grpc/pb/funding_service.go @@ -0,0 +1,57 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pb + +import ( + "github.com/pkg/errors" + pchannel "perun.network/go-perun/channel" +) + +// ToFundingReq converts protobuf's FundingReq definition to perun's FundingReq +// definition. +func ToFundingReq(protoReq *FundReq) (req pchannel.FundingReq, err error) { + if req.Params, err = ToParams(protoReq.Params); err != nil { + return req, err + } + if req.State, err = ToState(protoReq.State); err != nil { + return req, err + } + + req.Idx = pchannel.Index(protoReq.Idx) + req.Agreement = ToBalances(protoReq.Agreement.Balances) + return req, nil +} + +// FromFundingReq converts perun's FundingReq definition to protobuf's +// FundingReq definition. +func FromFundingReq(req pchannel.FundingReq) (protoReq *FundReq, err error) { + protoReq = &FundReq{} + + if protoReq.Params, err = FromParams(req.Params); err != nil { + return protoReq, err + } + if protoReq.State, err = FromState(req.State); err != nil { + return protoReq, err + } + + protoReq.Idx = uint32(req.Idx) + protoReq.Agreement, err = FromBalances(req.Agreement) + if err != nil { + return nil, errors.WithMessage(err, "agreement") + } + return protoReq, nil +} diff --git a/api/grpc/pb/funding_service.pb.go b/api/grpc/pb/funding_service.pb.go new file mode 100644 index 00000000..a2bc17da --- /dev/null +++ b/api/grpc/pb/funding_service.pb.go @@ -0,0 +1,1547 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v4.23.3 +// source: funding_service.proto + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RegisterAssetERC20Req struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + Asset []byte `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + TokenAddr string `protobuf:"bytes,3,opt,name=tokenAddr,proto3" json:"tokenAddr,omitempty"` + DeposiorAcc string `protobuf:"bytes,4,opt,name=deposiorAcc,proto3" json:"deposiorAcc,omitempty"` +} + +func (x *RegisterAssetERC20Req) Reset() { + *x = RegisterAssetERC20Req{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterAssetERC20Req) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterAssetERC20Req) ProtoMessage() {} + +func (x *RegisterAssetERC20Req) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterAssetERC20Req.ProtoReflect.Descriptor instead. +func (*RegisterAssetERC20Req) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{0} +} + +func (x *RegisterAssetERC20Req) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *RegisterAssetERC20Req) GetAsset() []byte { + if x != nil { + return x.Asset + } + return nil +} + +func (x *RegisterAssetERC20Req) GetTokenAddr() string { + if x != nil { + return x.TokenAddr + } + return "" +} + +func (x *RegisterAssetERC20Req) GetDeposiorAcc() string { + if x != nil { + return x.DeposiorAcc + } + return "" +} + +type RegisterAssetERC20Resp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MsgSuccess bool `protobuf:"varint,1,opt,name=msgSuccess,proto3" json:"msgSuccess,omitempty"` +} + +func (x *RegisterAssetERC20Resp) Reset() { + *x = RegisterAssetERC20Resp{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterAssetERC20Resp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterAssetERC20Resp) ProtoMessage() {} + +func (x *RegisterAssetERC20Resp) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterAssetERC20Resp.ProtoReflect.Descriptor instead. +func (*RegisterAssetERC20Resp) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{1} +} + +func (x *RegisterAssetERC20Resp) GetMsgSuccess() bool { + if x != nil { + return x.MsgSuccess + } + return false +} + +type IsAssetRegisteredReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + Asset []byte `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` +} + +func (x *IsAssetRegisteredReq) Reset() { + *x = IsAssetRegisteredReq{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsAssetRegisteredReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsAssetRegisteredReq) ProtoMessage() {} + +func (x *IsAssetRegisteredReq) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsAssetRegisteredReq.ProtoReflect.Descriptor instead. +func (*IsAssetRegisteredReq) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{2} +} + +func (x *IsAssetRegisteredReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *IsAssetRegisteredReq) GetAsset() []byte { + if x != nil { + return x.Asset + } + return nil +} + +type IsAssetRegisteredResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *IsAssetRegisteredResp_MsgSuccess_ + // *IsAssetRegisteredResp_Error + Response isIsAssetRegisteredResp_Response `protobuf_oneof:"response"` +} + +func (x *IsAssetRegisteredResp) Reset() { + *x = IsAssetRegisteredResp{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsAssetRegisteredResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsAssetRegisteredResp) ProtoMessage() {} + +func (x *IsAssetRegisteredResp) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsAssetRegisteredResp.ProtoReflect.Descriptor instead. +func (*IsAssetRegisteredResp) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{3} +} + +func (m *IsAssetRegisteredResp) GetResponse() isIsAssetRegisteredResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *IsAssetRegisteredResp) GetMsgSuccess() *IsAssetRegisteredResp_MsgSuccess { + if x, ok := x.GetResponse().(*IsAssetRegisteredResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *IsAssetRegisteredResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*IsAssetRegisteredResp_Error); ok { + return x.Error + } + return nil +} + +type isIsAssetRegisteredResp_Response interface { + isIsAssetRegisteredResp_Response() +} + +type IsAssetRegisteredResp_MsgSuccess_ struct { + MsgSuccess *IsAssetRegisteredResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type IsAssetRegisteredResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*IsAssetRegisteredResp_MsgSuccess_) isIsAssetRegisteredResp_Response() {} + +func (*IsAssetRegisteredResp_Error) isIsAssetRegisteredResp_Response() {} + +type FundReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` + State *State `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` + Idx uint32 `protobuf:"varint,4,opt,name=idx,proto3" json:"idx,omitempty"` + Agreement *Balances `protobuf:"bytes,5,opt,name=agreement,proto3" json:"agreement,omitempty"` +} + +func (x *FundReq) Reset() { + *x = FundReq{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FundReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FundReq) ProtoMessage() {} + +func (x *FundReq) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FundReq.ProtoReflect.Descriptor instead. +func (*FundReq) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{4} +} + +func (x *FundReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *FundReq) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +func (x *FundReq) GetState() *State { + if x != nil { + return x.State + } + return nil +} + +func (x *FundReq) GetIdx() uint32 { + if x != nil { + return x.Idx + } + return 0 +} + +func (x *FundReq) GetAgreement() *Balances { + if x != nil { + return x.Agreement + } + return nil +} + +type FundResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error *MsgError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *FundResp) Reset() { + *x = FundResp{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FundResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FundResp) ProtoMessage() {} + +func (x *FundResp) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FundResp.ProtoReflect.Descriptor instead. +func (*FundResp) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{5} +} + +func (x *FundResp) GetError() *MsgError { + if x != nil { + return x.Error + } + return nil +} + +type RegisterReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + AdjReq *AdjudicatorReq `protobuf:"bytes,2,opt,name=adjReq,proto3" json:"adjReq,omitempty"` + SignedStates []*SignedState `protobuf:"bytes,3,rep,name=signedStates,proto3" json:"signedStates,omitempty"` +} + +func (x *RegisterReq) Reset() { + *x = RegisterReq{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterReq) ProtoMessage() {} + +func (x *RegisterReq) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead. +func (*RegisterReq) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{6} +} + +func (x *RegisterReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *RegisterReq) GetAdjReq() *AdjudicatorReq { + if x != nil { + return x.AdjReq + } + return nil +} + +func (x *RegisterReq) GetSignedStates() []*SignedState { + if x != nil { + return x.SignedStates + } + return nil +} + +type RegisterResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error *MsgError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *RegisterResp) Reset() { + *x = RegisterResp{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterResp) ProtoMessage() {} + +func (x *RegisterResp) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead. +func (*RegisterResp) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{7} +} + +func (x *RegisterResp) GetError() *MsgError { + if x != nil { + return x.Error + } + return nil +} + +type WithdrawReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + AdjReq *AdjudicatorReq `protobuf:"bytes,2,opt,name=adjReq,proto3" json:"adjReq,omitempty"` + StateMap []*StateMap `protobuf:"bytes,3,rep,name=stateMap,proto3" json:"stateMap,omitempty"` +} + +func (x *WithdrawReq) Reset() { + *x = WithdrawReq{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WithdrawReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawReq) ProtoMessage() {} + +func (x *WithdrawReq) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WithdrawReq.ProtoReflect.Descriptor instead. +func (*WithdrawReq) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{8} +} + +func (x *WithdrawReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *WithdrawReq) GetAdjReq() *AdjudicatorReq { + if x != nil { + return x.AdjReq + } + return nil +} + +func (x *WithdrawReq) GetStateMap() []*StateMap { + if x != nil { + return x.StateMap + } + return nil +} + +type WithdrawResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error *MsgError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *WithdrawResp) Reset() { + *x = WithdrawResp{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WithdrawResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawResp) ProtoMessage() {} + +func (x *WithdrawResp) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WithdrawResp.ProtoReflect.Descriptor instead. +func (*WithdrawResp) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{9} +} + +func (x *WithdrawResp) GetError() *MsgError { + if x != nil { + return x.Error + } + return nil +} + +type ProgressReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + AdjReq *AdjudicatorReq `protobuf:"bytes,2,opt,name=adjReq,proto3" json:"adjReq,omitempty"` + NewState *State `protobuf:"bytes,3,opt,name=newState,proto3" json:"newState,omitempty"` + Sig []byte `protobuf:"bytes,4,opt,name=sig,proto3" json:"sig,omitempty"` +} + +func (x *ProgressReq) Reset() { + *x = ProgressReq{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProgressReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProgressReq) ProtoMessage() {} + +func (x *ProgressReq) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProgressReq.ProtoReflect.Descriptor instead. +func (*ProgressReq) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{10} +} + +func (x *ProgressReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *ProgressReq) GetAdjReq() *AdjudicatorReq { + if x != nil { + return x.AdjReq + } + return nil +} + +func (x *ProgressReq) GetNewState() *State { + if x != nil { + return x.NewState + } + return nil +} + +func (x *ProgressReq) GetSig() []byte { + if x != nil { + return x.Sig + } + return nil +} + +type ProgressResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error *MsgError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *ProgressResp) Reset() { + *x = ProgressResp{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProgressResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProgressResp) ProtoMessage() {} + +func (x *ProgressResp) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProgressResp.ProtoReflect.Descriptor instead. +func (*ProgressResp) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{11} +} + +func (x *ProgressResp) GetError() *MsgError { + if x != nil { + return x.Error + } + return nil +} + +type SubscribeReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + ChID []byte `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` +} + +func (x *SubscribeReq) Reset() { + *x = SubscribeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubscribeReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscribeReq) ProtoMessage() {} + +func (x *SubscribeReq) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubscribeReq.ProtoReflect.Descriptor instead. +func (*SubscribeReq) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{12} +} + +func (x *SubscribeReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *SubscribeReq) GetChID() []byte { + if x != nil { + return x.ChID + } + return nil +} + +type SubscribeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *SubscribeResp_RegisteredEvent + // *SubscribeResp_ProgressedEvent + // *SubscribeResp_ConcludedEvent + // *SubscribeResp_Error + Response isSubscribeResp_Response `protobuf_oneof:"response"` +} + +func (x *SubscribeResp) Reset() { + *x = SubscribeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubscribeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscribeResp) ProtoMessage() {} + +func (x *SubscribeResp) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubscribeResp.ProtoReflect.Descriptor instead. +func (*SubscribeResp) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{13} +} + +func (m *SubscribeResp) GetResponse() isSubscribeResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *SubscribeResp) GetRegisteredEvent() *RegisteredEvent { + if x, ok := x.GetResponse().(*SubscribeResp_RegisteredEvent); ok { + return x.RegisteredEvent + } + return nil +} + +func (x *SubscribeResp) GetProgressedEvent() *ProgressedEvent { + if x, ok := x.GetResponse().(*SubscribeResp_ProgressedEvent); ok { + return x.ProgressedEvent + } + return nil +} + +func (x *SubscribeResp) GetConcludedEvent() *ConcludedEvent { + if x, ok := x.GetResponse().(*SubscribeResp_ConcludedEvent); ok { + return x.ConcludedEvent + } + return nil +} + +func (x *SubscribeResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*SubscribeResp_Error); ok { + return x.Error + } + return nil +} + +type isSubscribeResp_Response interface { + isSubscribeResp_Response() +} + +type SubscribeResp_RegisteredEvent struct { + RegisteredEvent *RegisteredEvent `protobuf:"bytes,1,opt,name=registeredEvent,proto3,oneof"` +} + +type SubscribeResp_ProgressedEvent struct { + ProgressedEvent *ProgressedEvent `protobuf:"bytes,2,opt,name=progressedEvent,proto3,oneof"` +} + +type SubscribeResp_ConcludedEvent struct { + ConcludedEvent *ConcludedEvent `protobuf:"bytes,3,opt,name=concludedEvent,proto3,oneof"` +} + +type SubscribeResp_Error struct { + Error *MsgError `protobuf:"bytes,4,opt,name=error,proto3,oneof"` +} + +func (*SubscribeResp_RegisteredEvent) isSubscribeResp_Response() {} + +func (*SubscribeResp_ProgressedEvent) isSubscribeResp_Response() {} + +func (*SubscribeResp_ConcludedEvent) isSubscribeResp_Response() {} + +func (*SubscribeResp_Error) isSubscribeResp_Response() {} + +type UnsubscribeReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + ChID []byte `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` +} + +func (x *UnsubscribeReq) Reset() { + *x = UnsubscribeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsubscribeReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsubscribeReq) ProtoMessage() {} + +func (x *UnsubscribeReq) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsubscribeReq.ProtoReflect.Descriptor instead. +func (*UnsubscribeReq) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{14} +} + +func (x *UnsubscribeReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *UnsubscribeReq) GetChID() []byte { + if x != nil { + return x.ChID + } + return nil +} + +type UnsubscribeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error *MsgError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *UnsubscribeResp) Reset() { + *x = UnsubscribeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsubscribeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsubscribeResp) ProtoMessage() {} + +func (x *UnsubscribeResp) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsubscribeResp.ProtoReflect.Descriptor instead. +func (*UnsubscribeResp) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{15} +} + +func (x *UnsubscribeResp) GetError() *MsgError { + if x != nil { + return x.Error + } + return nil +} + +type IsAssetRegisteredResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsRegistered bool `protobuf:"varint,1,opt,name=isRegistered,proto3" json:"isRegistered,omitempty"` +} + +func (x *IsAssetRegisteredResp_MsgSuccess) Reset() { + *x = IsAssetRegisteredResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_funding_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsAssetRegisteredResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsAssetRegisteredResp_MsgSuccess) ProtoMessage() {} + +func (x *IsAssetRegisteredResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_funding_service_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsAssetRegisteredResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*IsAssetRegisteredResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_funding_service_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *IsAssetRegisteredResp_MsgSuccess) GetIsRegistered() bool { + if x != nil { + return x.IsRegistered + } + return false +} + +var File_funding_service_proto protoreflect.FileDescriptor + +var file_funding_service_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0c, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x73, 0x64, 0x6b, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x15, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, + 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x41, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x41, 0x64, 0x64, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x6f, + 0x72, 0x41, 0x63, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x22, 0x38, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x22, 0x4a, 0x0a, 0x14, 0x49, 0x73, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x22, 0xc3, 0x01, + 0x0a, 0x15, 0x49, 0x73, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x62, + 0x2e, 0x49, 0x73, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x30, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x07, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x22, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, + 0x70, 0x62, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x03, 0x69, 0x64, 0x78, 0x12, 0x2a, 0x0a, 0x09, 0x61, 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x09, 0x61, 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x22, 0x2e, 0x0a, 0x08, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, + 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x22, 0x8c, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x2a, + 0x0a, 0x06, 0x61, 0x64, 0x6a, 0x52, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x71, 0x52, 0x06, 0x61, 0x64, 0x6a, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x0c, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x22, + 0x32, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x22, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x22, 0x81, 0x01, 0x0a, 0x0b, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x12, 0x2a, 0x0a, 0x06, 0x61, 0x64, 0x6a, 0x52, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x71, 0x52, 0x06, 0x61, 0x64, 0x6a, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, + 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x52, 0x08, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x22, 0x32, 0x0a, 0x0c, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x90, 0x01, 0x0a, 0x0b, + 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x06, 0x61, 0x64, 0x6a, + 0x52, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x41, + 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x52, 0x06, 0x61, + 0x64, 0x6a, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x73, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x69, 0x67, 0x22, 0x32, + 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x22, 0x40, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, + 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x63, 0x68, 0x49, 0x44, 0x22, 0x81, 0x02, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x0e, 0x55, 0x6e, 0x73, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, 0x44, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x22, 0x35, 0x0a, 0x0f, + 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x22, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x32, 0xd0, 0x03, 0x0a, 0x0b, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x41, 0x50, 0x49, 0x12, 0x4d, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, + 0x30, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x11, 0x49, 0x73, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x73, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, + 0x71, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x73, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x23, + 0x0a, 0x04, 0x46, 0x75, 0x6e, 0x64, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6e, 0x64, + 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x08, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x12, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, + 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x30, 0x01, 0x12, 0x38, 0x0a, 0x0b, + 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x62, + 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x1a, + 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_funding_service_proto_rawDescOnce sync.Once + file_funding_service_proto_rawDescData = file_funding_service_proto_rawDesc +) + +func file_funding_service_proto_rawDescGZIP() []byte { + file_funding_service_proto_rawDescOnce.Do(func() { + file_funding_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_funding_service_proto_rawDescData) + }) + return file_funding_service_proto_rawDescData +} + +var file_funding_service_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_funding_service_proto_goTypes = []interface{}{ + (*RegisterAssetERC20Req)(nil), // 0: pb.RegisterAssetERC20Req + (*RegisterAssetERC20Resp)(nil), // 1: pb.RegisterAssetERC20Resp + (*IsAssetRegisteredReq)(nil), // 2: pb.IsAssetRegisteredReq + (*IsAssetRegisteredResp)(nil), // 3: pb.IsAssetRegisteredResp + (*FundReq)(nil), // 4: pb.FundReq + (*FundResp)(nil), // 5: pb.FundResp + (*RegisterReq)(nil), // 6: pb.RegisterReq + (*RegisterResp)(nil), // 7: pb.RegisterResp + (*WithdrawReq)(nil), // 8: pb.WithdrawReq + (*WithdrawResp)(nil), // 9: pb.WithdrawResp + (*ProgressReq)(nil), // 10: pb.ProgressReq + (*ProgressResp)(nil), // 11: pb.ProgressResp + (*SubscribeReq)(nil), // 12: pb.SubscribeReq + (*SubscribeResp)(nil), // 13: pb.SubscribeResp + (*UnsubscribeReq)(nil), // 14: pb.UnsubscribeReq + (*UnsubscribeResp)(nil), // 15: pb.UnsubscribeResp + (*IsAssetRegisteredResp_MsgSuccess)(nil), // 16: pb.IsAssetRegisteredResp.MsgSuccess + (*MsgError)(nil), // 17: pb.MsgError + (*Params)(nil), // 18: pb.Params + (*State)(nil), // 19: pb.State + (*Balances)(nil), // 20: pb.Balances + (*AdjudicatorReq)(nil), // 21: pb.AdjudicatorReq + (*SignedState)(nil), // 22: pb.SignedState + (*StateMap)(nil), // 23: pb.StateMap + (*RegisteredEvent)(nil), // 24: pb.RegisteredEvent + (*ProgressedEvent)(nil), // 25: pb.ProgressedEvent + (*ConcludedEvent)(nil), // 26: pb.ConcludedEvent +} +var file_funding_service_proto_depIdxs = []int32{ + 16, // 0: pb.IsAssetRegisteredResp.msgSuccess:type_name -> pb.IsAssetRegisteredResp.MsgSuccess + 17, // 1: pb.IsAssetRegisteredResp.error:type_name -> pb.MsgError + 18, // 2: pb.FundReq.params:type_name -> pb.Params + 19, // 3: pb.FundReq.state:type_name -> pb.State + 20, // 4: pb.FundReq.agreement:type_name -> pb.Balances + 17, // 5: pb.FundResp.error:type_name -> pb.MsgError + 21, // 6: pb.RegisterReq.adjReq:type_name -> pb.AdjudicatorReq + 22, // 7: pb.RegisterReq.signedStates:type_name -> pb.SignedState + 17, // 8: pb.RegisterResp.error:type_name -> pb.MsgError + 21, // 9: pb.WithdrawReq.adjReq:type_name -> pb.AdjudicatorReq + 23, // 10: pb.WithdrawReq.stateMap:type_name -> pb.StateMap + 17, // 11: pb.WithdrawResp.error:type_name -> pb.MsgError + 21, // 12: pb.ProgressReq.adjReq:type_name -> pb.AdjudicatorReq + 19, // 13: pb.ProgressReq.newState:type_name -> pb.State + 17, // 14: pb.ProgressResp.error:type_name -> pb.MsgError + 24, // 15: pb.SubscribeResp.registeredEvent:type_name -> pb.RegisteredEvent + 25, // 16: pb.SubscribeResp.progressedEvent:type_name -> pb.ProgressedEvent + 26, // 17: pb.SubscribeResp.concludedEvent:type_name -> pb.ConcludedEvent + 17, // 18: pb.SubscribeResp.error:type_name -> pb.MsgError + 17, // 19: pb.UnsubscribeResp.error:type_name -> pb.MsgError + 0, // 20: pb.Funding_API.RegisterAssetERC20:input_type -> pb.RegisterAssetERC20Req + 2, // 21: pb.Funding_API.IsAssetRegistered:input_type -> pb.IsAssetRegisteredReq + 4, // 22: pb.Funding_API.Fund:input_type -> pb.FundReq + 6, // 23: pb.Funding_API.Register:input_type -> pb.RegisterReq + 8, // 24: pb.Funding_API.Withdraw:input_type -> pb.WithdrawReq + 10, // 25: pb.Funding_API.Progress:input_type -> pb.ProgressReq + 12, // 26: pb.Funding_API.Subscribe:input_type -> pb.SubscribeReq + 14, // 27: pb.Funding_API.Unsubscribe:input_type -> pb.UnsubscribeReq + 1, // 28: pb.Funding_API.RegisterAssetERC20:output_type -> pb.RegisterAssetERC20Resp + 3, // 29: pb.Funding_API.IsAssetRegistered:output_type -> pb.IsAssetRegisteredResp + 5, // 30: pb.Funding_API.Fund:output_type -> pb.FundResp + 7, // 31: pb.Funding_API.Register:output_type -> pb.RegisterResp + 9, // 32: pb.Funding_API.Withdraw:output_type -> pb.WithdrawResp + 11, // 33: pb.Funding_API.Progress:output_type -> pb.ProgressResp + 13, // 34: pb.Funding_API.Subscribe:output_type -> pb.SubscribeResp + 15, // 35: pb.Funding_API.Unsubscribe:output_type -> pb.UnsubscribeResp + 28, // [28:36] is the sub-list for method output_type + 20, // [20:28] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name +} + +func init() { file_funding_service_proto_init() } +func file_funding_service_proto_init() { + if File_funding_service_proto != nil { + return + } + file_errors_proto_init() + file_sdktypes_proto_init() + if !protoimpl.UnsafeEnabled { + file_funding_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterAssetERC20Req); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterAssetERC20Resp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsAssetRegisteredReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsAssetRegisteredResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FundReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FundResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WithdrawReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WithdrawResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProgressReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProgressResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscribeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscribeResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsubscribeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsubscribeResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_funding_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsAssetRegisteredResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_funding_service_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*IsAssetRegisteredResp_MsgSuccess_)(nil), + (*IsAssetRegisteredResp_Error)(nil), + } + file_funding_service_proto_msgTypes[13].OneofWrappers = []interface{}{ + (*SubscribeResp_RegisteredEvent)(nil), + (*SubscribeResp_ProgressedEvent)(nil), + (*SubscribeResp_ConcludedEvent)(nil), + (*SubscribeResp_Error)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_funding_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_funding_service_proto_goTypes, + DependencyIndexes: file_funding_service_proto_depIdxs, + MessageInfos: file_funding_service_proto_msgTypes, + }.Build() + File_funding_service_proto = out.File + file_funding_service_proto_rawDesc = nil + file_funding_service_proto_goTypes = nil + file_funding_service_proto_depIdxs = nil +} diff --git a/api/grpc/pb/funding_service_grpc.pb.go b/api/grpc/pb/funding_service_grpc.pb.go new file mode 100644 index 00000000..e9d01be0 --- /dev/null +++ b/api/grpc/pb/funding_service_grpc.pb.go @@ -0,0 +1,415 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.23.3 +// source: funding_service.proto + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. + +package pb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Funding_API_RegisterAssetERC20_FullMethodName = "/pb.Funding_API/RegisterAssetERC20" + Funding_API_IsAssetRegistered_FullMethodName = "/pb.Funding_API/IsAssetRegistered" + Funding_API_Fund_FullMethodName = "/pb.Funding_API/Fund" + Funding_API_Register_FullMethodName = "/pb.Funding_API/Register" + Funding_API_Withdraw_FullMethodName = "/pb.Funding_API/Withdraw" + Funding_API_Progress_FullMethodName = "/pb.Funding_API/Progress" + Funding_API_Subscribe_FullMethodName = "/pb.Funding_API/Subscribe" + Funding_API_Unsubscribe_FullMethodName = "/pb.Funding_API/Unsubscribe" +) + +// Funding_APIClient is the client API for Funding_API service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type Funding_APIClient interface { + RegisterAssetERC20(ctx context.Context, in *RegisterAssetERC20Req, opts ...grpc.CallOption) (*RegisterAssetERC20Resp, error) + IsAssetRegistered(ctx context.Context, in *IsAssetRegisteredReq, opts ...grpc.CallOption) (*IsAssetRegisteredResp, error) + Fund(ctx context.Context, in *FundReq, opts ...grpc.CallOption) (*FundResp, error) + Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterResp, error) + Withdraw(ctx context.Context, in *WithdrawReq, opts ...grpc.CallOption) (*WithdrawResp, error) + Progress(ctx context.Context, in *ProgressReq, opts ...grpc.CallOption) (*ProgressResp, error) + Subscribe(ctx context.Context, in *SubscribeReq, opts ...grpc.CallOption) (Funding_API_SubscribeClient, error) + Unsubscribe(ctx context.Context, in *UnsubscribeReq, opts ...grpc.CallOption) (*UnsubscribeResp, error) +} + +type funding_APIClient struct { + cc grpc.ClientConnInterface +} + +func NewFunding_APIClient(cc grpc.ClientConnInterface) Funding_APIClient { + return &funding_APIClient{cc} +} + +func (c *funding_APIClient) RegisterAssetERC20(ctx context.Context, in *RegisterAssetERC20Req, opts ...grpc.CallOption) (*RegisterAssetERC20Resp, error) { + out := new(RegisterAssetERC20Resp) + err := c.cc.Invoke(ctx, Funding_API_RegisterAssetERC20_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *funding_APIClient) IsAssetRegistered(ctx context.Context, in *IsAssetRegisteredReq, opts ...grpc.CallOption) (*IsAssetRegisteredResp, error) { + out := new(IsAssetRegisteredResp) + err := c.cc.Invoke(ctx, Funding_API_IsAssetRegistered_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *funding_APIClient) Fund(ctx context.Context, in *FundReq, opts ...grpc.CallOption) (*FundResp, error) { + out := new(FundResp) + err := c.cc.Invoke(ctx, Funding_API_Fund_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *funding_APIClient) Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterResp, error) { + out := new(RegisterResp) + err := c.cc.Invoke(ctx, Funding_API_Register_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *funding_APIClient) Withdraw(ctx context.Context, in *WithdrawReq, opts ...grpc.CallOption) (*WithdrawResp, error) { + out := new(WithdrawResp) + err := c.cc.Invoke(ctx, Funding_API_Withdraw_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *funding_APIClient) Progress(ctx context.Context, in *ProgressReq, opts ...grpc.CallOption) (*ProgressResp, error) { + out := new(ProgressResp) + err := c.cc.Invoke(ctx, Funding_API_Progress_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *funding_APIClient) Subscribe(ctx context.Context, in *SubscribeReq, opts ...grpc.CallOption) (Funding_API_SubscribeClient, error) { + stream, err := c.cc.NewStream(ctx, &Funding_API_ServiceDesc.Streams[0], Funding_API_Subscribe_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &funding_APISubscribeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Funding_API_SubscribeClient interface { + Recv() (*SubscribeResp, error) + grpc.ClientStream +} + +type funding_APISubscribeClient struct { + grpc.ClientStream +} + +func (x *funding_APISubscribeClient) Recv() (*SubscribeResp, error) { + m := new(SubscribeResp) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *funding_APIClient) Unsubscribe(ctx context.Context, in *UnsubscribeReq, opts ...grpc.CallOption) (*UnsubscribeResp, error) { + out := new(UnsubscribeResp) + err := c.cc.Invoke(ctx, Funding_API_Unsubscribe_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Funding_APIServer is the server API for Funding_API service. +// All implementations must embed UnimplementedFunding_APIServer +// for forward compatibility +type Funding_APIServer interface { + RegisterAssetERC20(context.Context, *RegisterAssetERC20Req) (*RegisterAssetERC20Resp, error) + IsAssetRegistered(context.Context, *IsAssetRegisteredReq) (*IsAssetRegisteredResp, error) + Fund(context.Context, *FundReq) (*FundResp, error) + Register(context.Context, *RegisterReq) (*RegisterResp, error) + Withdraw(context.Context, *WithdrawReq) (*WithdrawResp, error) + Progress(context.Context, *ProgressReq) (*ProgressResp, error) + Subscribe(*SubscribeReq, Funding_API_SubscribeServer) error + Unsubscribe(context.Context, *UnsubscribeReq) (*UnsubscribeResp, error) + mustEmbedUnimplementedFunding_APIServer() +} + +// UnimplementedFunding_APIServer must be embedded to have forward compatible implementations. +type UnimplementedFunding_APIServer struct { +} + +func (UnimplementedFunding_APIServer) RegisterAssetERC20(context.Context, *RegisterAssetERC20Req) (*RegisterAssetERC20Resp, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterAssetERC20 not implemented") +} +func (UnimplementedFunding_APIServer) IsAssetRegistered(context.Context, *IsAssetRegisteredReq) (*IsAssetRegisteredResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsAssetRegistered not implemented") +} +func (UnimplementedFunding_APIServer) Fund(context.Context, *FundReq) (*FundResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Fund not implemented") +} +func (UnimplementedFunding_APIServer) Register(context.Context, *RegisterReq) (*RegisterResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") +} +func (UnimplementedFunding_APIServer) Withdraw(context.Context, *WithdrawReq) (*WithdrawResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Withdraw not implemented") +} +func (UnimplementedFunding_APIServer) Progress(context.Context, *ProgressReq) (*ProgressResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Progress not implemented") +} +func (UnimplementedFunding_APIServer) Subscribe(*SubscribeReq, Funding_API_SubscribeServer) error { + return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") +} +func (UnimplementedFunding_APIServer) Unsubscribe(context.Context, *UnsubscribeReq) (*UnsubscribeResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Unsubscribe not implemented") +} +func (UnimplementedFunding_APIServer) mustEmbedUnimplementedFunding_APIServer() {} + +// UnsafeFunding_APIServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to Funding_APIServer will +// result in compilation errors. +type UnsafeFunding_APIServer interface { + mustEmbedUnimplementedFunding_APIServer() +} + +func RegisterFunding_APIServer(s grpc.ServiceRegistrar, srv Funding_APIServer) { + s.RegisterService(&Funding_API_ServiceDesc, srv) +} + +func _Funding_API_RegisterAssetERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterAssetERC20Req) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Funding_APIServer).RegisterAssetERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Funding_API_RegisterAssetERC20_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Funding_APIServer).RegisterAssetERC20(ctx, req.(*RegisterAssetERC20Req)) + } + return interceptor(ctx, in, info, handler) +} + +func _Funding_API_IsAssetRegistered_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsAssetRegisteredReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Funding_APIServer).IsAssetRegistered(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Funding_API_IsAssetRegistered_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Funding_APIServer).IsAssetRegistered(ctx, req.(*IsAssetRegisteredReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Funding_API_Fund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FundReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Funding_APIServer).Fund(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Funding_API_Fund_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Funding_APIServer).Fund(ctx, req.(*FundReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Funding_API_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Funding_APIServer).Register(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Funding_API_Register_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Funding_APIServer).Register(ctx, req.(*RegisterReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Funding_API_Withdraw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WithdrawReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Funding_APIServer).Withdraw(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Funding_API_Withdraw_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Funding_APIServer).Withdraw(ctx, req.(*WithdrawReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Funding_API_Progress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProgressReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Funding_APIServer).Progress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Funding_API_Progress_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Funding_APIServer).Progress(ctx, req.(*ProgressReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Funding_API_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeReq) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(Funding_APIServer).Subscribe(m, &funding_APISubscribeServer{stream}) +} + +type Funding_API_SubscribeServer interface { + Send(*SubscribeResp) error + grpc.ServerStream +} + +type funding_APISubscribeServer struct { + grpc.ServerStream +} + +func (x *funding_APISubscribeServer) Send(m *SubscribeResp) error { + return x.ServerStream.SendMsg(m) +} + +func _Funding_API_Unsubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnsubscribeReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Funding_APIServer).Unsubscribe(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Funding_API_Unsubscribe_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Funding_APIServer).Unsubscribe(ctx, req.(*UnsubscribeReq)) + } + return interceptor(ctx, in, info, handler) +} + +// Funding_API_ServiceDesc is the grpc.ServiceDesc for Funding_API service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Funding_API_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pb.Funding_API", + HandlerType: (*Funding_APIServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterAssetERC20", + Handler: _Funding_API_RegisterAssetERC20_Handler, + }, + { + MethodName: "IsAssetRegistered", + Handler: _Funding_API_IsAssetRegistered_Handler, + }, + { + MethodName: "Fund", + Handler: _Funding_API_Fund_Handler, + }, + { + MethodName: "Register", + Handler: _Funding_API_Register_Handler, + }, + { + MethodName: "Withdraw", + Handler: _Funding_API_Withdraw_Handler, + }, + { + MethodName: "Progress", + Handler: _Funding_API_Progress_Handler, + }, + { + MethodName: "Unsubscribe", + Handler: _Funding_API_Unsubscribe_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Subscribe", + Handler: _Funding_API_Subscribe_Handler, + ServerStreams: true, + }, + }, + Metadata: "funding_service.proto", +} diff --git a/api/grpc/pb/nodetypes.go b/api/grpc/pb/nodetypes.go new file mode 100644 index 00000000..9f349951 --- /dev/null +++ b/api/grpc/pb/nodetypes.go @@ -0,0 +1,133 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pb + +import ( + "github.com/hyperledger-labs/perun-node" + "github.com/hyperledger-labs/perun-node/app/payment" +) + +// FromPayments is a helper function to convert slice of Payment struct +// defined in perun-node package to slice of Payment struct defined in grpc +// package. +func FromPayments(payments []payment.Payment) []*Payment { + grpcPayments := make([]*Payment, len(payments)) + for i := range payments { + grpcPayments[i] = FromPayment(payments[i]) + } + return grpcPayments +} + +// FromPayment is a helper function to convert Payment struct defined in +// perun-node package to Payment struct defined in gprc package. +func FromPayment(src payment.Payment) *Payment { + return &Payment{ + Currency: src.Currency, + Payee: src.Payee, + Amount: src.Amount, + } +} + +// ToPayments is a helper function to convert slice of Payment struct defined in +// grpc package to slice of Payment struct defined in perun-node. +func ToPayments(payments []*Payment) []payment.Payment { + grpcPayments := make([]payment.Payment, len(payments)) + for i := range payments { + grpcPayments[i] = ToPayment(payments[i]) + } + return grpcPayments +} + +// ToPayment is a helper function to convert Payment struct defined in +// grpc package to Payment struct defined in perun-node. +func ToPayment(src *Payment) payment.Payment { + return payment.Payment{ + Currency: src.Currency, + Payee: src.Payee, + Amount: src.Amount, + } +} + +// FromPayChsInfo is a helper function to convert slice of PayChInfo struct +// defined in perun-node to a slice of PayChInfo struct defined in grpc +// package. +func FromPayChsInfo(payChsInfo []payment.PayChInfo) []*PayChInfo { + grpcPayChsInfo := make([]*PayChInfo, len(payChsInfo)) + for i := range payChsInfo { + grpcPayChsInfo[i] = FromPayChInfo(payChsInfo[i]) + } + return grpcPayChsInfo +} + +// FromPayChInfo is a helper function to convert PayChInfo struct defined in perun-node +// to PayChInfo struct defined in grpc package. +func FromPayChInfo(src payment.PayChInfo) *PayChInfo { + return &PayChInfo{ + ChID: src.ChID, + BalInfo: FromBalInfo(src.BalInfo), + Version: src.Version, + } +} + +// ToBalInfo is a helper function to convert BalInfo struct defined in grpc package +// to BalInfo struct defined in perun-node. +func ToBalInfo(src *BalInfo) perun.BalInfo { + bals := make([][]string, len(src.Bals)) + for i := range src.Bals { + bals[i] = src.Bals[i].Bal + } + return perun.BalInfo{ + Currencies: src.Currencies, + Parts: src.Parts, + Bals: bals, + } +} + +// FromBalInfo is a helper function to convert BalInfo struct defined in perun-node +// to BalInfo struct defined in grpc package. +func FromBalInfo(src perun.BalInfo) *BalInfo { + bals := make([]*BalInfoBal, len(src.Bals)) + for i := range src.Bals { + bals[i] = &BalInfoBal{} + bals[i].Bal = src.Bals[i] + } + return &BalInfo{ + Currencies: src.Currencies, + Parts: src.Parts, + Bals: bals, + } +} + +// ToPayChsInfo is a helper function to convert a slice of PayChInfo struct +// defined in grpc package to a slice of PayChInfo struct defined in perun-node package. +func ToPayChsInfo(grpcPayChsInfo []*PayChInfo) []payment.PayChInfo { + payChsInfo := make([]payment.PayChInfo, len(grpcPayChsInfo)) + for i := range grpcPayChsInfo { + payChsInfo[i] = ToPayChInfo(grpcPayChsInfo[i]) + } + return payChsInfo +} + +// ToPayChInfo is a helper function to convert PayChInfo struct defined in grpc +// package to PayChInfo struct defined in perun-node package. +func ToPayChInfo(src *PayChInfo) payment.PayChInfo { + return payment.PayChInfo{ + ChID: src.ChID, + BalInfo: ToBalInfo(src.BalInfo), + Version: src.Version, + } +} diff --git a/api/grpc/pb/nodetypes.pb.go b/api/grpc/pb/nodetypes.pb.go new file mode 100644 index 00000000..e3dde433 --- /dev/null +++ b/api/grpc/pb/nodetypes.pb.go @@ -0,0 +1,512 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v4.23.3 +// source: nodetypes.proto + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Peer ID represents the data required to identify and communicate +// with a participant in the the off-chain network. +type PeerID struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` + OffChainAddress string `protobuf:"bytes,2,opt,name=offChainAddress,proto3" json:"offChainAddress,omitempty"` + CommAddress string `protobuf:"bytes,3,opt,name=commAddress,proto3" json:"commAddress,omitempty"` + CommType string `protobuf:"bytes,4,opt,name=commType,proto3" json:"commType,omitempty"` +} + +func (x *PeerID) Reset() { + *x = PeerID{} + if protoimpl.UnsafeEnabled { + mi := &file_nodetypes_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerID) ProtoMessage() {} + +func (x *PeerID) ProtoReflect() protoreflect.Message { + mi := &file_nodetypes_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerID.ProtoReflect.Descriptor instead. +func (*PeerID) Descriptor() ([]byte, []int) { + return file_nodetypes_proto_rawDescGZIP(), []int{0} +} + +func (x *PeerID) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +func (x *PeerID) GetOffChainAddress() string { + if x != nil { + return x.OffChainAddress + } + return "" +} + +func (x *PeerID) GetCommAddress() string { + if x != nil { + return x.CommAddress + } + return "" +} + +func (x *PeerID) GetCommType() string { + if x != nil { + return x.CommType + } + return "" +} + +// BalInfo represents the balance information of the channel: Currency and the channel balance. +// Balance is represented as two corresponding lists: +// Parts contains the list of aliases of the channel participants and +// Balance list contains the amount held by each channel participant in the give currency. +// +// A valid BalInfo should meet the following conditions, it should be validated when using them. +// 1. Lengths of Parts list and Balance list are equal. +// 2. All entries in Parts list are unique. +// 3. Parts list has an entry "self", that represents the user of the session. +// 4. No amount in Balance must be negative. +type BalInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Currencies []string `protobuf:"bytes,1,rep,name=currencies,proto3" json:"currencies,omitempty"` + Parts []string `protobuf:"bytes,2,rep,name=parts,proto3" json:"parts,omitempty"` + Bals []*BalInfoBal `protobuf:"bytes,3,rep,name=bals,proto3" json:"bals,omitempty"` +} + +func (x *BalInfo) Reset() { + *x = BalInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_nodetypes_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BalInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BalInfo) ProtoMessage() {} + +func (x *BalInfo) ProtoReflect() protoreflect.Message { + mi := &file_nodetypes_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BalInfo.ProtoReflect.Descriptor instead. +func (*BalInfo) Descriptor() ([]byte, []int) { + return file_nodetypes_proto_rawDescGZIP(), []int{1} +} + +func (x *BalInfo) GetCurrencies() []string { + if x != nil { + return x.Currencies + } + return nil +} + +func (x *BalInfo) GetParts() []string { + if x != nil { + return x.Parts + } + return nil +} + +func (x *BalInfo) GetBals() []*BalInfoBal { + if x != nil { + return x.Bals + } + return nil +} + +type PayChInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChID string `protobuf:"bytes,1,opt,name=chID,proto3" json:"chID,omitempty"` + BalInfo *BalInfo `protobuf:"bytes,2,opt,name=balInfo,proto3" json:"balInfo,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *PayChInfo) Reset() { + *x = PayChInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_nodetypes_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayChInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayChInfo) ProtoMessage() {} + +func (x *PayChInfo) ProtoReflect() protoreflect.Message { + mi := &file_nodetypes_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PayChInfo.ProtoReflect.Descriptor instead. +func (*PayChInfo) Descriptor() ([]byte, []int) { + return file_nodetypes_proto_rawDescGZIP(), []int{2} +} + +func (x *PayChInfo) GetChID() string { + if x != nil { + return x.ChID + } + return "" +} + +func (x *PayChInfo) GetBalInfo() *BalInfo { + if x != nil { + return x.BalInfo + } + return nil +} + +func (x *PayChInfo) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type Payment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` + Payee string `protobuf:"bytes,2,opt,name=payee,proto3" json:"payee,omitempty"` + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *Payment) Reset() { + *x = Payment{} + if protoimpl.UnsafeEnabled { + mi := &file_nodetypes_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Payment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Payment) ProtoMessage() {} + +func (x *Payment) ProtoReflect() protoreflect.Message { + mi := &file_nodetypes_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Payment.ProtoReflect.Descriptor instead. +func (*Payment) Descriptor() ([]byte, []int) { + return file_nodetypes_proto_rawDescGZIP(), []int{3} +} + +func (x *Payment) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *Payment) GetPayee() string { + if x != nil { + return x.Payee + } + return "" +} + +func (x *Payment) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +type BalInfoBal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bal []string `protobuf:"bytes,1,rep,name=bal,proto3" json:"bal,omitempty"` +} + +func (x *BalInfoBal) Reset() { + *x = BalInfoBal{} + if protoimpl.UnsafeEnabled { + mi := &file_nodetypes_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BalInfoBal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BalInfoBal) ProtoMessage() {} + +func (x *BalInfoBal) ProtoReflect() protoreflect.Message { + mi := &file_nodetypes_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BalInfoBal.ProtoReflect.Descriptor instead. +func (*BalInfoBal) Descriptor() ([]byte, []int) { + return file_nodetypes_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *BalInfoBal) GetBal() []string { + if x != nil { + return x.Bal + } + return nil +} + +var File_nodetypes_proto protoreflect.FileDescriptor + +var file_nodetypes_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x6e, 0x6f, 0x64, 0x65, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x86, 0x01, 0x0a, 0x06, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, + 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x66, 0x66, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x6f, 0x66, 0x66, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x22, 0x7d, + 0x0a, 0x07, 0x42, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x12, + 0x23, 0x0a, 0x04, 0x62, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x70, 0x62, 0x2e, 0x42, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x62, 0x61, 0x6c, 0x52, 0x04, + 0x62, 0x61, 0x6c, 0x73, 0x1a, 0x17, 0x0a, 0x03, 0x62, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x62, + 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x62, 0x61, 0x6c, 0x22, 0x60, 0x0a, + 0x09, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x12, 0x25, + 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x62, 0x61, + 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, + 0x53, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x65, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x79, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nodetypes_proto_rawDescOnce sync.Once + file_nodetypes_proto_rawDescData = file_nodetypes_proto_rawDesc +) + +func file_nodetypes_proto_rawDescGZIP() []byte { + file_nodetypes_proto_rawDescOnce.Do(func() { + file_nodetypes_proto_rawDescData = protoimpl.X.CompressGZIP(file_nodetypes_proto_rawDescData) + }) + return file_nodetypes_proto_rawDescData +} + +var file_nodetypes_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_nodetypes_proto_goTypes = []interface{}{ + (*PeerID)(nil), // 0: pb.PeerID + (*BalInfo)(nil), // 1: pb.BalInfo + (*PayChInfo)(nil), // 2: pb.PayChInfo + (*Payment)(nil), // 3: pb.Payment + (*BalInfoBal)(nil), // 4: pb.BalInfo.bal +} +var file_nodetypes_proto_depIdxs = []int32{ + 4, // 0: pb.BalInfo.bals:type_name -> pb.BalInfo.bal + 1, // 1: pb.PayChInfo.balInfo:type_name -> pb.BalInfo + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_nodetypes_proto_init() } +func file_nodetypes_proto_init() { + if File_nodetypes_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nodetypes_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nodetypes_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BalInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nodetypes_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayChInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nodetypes_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Payment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nodetypes_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BalInfoBal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nodetypes_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nodetypes_proto_goTypes, + DependencyIndexes: file_nodetypes_proto_depIdxs, + MessageInfos: file_nodetypes_proto_msgTypes, + }.Build() + File_nodetypes_proto = out.File + file_nodetypes_proto_rawDesc = nil + file_nodetypes_proto_goTypes = nil + file_nodetypes_proto_depIdxs = nil +} diff --git a/api/grpc/pb/payment_service.pb.go b/api/grpc/pb/payment_service.pb.go new file mode 100644 index 00000000..9c196d90 --- /dev/null +++ b/api/grpc/pb/payment_service.pb.go @@ -0,0 +1,4947 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v4.23.3 +// source: payment_service.proto + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SubPayChUpdatesResp_Notify_ChUpdateType int32 + +const ( + SubPayChUpdatesResp_Notify_open SubPayChUpdatesResp_Notify_ChUpdateType = 0 + SubPayChUpdatesResp_Notify_final SubPayChUpdatesResp_Notify_ChUpdateType = 1 + SubPayChUpdatesResp_Notify_closed SubPayChUpdatesResp_Notify_ChUpdateType = 2 +) + +// Enum value maps for SubPayChUpdatesResp_Notify_ChUpdateType. +var ( + SubPayChUpdatesResp_Notify_ChUpdateType_name = map[int32]string{ + 0: "open", + 1: "final", + 2: "closed", + } + SubPayChUpdatesResp_Notify_ChUpdateType_value = map[string]int32{ + "open": 0, + "final": 1, + "closed": 2, + } +) + +func (x SubPayChUpdatesResp_Notify_ChUpdateType) Enum() *SubPayChUpdatesResp_Notify_ChUpdateType { + p := new(SubPayChUpdatesResp_Notify_ChUpdateType) + *p = x + return p +} + +func (x SubPayChUpdatesResp_Notify_ChUpdateType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubPayChUpdatesResp_Notify_ChUpdateType) Descriptor() protoreflect.EnumDescriptor { + return file_payment_service_proto_enumTypes[0].Descriptor() +} + +func (SubPayChUpdatesResp_Notify_ChUpdateType) Type() protoreflect.EnumType { + return &file_payment_service_proto_enumTypes[0] +} + +func (x SubPayChUpdatesResp_Notify_ChUpdateType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubPayChUpdatesResp_Notify_ChUpdateType.Descriptor instead. +func (SubPayChUpdatesResp_Notify_ChUpdateType) EnumDescriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{31, 0, 0} +} + +type GetConfigReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetConfigReq) Reset() { + *x = GetConfigReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConfigReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigReq) ProtoMessage() {} + +func (x *GetConfigReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigReq.ProtoReflect.Descriptor instead. +func (*GetConfigReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{0} +} + +type GetConfigResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainAddress string `protobuf:"bytes,1,opt,name=chainAddress,proto3" json:"chainAddress,omitempty"` + Adjudicator string `protobuf:"bytes,2,opt,name=adjudicator,proto3" json:"adjudicator,omitempty"` + AssetETH string `protobuf:"bytes,3,opt,name=assetETH,proto3" json:"assetETH,omitempty"` + CommTypes []string `protobuf:"bytes,4,rep,name=commTypes,proto3" json:"commTypes,omitempty"` + IdProviderTypes []string `protobuf:"bytes,5,rep,name=idProviderTypes,proto3" json:"idProviderTypes,omitempty"` +} + +func (x *GetConfigResp) Reset() { + *x = GetConfigResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConfigResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigResp) ProtoMessage() {} + +func (x *GetConfigResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigResp.ProtoReflect.Descriptor instead. +func (*GetConfigResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetConfigResp) GetChainAddress() string { + if x != nil { + return x.ChainAddress + } + return "" +} + +func (x *GetConfigResp) GetAdjudicator() string { + if x != nil { + return x.Adjudicator + } + return "" +} + +func (x *GetConfigResp) GetAssetETH() string { + if x != nil { + return x.AssetETH + } + return "" +} + +func (x *GetConfigResp) GetCommTypes() []string { + if x != nil { + return x.CommTypes + } + return nil +} + +func (x *GetConfigResp) GetIdProviderTypes() []string { + if x != nil { + return x.IdProviderTypes + } + return nil +} + +type OpenSessionReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConfigFile string `protobuf:"bytes,1,opt,name=configFile,proto3" json:"configFile,omitempty"` +} + +func (x *OpenSessionReq) Reset() { + *x = OpenSessionReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenSessionReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenSessionReq) ProtoMessage() {} + +func (x *OpenSessionReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenSessionReq.ProtoReflect.Descriptor instead. +func (*OpenSessionReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{2} +} + +func (x *OpenSessionReq) GetConfigFile() string { + if x != nil { + return x.ConfigFile + } + return "" +} + +type OpenSessionResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *OpenSessionResp_MsgSuccess_ + // *OpenSessionResp_Error + Response isOpenSessionResp_Response `protobuf_oneof:"response"` +} + +func (x *OpenSessionResp) Reset() { + *x = OpenSessionResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenSessionResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenSessionResp) ProtoMessage() {} + +func (x *OpenSessionResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenSessionResp.ProtoReflect.Descriptor instead. +func (*OpenSessionResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{3} +} + +func (m *OpenSessionResp) GetResponse() isOpenSessionResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *OpenSessionResp) GetMsgSuccess() *OpenSessionResp_MsgSuccess { + if x, ok := x.GetResponse().(*OpenSessionResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *OpenSessionResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*OpenSessionResp_Error); ok { + return x.Error + } + return nil +} + +type isOpenSessionResp_Response interface { + isOpenSessionResp_Response() +} + +type OpenSessionResp_MsgSuccess_ struct { + MsgSuccess *OpenSessionResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type OpenSessionResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*OpenSessionResp_MsgSuccess_) isOpenSessionResp_Response() {} + +func (*OpenSessionResp_Error) isOpenSessionResp_Response() {} + +type TimeReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TimeReq) Reset() { + *x = TimeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimeReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeReq) ProtoMessage() {} + +func (x *TimeReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimeReq.ProtoReflect.Descriptor instead. +func (*TimeReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{4} +} + +type TimeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` +} + +func (x *TimeResp) Reset() { + *x = TimeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeResp) ProtoMessage() {} + +func (x *TimeResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimeResp.ProtoReflect.Descriptor instead. +func (*TimeResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{5} +} + +func (x *TimeResp) GetTime() int64 { + if x != nil { + return x.Time + } + return 0 +} + +type RegisterCurrencyReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TokenAddr string `protobuf:"bytes,1,opt,name=tokenAddr,proto3" json:"tokenAddr,omitempty"` + AssetAddr string `protobuf:"bytes,2,opt,name=assetAddr,proto3" json:"assetAddr,omitempty"` +} + +func (x *RegisterCurrencyReq) Reset() { + *x = RegisterCurrencyReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterCurrencyReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterCurrencyReq) ProtoMessage() {} + +func (x *RegisterCurrencyReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterCurrencyReq.ProtoReflect.Descriptor instead. +func (*RegisterCurrencyReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{6} +} + +func (x *RegisterCurrencyReq) GetTokenAddr() string { + if x != nil { + return x.TokenAddr + } + return "" +} + +func (x *RegisterCurrencyReq) GetAssetAddr() string { + if x != nil { + return x.AssetAddr + } + return "" +} + +type RegisterCurrencyResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *RegisterCurrencyResp_MsgSuccess_ + // *RegisterCurrencyResp_Error + Response isRegisterCurrencyResp_Response `protobuf_oneof:"response"` +} + +func (x *RegisterCurrencyResp) Reset() { + *x = RegisterCurrencyResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterCurrencyResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterCurrencyResp) ProtoMessage() {} + +func (x *RegisterCurrencyResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterCurrencyResp.ProtoReflect.Descriptor instead. +func (*RegisterCurrencyResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{7} +} + +func (m *RegisterCurrencyResp) GetResponse() isRegisterCurrencyResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *RegisterCurrencyResp) GetMsgSuccess() *RegisterCurrencyResp_MsgSuccess { + if x, ok := x.GetResponse().(*RegisterCurrencyResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *RegisterCurrencyResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*RegisterCurrencyResp_Error); ok { + return x.Error + } + return nil +} + +type isRegisterCurrencyResp_Response interface { + isRegisterCurrencyResp_Response() +} + +type RegisterCurrencyResp_MsgSuccess_ struct { + MsgSuccess *RegisterCurrencyResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type RegisterCurrencyResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*RegisterCurrencyResp_MsgSuccess_) isRegisterCurrencyResp_Response() {} + +func (*RegisterCurrencyResp_Error) isRegisterCurrencyResp_Response() {} + +type HelpReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *HelpReq) Reset() { + *x = HelpReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HelpReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HelpReq) ProtoMessage() {} + +func (x *HelpReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HelpReq.ProtoReflect.Descriptor instead. +func (*HelpReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{8} +} + +type HelpResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Apis []string `protobuf:"bytes,1,rep,name=apis,proto3" json:"apis,omitempty"` +} + +func (x *HelpResp) Reset() { + *x = HelpResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HelpResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HelpResp) ProtoMessage() {} + +func (x *HelpResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HelpResp.ProtoReflect.Descriptor instead. +func (*HelpResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{9} +} + +func (x *HelpResp) GetApis() []string { + if x != nil { + return x.Apis + } + return nil +} + +type AddPeerIDReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + PeerID *PeerID `protobuf:"bytes,2,opt,name=peerID,proto3" json:"peerID,omitempty"` +} + +func (x *AddPeerIDReq) Reset() { + *x = AddPeerIDReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddPeerIDReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddPeerIDReq) ProtoMessage() {} + +func (x *AddPeerIDReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddPeerIDReq.ProtoReflect.Descriptor instead. +func (*AddPeerIDReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{10} +} + +func (x *AddPeerIDReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *AddPeerIDReq) GetPeerID() *PeerID { + if x != nil { + return x.PeerID + } + return nil +} + +type AddPeerIDResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *AddPeerIDResp_MsgSuccess_ + // *AddPeerIDResp_Error + Response isAddPeerIDResp_Response `protobuf_oneof:"response"` +} + +func (x *AddPeerIDResp) Reset() { + *x = AddPeerIDResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddPeerIDResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddPeerIDResp) ProtoMessage() {} + +func (x *AddPeerIDResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddPeerIDResp.ProtoReflect.Descriptor instead. +func (*AddPeerIDResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{11} +} + +func (m *AddPeerIDResp) GetResponse() isAddPeerIDResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *AddPeerIDResp) GetMsgSuccess() *AddPeerIDResp_MsgSuccess { + if x, ok := x.GetResponse().(*AddPeerIDResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *AddPeerIDResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*AddPeerIDResp_Error); ok { + return x.Error + } + return nil +} + +type isAddPeerIDResp_Response interface { + isAddPeerIDResp_Response() +} + +type AddPeerIDResp_MsgSuccess_ struct { + MsgSuccess *AddPeerIDResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type AddPeerIDResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*AddPeerIDResp_MsgSuccess_) isAddPeerIDResp_Response() {} + +func (*AddPeerIDResp_Error) isAddPeerIDResp_Response() {} + +type GetPeerIDReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` +} + +func (x *GetPeerIDReq) Reset() { + *x = GetPeerIDReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPeerIDReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPeerIDReq) ProtoMessage() {} + +func (x *GetPeerIDReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPeerIDReq.ProtoReflect.Descriptor instead. +func (*GetPeerIDReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{12} +} + +func (x *GetPeerIDReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *GetPeerIDReq) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +type GetPeerIDResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *GetPeerIDResp_MsgSuccess_ + // *GetPeerIDResp_Error + Response isGetPeerIDResp_Response `protobuf_oneof:"response"` +} + +func (x *GetPeerIDResp) Reset() { + *x = GetPeerIDResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPeerIDResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPeerIDResp) ProtoMessage() {} + +func (x *GetPeerIDResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPeerIDResp.ProtoReflect.Descriptor instead. +func (*GetPeerIDResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{13} +} + +func (m *GetPeerIDResp) GetResponse() isGetPeerIDResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *GetPeerIDResp) GetMsgSuccess() *GetPeerIDResp_MsgSuccess { + if x, ok := x.GetResponse().(*GetPeerIDResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *GetPeerIDResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*GetPeerIDResp_Error); ok { + return x.Error + } + return nil +} + +type isGetPeerIDResp_Response interface { + isGetPeerIDResp_Response() +} + +type GetPeerIDResp_MsgSuccess_ struct { + MsgSuccess *GetPeerIDResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type GetPeerIDResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*GetPeerIDResp_MsgSuccess_) isGetPeerIDResp_Response() {} + +func (*GetPeerIDResp_Error) isGetPeerIDResp_Response() {} + +type OpenPayChReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + OpeningBalInfo *BalInfo `protobuf:"bytes,2,opt,name=openingBalInfo,proto3" json:"openingBalInfo,omitempty"` + ChallengeDurSecs uint64 `protobuf:"varint,3,opt,name=challengeDurSecs,proto3" json:"challengeDurSecs,omitempty"` +} + +func (x *OpenPayChReq) Reset() { + *x = OpenPayChReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenPayChReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenPayChReq) ProtoMessage() {} + +func (x *OpenPayChReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenPayChReq.ProtoReflect.Descriptor instead. +func (*OpenPayChReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{14} +} + +func (x *OpenPayChReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *OpenPayChReq) GetOpeningBalInfo() *BalInfo { + if x != nil { + return x.OpeningBalInfo + } + return nil +} + +func (x *OpenPayChReq) GetChallengeDurSecs() uint64 { + if x != nil { + return x.ChallengeDurSecs + } + return 0 +} + +type OpenPayChResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *OpenPayChResp_MsgSuccess_ + // *OpenPayChResp_Error + Response isOpenPayChResp_Response `protobuf_oneof:"response"` +} + +func (x *OpenPayChResp) Reset() { + *x = OpenPayChResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenPayChResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenPayChResp) ProtoMessage() {} + +func (x *OpenPayChResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenPayChResp.ProtoReflect.Descriptor instead. +func (*OpenPayChResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{15} +} + +func (m *OpenPayChResp) GetResponse() isOpenPayChResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *OpenPayChResp) GetMsgSuccess() *OpenPayChResp_MsgSuccess { + if x, ok := x.GetResponse().(*OpenPayChResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *OpenPayChResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*OpenPayChResp_Error); ok { + return x.Error + } + return nil +} + +type isOpenPayChResp_Response interface { + isOpenPayChResp_Response() +} + +type OpenPayChResp_MsgSuccess_ struct { + MsgSuccess *OpenPayChResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type OpenPayChResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*OpenPayChResp_MsgSuccess_) isOpenPayChResp_Response() {} + +func (*OpenPayChResp_Error) isOpenPayChResp_Response() {} + +type GetPayChsInfoReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` +} + +func (x *GetPayChsInfoReq) Reset() { + *x = GetPayChsInfoReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPayChsInfoReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPayChsInfoReq) ProtoMessage() {} + +func (x *GetPayChsInfoReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPayChsInfoReq.ProtoReflect.Descriptor instead. +func (*GetPayChsInfoReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{16} +} + +func (x *GetPayChsInfoReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +type GetPayChsInfoResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *GetPayChsInfoResp_MsgSuccess_ + // *GetPayChsInfoResp_Error + Response isGetPayChsInfoResp_Response `protobuf_oneof:"response"` +} + +func (x *GetPayChsInfoResp) Reset() { + *x = GetPayChsInfoResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPayChsInfoResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPayChsInfoResp) ProtoMessage() {} + +func (x *GetPayChsInfoResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPayChsInfoResp.ProtoReflect.Descriptor instead. +func (*GetPayChsInfoResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{17} +} + +func (m *GetPayChsInfoResp) GetResponse() isGetPayChsInfoResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *GetPayChsInfoResp) GetMsgSuccess() *GetPayChsInfoResp_MsgSuccess { + if x, ok := x.GetResponse().(*GetPayChsInfoResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *GetPayChsInfoResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*GetPayChsInfoResp_Error); ok { + return x.Error + } + return nil +} + +type isGetPayChsInfoResp_Response interface { + isGetPayChsInfoResp_Response() +} + +type GetPayChsInfoResp_MsgSuccess_ struct { + MsgSuccess *GetPayChsInfoResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type GetPayChsInfoResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*GetPayChsInfoResp_MsgSuccess_) isGetPayChsInfoResp_Response() {} + +func (*GetPayChsInfoResp_Error) isGetPayChsInfoResp_Response() {} + +type SubPayChProposalsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` +} + +func (x *SubPayChProposalsReq) Reset() { + *x = SubPayChProposalsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubPayChProposalsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubPayChProposalsReq) ProtoMessage() {} + +func (x *SubPayChProposalsReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubPayChProposalsReq.ProtoReflect.Descriptor instead. +func (*SubPayChProposalsReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{18} +} + +func (x *SubPayChProposalsReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +type SubPayChProposalsResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *SubPayChProposalsResp_Notify_ + // *SubPayChProposalsResp_Error + Response isSubPayChProposalsResp_Response `protobuf_oneof:"response"` +} + +func (x *SubPayChProposalsResp) Reset() { + *x = SubPayChProposalsResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubPayChProposalsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubPayChProposalsResp) ProtoMessage() {} + +func (x *SubPayChProposalsResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubPayChProposalsResp.ProtoReflect.Descriptor instead. +func (*SubPayChProposalsResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{19} +} + +func (m *SubPayChProposalsResp) GetResponse() isSubPayChProposalsResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *SubPayChProposalsResp) GetNotify() *SubPayChProposalsResp_Notify { + if x, ok := x.GetResponse().(*SubPayChProposalsResp_Notify_); ok { + return x.Notify + } + return nil +} + +func (x *SubPayChProposalsResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*SubPayChProposalsResp_Error); ok { + return x.Error + } + return nil +} + +type isSubPayChProposalsResp_Response interface { + isSubPayChProposalsResp_Response() +} + +type SubPayChProposalsResp_Notify_ struct { + Notify *SubPayChProposalsResp_Notify `protobuf:"bytes,1,opt,name=notify,proto3,oneof"` +} + +type SubPayChProposalsResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*SubPayChProposalsResp_Notify_) isSubPayChProposalsResp_Response() {} + +func (*SubPayChProposalsResp_Error) isSubPayChProposalsResp_Response() {} + +type UnsubPayChProposalsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` +} + +func (x *UnsubPayChProposalsReq) Reset() { + *x = UnsubPayChProposalsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsubPayChProposalsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsubPayChProposalsReq) ProtoMessage() {} + +func (x *UnsubPayChProposalsReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsubPayChProposalsReq.ProtoReflect.Descriptor instead. +func (*UnsubPayChProposalsReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{20} +} + +func (x *UnsubPayChProposalsReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +type UnsubPayChProposalsResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *UnsubPayChProposalsResp_MsgSuccess_ + // *UnsubPayChProposalsResp_Error + Response isUnsubPayChProposalsResp_Response `protobuf_oneof:"response"` +} + +func (x *UnsubPayChProposalsResp) Reset() { + *x = UnsubPayChProposalsResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsubPayChProposalsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsubPayChProposalsResp) ProtoMessage() {} + +func (x *UnsubPayChProposalsResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsubPayChProposalsResp.ProtoReflect.Descriptor instead. +func (*UnsubPayChProposalsResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{21} +} + +func (m *UnsubPayChProposalsResp) GetResponse() isUnsubPayChProposalsResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *UnsubPayChProposalsResp) GetMsgSuccess() *UnsubPayChProposalsResp_MsgSuccess { + if x, ok := x.GetResponse().(*UnsubPayChProposalsResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *UnsubPayChProposalsResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*UnsubPayChProposalsResp_Error); ok { + return x.Error + } + return nil +} + +type isUnsubPayChProposalsResp_Response interface { + isUnsubPayChProposalsResp_Response() +} + +type UnsubPayChProposalsResp_MsgSuccess_ struct { + MsgSuccess *UnsubPayChProposalsResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type UnsubPayChProposalsResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*UnsubPayChProposalsResp_MsgSuccess_) isUnsubPayChProposalsResp_Response() {} + +func (*UnsubPayChProposalsResp_Error) isUnsubPayChProposalsResp_Response() {} + +type RespondPayChProposalReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + ProposalID string `protobuf:"bytes,2,opt,name=proposalID,proto3" json:"proposalID,omitempty"` + Accept bool `protobuf:"varint,3,opt,name=accept,proto3" json:"accept,omitempty"` +} + +func (x *RespondPayChProposalReq) Reset() { + *x = RespondPayChProposalReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RespondPayChProposalReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RespondPayChProposalReq) ProtoMessage() {} + +func (x *RespondPayChProposalReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RespondPayChProposalReq.ProtoReflect.Descriptor instead. +func (*RespondPayChProposalReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{22} +} + +func (x *RespondPayChProposalReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *RespondPayChProposalReq) GetProposalID() string { + if x != nil { + return x.ProposalID + } + return "" +} + +func (x *RespondPayChProposalReq) GetAccept() bool { + if x != nil { + return x.Accept + } + return false +} + +type RespondPayChProposalResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *RespondPayChProposalResp_MsgSuccess_ + // *RespondPayChProposalResp_Error + Response isRespondPayChProposalResp_Response `protobuf_oneof:"response"` +} + +func (x *RespondPayChProposalResp) Reset() { + *x = RespondPayChProposalResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RespondPayChProposalResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RespondPayChProposalResp) ProtoMessage() {} + +func (x *RespondPayChProposalResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RespondPayChProposalResp.ProtoReflect.Descriptor instead. +func (*RespondPayChProposalResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{23} +} + +func (m *RespondPayChProposalResp) GetResponse() isRespondPayChProposalResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *RespondPayChProposalResp) GetMsgSuccess() *RespondPayChProposalResp_MsgSuccess { + if x, ok := x.GetResponse().(*RespondPayChProposalResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *RespondPayChProposalResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*RespondPayChProposalResp_Error); ok { + return x.Error + } + return nil +} + +type isRespondPayChProposalResp_Response interface { + isRespondPayChProposalResp_Response() +} + +type RespondPayChProposalResp_MsgSuccess_ struct { + MsgSuccess *RespondPayChProposalResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type RespondPayChProposalResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*RespondPayChProposalResp_MsgSuccess_) isRespondPayChProposalResp_Response() {} + +func (*RespondPayChProposalResp_Error) isRespondPayChProposalResp_Response() {} + +type CloseSessionReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *CloseSessionReq) Reset() { + *x = CloseSessionReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CloseSessionReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloseSessionReq) ProtoMessage() {} + +func (x *CloseSessionReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CloseSessionReq.ProtoReflect.Descriptor instead. +func (*CloseSessionReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{24} +} + +func (x *CloseSessionReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *CloseSessionReq) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type CloseSessionResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *CloseSessionResp_MsgSuccess_ + // *CloseSessionResp_Error + Response isCloseSessionResp_Response `protobuf_oneof:"response"` +} + +func (x *CloseSessionResp) Reset() { + *x = CloseSessionResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CloseSessionResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloseSessionResp) ProtoMessage() {} + +func (x *CloseSessionResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CloseSessionResp.ProtoReflect.Descriptor instead. +func (*CloseSessionResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{25} +} + +func (m *CloseSessionResp) GetResponse() isCloseSessionResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *CloseSessionResp) GetMsgSuccess() *CloseSessionResp_MsgSuccess { + if x, ok := x.GetResponse().(*CloseSessionResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *CloseSessionResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*CloseSessionResp_Error); ok { + return x.Error + } + return nil +} + +type isCloseSessionResp_Response interface { + isCloseSessionResp_Response() +} + +type CloseSessionResp_MsgSuccess_ struct { + MsgSuccess *CloseSessionResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type CloseSessionResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*CloseSessionResp_MsgSuccess_) isCloseSessionResp_Response() {} + +func (*CloseSessionResp_Error) isCloseSessionResp_Response() {} + +type DeployAssetERC20Req struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + TokenAddr string `protobuf:"bytes,2,opt,name=tokenAddr,proto3" json:"tokenAddr,omitempty"` +} + +func (x *DeployAssetERC20Req) Reset() { + *x = DeployAssetERC20Req{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployAssetERC20Req) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployAssetERC20Req) ProtoMessage() {} + +func (x *DeployAssetERC20Req) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeployAssetERC20Req.ProtoReflect.Descriptor instead. +func (*DeployAssetERC20Req) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{26} +} + +func (x *DeployAssetERC20Req) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *DeployAssetERC20Req) GetTokenAddr() string { + if x != nil { + return x.TokenAddr + } + return "" +} + +type DeployAssetERC20Resp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *DeployAssetERC20Resp_MsgSuccess_ + // *DeployAssetERC20Resp_Error + Response isDeployAssetERC20Resp_Response `protobuf_oneof:"response"` +} + +func (x *DeployAssetERC20Resp) Reset() { + *x = DeployAssetERC20Resp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployAssetERC20Resp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployAssetERC20Resp) ProtoMessage() {} + +func (x *DeployAssetERC20Resp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeployAssetERC20Resp.ProtoReflect.Descriptor instead. +func (*DeployAssetERC20Resp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{27} +} + +func (m *DeployAssetERC20Resp) GetResponse() isDeployAssetERC20Resp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *DeployAssetERC20Resp) GetMsgSuccess() *DeployAssetERC20Resp_MsgSuccess { + if x, ok := x.GetResponse().(*DeployAssetERC20Resp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *DeployAssetERC20Resp) GetError() *MsgError { + if x, ok := x.GetResponse().(*DeployAssetERC20Resp_Error); ok { + return x.Error + } + return nil +} + +type isDeployAssetERC20Resp_Response interface { + isDeployAssetERC20Resp_Response() +} + +type DeployAssetERC20Resp_MsgSuccess_ struct { + MsgSuccess *DeployAssetERC20Resp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type DeployAssetERC20Resp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*DeployAssetERC20Resp_MsgSuccess_) isDeployAssetERC20Resp_Response() {} + +func (*DeployAssetERC20Resp_Error) isDeployAssetERC20Resp_Response() {} + +type SendPayChUpdateReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` + Payments []*Payment `protobuf:"bytes,3,rep,name=payments,proto3" json:"payments,omitempty"` +} + +func (x *SendPayChUpdateReq) Reset() { + *x = SendPayChUpdateReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendPayChUpdateReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendPayChUpdateReq) ProtoMessage() {} + +func (x *SendPayChUpdateReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendPayChUpdateReq.ProtoReflect.Descriptor instead. +func (*SendPayChUpdateReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{28} +} + +func (x *SendPayChUpdateReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *SendPayChUpdateReq) GetChID() string { + if x != nil { + return x.ChID + } + return "" +} + +func (x *SendPayChUpdateReq) GetPayments() []*Payment { + if x != nil { + return x.Payments + } + return nil +} + +type SendPayChUpdateResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *SendPayChUpdateResp_MsgSuccess_ + // *SendPayChUpdateResp_Error + Response isSendPayChUpdateResp_Response `protobuf_oneof:"response"` +} + +func (x *SendPayChUpdateResp) Reset() { + *x = SendPayChUpdateResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendPayChUpdateResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendPayChUpdateResp) ProtoMessage() {} + +func (x *SendPayChUpdateResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendPayChUpdateResp.ProtoReflect.Descriptor instead. +func (*SendPayChUpdateResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{29} +} + +func (m *SendPayChUpdateResp) GetResponse() isSendPayChUpdateResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *SendPayChUpdateResp) GetMsgSuccess() *SendPayChUpdateResp_MsgSuccess { + if x, ok := x.GetResponse().(*SendPayChUpdateResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *SendPayChUpdateResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*SendPayChUpdateResp_Error); ok { + return x.Error + } + return nil +} + +type isSendPayChUpdateResp_Response interface { + isSendPayChUpdateResp_Response() +} + +type SendPayChUpdateResp_MsgSuccess_ struct { + MsgSuccess *SendPayChUpdateResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type SendPayChUpdateResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*SendPayChUpdateResp_MsgSuccess_) isSendPayChUpdateResp_Response() {} + +func (*SendPayChUpdateResp_Error) isSendPayChUpdateResp_Response() {} + +type SubpayChUpdatesReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` +} + +func (x *SubpayChUpdatesReq) Reset() { + *x = SubpayChUpdatesReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubpayChUpdatesReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubpayChUpdatesReq) ProtoMessage() {} + +func (x *SubpayChUpdatesReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubpayChUpdatesReq.ProtoReflect.Descriptor instead. +func (*SubpayChUpdatesReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{30} +} + +func (x *SubpayChUpdatesReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *SubpayChUpdatesReq) GetChID() string { + if x != nil { + return x.ChID + } + return "" +} + +type SubPayChUpdatesResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *SubPayChUpdatesResp_Notify_ + // *SubPayChUpdatesResp_Error + Response isSubPayChUpdatesResp_Response `protobuf_oneof:"response"` +} + +func (x *SubPayChUpdatesResp) Reset() { + *x = SubPayChUpdatesResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubPayChUpdatesResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubPayChUpdatesResp) ProtoMessage() {} + +func (x *SubPayChUpdatesResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubPayChUpdatesResp.ProtoReflect.Descriptor instead. +func (*SubPayChUpdatesResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{31} +} + +func (m *SubPayChUpdatesResp) GetResponse() isSubPayChUpdatesResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *SubPayChUpdatesResp) GetNotify() *SubPayChUpdatesResp_Notify { + if x, ok := x.GetResponse().(*SubPayChUpdatesResp_Notify_); ok { + return x.Notify + } + return nil +} + +func (x *SubPayChUpdatesResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*SubPayChUpdatesResp_Error); ok { + return x.Error + } + return nil +} + +type isSubPayChUpdatesResp_Response interface { + isSubPayChUpdatesResp_Response() +} + +type SubPayChUpdatesResp_Notify_ struct { + Notify *SubPayChUpdatesResp_Notify `protobuf:"bytes,1,opt,name=notify,proto3,oneof"` +} + +type SubPayChUpdatesResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*SubPayChUpdatesResp_Notify_) isSubPayChUpdatesResp_Response() {} + +func (*SubPayChUpdatesResp_Error) isSubPayChUpdatesResp_Response() {} + +type UnsubPayChUpdatesReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` +} + +func (x *UnsubPayChUpdatesReq) Reset() { + *x = UnsubPayChUpdatesReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsubPayChUpdatesReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsubPayChUpdatesReq) ProtoMessage() {} + +func (x *UnsubPayChUpdatesReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsubPayChUpdatesReq.ProtoReflect.Descriptor instead. +func (*UnsubPayChUpdatesReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{32} +} + +func (x *UnsubPayChUpdatesReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *UnsubPayChUpdatesReq) GetChID() string { + if x != nil { + return x.ChID + } + return "" +} + +type UnsubPayChUpdatesResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *UnsubPayChUpdatesResp_MsgSuccess_ + // *UnsubPayChUpdatesResp_Error + Response isUnsubPayChUpdatesResp_Response `protobuf_oneof:"response"` +} + +func (x *UnsubPayChUpdatesResp) Reset() { + *x = UnsubPayChUpdatesResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsubPayChUpdatesResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsubPayChUpdatesResp) ProtoMessage() {} + +func (x *UnsubPayChUpdatesResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsubPayChUpdatesResp.ProtoReflect.Descriptor instead. +func (*UnsubPayChUpdatesResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{33} +} + +func (m *UnsubPayChUpdatesResp) GetResponse() isUnsubPayChUpdatesResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *UnsubPayChUpdatesResp) GetMsgSuccess() *UnsubPayChUpdatesResp_MsgSuccess { + if x, ok := x.GetResponse().(*UnsubPayChUpdatesResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *UnsubPayChUpdatesResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*UnsubPayChUpdatesResp_Error); ok { + return x.Error + } + return nil +} + +type isUnsubPayChUpdatesResp_Response interface { + isUnsubPayChUpdatesResp_Response() +} + +type UnsubPayChUpdatesResp_MsgSuccess_ struct { + MsgSuccess *UnsubPayChUpdatesResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type UnsubPayChUpdatesResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*UnsubPayChUpdatesResp_MsgSuccess_) isUnsubPayChUpdatesResp_Response() {} + +func (*UnsubPayChUpdatesResp_Error) isUnsubPayChUpdatesResp_Response() {} + +type RespondPayChUpdateReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` + UpdateID string `protobuf:"bytes,3,opt,name=updateID,proto3" json:"updateID,omitempty"` + Accept bool `protobuf:"varint,4,opt,name=accept,proto3" json:"accept,omitempty"` +} + +func (x *RespondPayChUpdateReq) Reset() { + *x = RespondPayChUpdateReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RespondPayChUpdateReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RespondPayChUpdateReq) ProtoMessage() {} + +func (x *RespondPayChUpdateReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RespondPayChUpdateReq.ProtoReflect.Descriptor instead. +func (*RespondPayChUpdateReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{34} +} + +func (x *RespondPayChUpdateReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *RespondPayChUpdateReq) GetChID() string { + if x != nil { + return x.ChID + } + return "" +} + +func (x *RespondPayChUpdateReq) GetUpdateID() string { + if x != nil { + return x.UpdateID + } + return "" +} + +func (x *RespondPayChUpdateReq) GetAccept() bool { + if x != nil { + return x.Accept + } + return false +} + +type RespondPayChUpdateResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *RespondPayChUpdateResp_MsgSuccess_ + // *RespondPayChUpdateResp_Error + Response isRespondPayChUpdateResp_Response `protobuf_oneof:"response"` +} + +func (x *RespondPayChUpdateResp) Reset() { + *x = RespondPayChUpdateResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RespondPayChUpdateResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RespondPayChUpdateResp) ProtoMessage() {} + +func (x *RespondPayChUpdateResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RespondPayChUpdateResp.ProtoReflect.Descriptor instead. +func (*RespondPayChUpdateResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{35} +} + +func (m *RespondPayChUpdateResp) GetResponse() isRespondPayChUpdateResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *RespondPayChUpdateResp) GetMsgSuccess() *RespondPayChUpdateResp_MsgSuccess { + if x, ok := x.GetResponse().(*RespondPayChUpdateResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *RespondPayChUpdateResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*RespondPayChUpdateResp_Error); ok { + return x.Error + } + return nil +} + +type isRespondPayChUpdateResp_Response interface { + isRespondPayChUpdateResp_Response() +} + +type RespondPayChUpdateResp_MsgSuccess_ struct { + MsgSuccess *RespondPayChUpdateResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type RespondPayChUpdateResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*RespondPayChUpdateResp_MsgSuccess_) isRespondPayChUpdateResp_Response() {} + +func (*RespondPayChUpdateResp_Error) isRespondPayChUpdateResp_Response() {} + +type GetPayChInfoReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` +} + +func (x *GetPayChInfoReq) Reset() { + *x = GetPayChInfoReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPayChInfoReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPayChInfoReq) ProtoMessage() {} + +func (x *GetPayChInfoReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPayChInfoReq.ProtoReflect.Descriptor instead. +func (*GetPayChInfoReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{36} +} + +func (x *GetPayChInfoReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *GetPayChInfoReq) GetChID() string { + if x != nil { + return x.ChID + } + return "" +} + +type GetPayChInfoResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *GetPayChInfoResp_MsgSuccess_ + // *GetPayChInfoResp_Error + Response isGetPayChInfoResp_Response `protobuf_oneof:"response"` +} + +func (x *GetPayChInfoResp) Reset() { + *x = GetPayChInfoResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPayChInfoResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPayChInfoResp) ProtoMessage() {} + +func (x *GetPayChInfoResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPayChInfoResp.ProtoReflect.Descriptor instead. +func (*GetPayChInfoResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{37} +} + +func (m *GetPayChInfoResp) GetResponse() isGetPayChInfoResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *GetPayChInfoResp) GetMsgSuccess() *GetPayChInfoResp_MsgSuccess { + if x, ok := x.GetResponse().(*GetPayChInfoResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *GetPayChInfoResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*GetPayChInfoResp_Error); ok { + return x.Error + } + return nil +} + +type isGetPayChInfoResp_Response interface { + isGetPayChInfoResp_Response() +} + +type GetPayChInfoResp_MsgSuccess_ struct { + MsgSuccess *GetPayChInfoResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type GetPayChInfoResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*GetPayChInfoResp_MsgSuccess_) isGetPayChInfoResp_Response() {} + +func (*GetPayChInfoResp_Error) isGetPayChInfoResp_Response() {} + +type ClosePayChReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + ChID string `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` +} + +func (x *ClosePayChReq) Reset() { + *x = ClosePayChReq{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClosePayChReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClosePayChReq) ProtoMessage() {} + +func (x *ClosePayChReq) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClosePayChReq.ProtoReflect.Descriptor instead. +func (*ClosePayChReq) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{38} +} + +func (x *ClosePayChReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *ClosePayChReq) GetChID() string { + if x != nil { + return x.ChID + } + return "" +} + +type ClosePayChResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *ClosePayChResp_MsgSuccess_ + // *ClosePayChResp_Error + Response isClosePayChResp_Response `protobuf_oneof:"response"` +} + +func (x *ClosePayChResp) Reset() { + *x = ClosePayChResp{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClosePayChResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClosePayChResp) ProtoMessage() {} + +func (x *ClosePayChResp) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClosePayChResp.ProtoReflect.Descriptor instead. +func (*ClosePayChResp) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{39} +} + +func (m *ClosePayChResp) GetResponse() isClosePayChResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *ClosePayChResp) GetMsgSuccess() *ClosePayChResp_MsgSuccess { + if x, ok := x.GetResponse().(*ClosePayChResp_MsgSuccess_); ok { + return x.MsgSuccess + } + return nil +} + +func (x *ClosePayChResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*ClosePayChResp_Error); ok { + return x.Error + } + return nil +} + +type isClosePayChResp_Response interface { + isClosePayChResp_Response() +} + +type ClosePayChResp_MsgSuccess_ struct { + MsgSuccess *ClosePayChResp_MsgSuccess `protobuf:"bytes,1,opt,name=msgSuccess,proto3,oneof"` +} + +type ClosePayChResp_Error struct { + Error *MsgError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*ClosePayChResp_MsgSuccess_) isClosePayChResp_Response() {} + +func (*ClosePayChResp_Error) isClosePayChResp_Response() {} + +type OpenSessionResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + RestoredChs []*PayChInfo `protobuf:"bytes,2,rep,name=restoredChs,proto3" json:"restoredChs,omitempty"` +} + +func (x *OpenSessionResp_MsgSuccess) Reset() { + *x = OpenSessionResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenSessionResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenSessionResp_MsgSuccess) ProtoMessage() {} + +func (x *OpenSessionResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenSessionResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*OpenSessionResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *OpenSessionResp_MsgSuccess) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *OpenSessionResp_MsgSuccess) GetRestoredChs() []*PayChInfo { + if x != nil { + return x.RestoredChs + } + return nil +} + +type RegisterCurrencyResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *RegisterCurrencyResp_MsgSuccess) Reset() { + *x = RegisterCurrencyResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterCurrencyResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterCurrencyResp_MsgSuccess) ProtoMessage() {} + +func (x *RegisterCurrencyResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterCurrencyResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*RegisterCurrencyResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *RegisterCurrencyResp_MsgSuccess) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +type AddPeerIDResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *AddPeerIDResp_MsgSuccess) Reset() { + *x = AddPeerIDResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddPeerIDResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddPeerIDResp_MsgSuccess) ProtoMessage() {} + +func (x *AddPeerIDResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddPeerIDResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*AddPeerIDResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{11, 0} +} + +func (x *AddPeerIDResp_MsgSuccess) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type GetPeerIDResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeerID *PeerID `protobuf:"bytes,1,opt,name=peerID,proto3" json:"peerID,omitempty"` +} + +func (x *GetPeerIDResp_MsgSuccess) Reset() { + *x = GetPeerIDResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPeerIDResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPeerIDResp_MsgSuccess) ProtoMessage() {} + +func (x *GetPeerIDResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPeerIDResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*GetPeerIDResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{13, 0} +} + +func (x *GetPeerIDResp_MsgSuccess) GetPeerID() *PeerID { + if x != nil { + return x.PeerID + } + return nil +} + +type OpenPayChResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OpenedPayChInfo *PayChInfo `protobuf:"bytes,1,opt,name=openedPayChInfo,proto3" json:"openedPayChInfo,omitempty"` +} + +func (x *OpenPayChResp_MsgSuccess) Reset() { + *x = OpenPayChResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenPayChResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenPayChResp_MsgSuccess) ProtoMessage() {} + +func (x *OpenPayChResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenPayChResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*OpenPayChResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{15, 0} +} + +func (x *OpenPayChResp_MsgSuccess) GetOpenedPayChInfo() *PayChInfo { + if x != nil { + return x.OpenedPayChInfo + } + return nil +} + +type GetPayChsInfoResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OpenPayChsInfo []*PayChInfo `protobuf:"bytes,1,rep,name=openPayChsInfo,proto3" json:"openPayChsInfo,omitempty"` +} + +func (x *GetPayChsInfoResp_MsgSuccess) Reset() { + *x = GetPayChsInfoResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPayChsInfoResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPayChsInfoResp_MsgSuccess) ProtoMessage() {} + +func (x *GetPayChsInfoResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPayChsInfoResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*GetPayChsInfoResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{17, 0} +} + +func (x *GetPayChsInfoResp_MsgSuccess) GetOpenPayChsInfo() []*PayChInfo { + if x != nil { + return x.OpenPayChsInfo + } + return nil +} + +type SubPayChProposalsResp_Notify struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProposalID string `protobuf:"bytes,2,opt,name=proposalID,proto3" json:"proposalID,omitempty"` + OpeningBalInfo *BalInfo `protobuf:"bytes,4,opt,name=openingBalInfo,proto3" json:"openingBalInfo,omitempty"` + ChallengeDurSecs uint64 `protobuf:"varint,5,opt,name=challengeDurSecs,proto3" json:"challengeDurSecs,omitempty"` + Expiry int64 `protobuf:"varint,6,opt,name=expiry,proto3" json:"expiry,omitempty"` +} + +func (x *SubPayChProposalsResp_Notify) Reset() { + *x = SubPayChProposalsResp_Notify{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubPayChProposalsResp_Notify) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubPayChProposalsResp_Notify) ProtoMessage() {} + +func (x *SubPayChProposalsResp_Notify) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubPayChProposalsResp_Notify.ProtoReflect.Descriptor instead. +func (*SubPayChProposalsResp_Notify) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{19, 0} +} + +func (x *SubPayChProposalsResp_Notify) GetProposalID() string { + if x != nil { + return x.ProposalID + } + return "" +} + +func (x *SubPayChProposalsResp_Notify) GetOpeningBalInfo() *BalInfo { + if x != nil { + return x.OpeningBalInfo + } + return nil +} + +func (x *SubPayChProposalsResp_Notify) GetChallengeDurSecs() uint64 { + if x != nil { + return x.ChallengeDurSecs + } + return 0 +} + +func (x *SubPayChProposalsResp_Notify) GetExpiry() int64 { + if x != nil { + return x.Expiry + } + return 0 +} + +type UnsubPayChProposalsResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *UnsubPayChProposalsResp_MsgSuccess) Reset() { + *x = UnsubPayChProposalsResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsubPayChProposalsResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsubPayChProposalsResp_MsgSuccess) ProtoMessage() {} + +func (x *UnsubPayChProposalsResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsubPayChProposalsResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*UnsubPayChProposalsResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{21, 0} +} + +func (x *UnsubPayChProposalsResp_MsgSuccess) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type RespondPayChProposalResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OpenedPayChInfo *PayChInfo `protobuf:"bytes,2,opt,name=openedPayChInfo,proto3" json:"openedPayChInfo,omitempty"` +} + +func (x *RespondPayChProposalResp_MsgSuccess) Reset() { + *x = RespondPayChProposalResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RespondPayChProposalResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RespondPayChProposalResp_MsgSuccess) ProtoMessage() {} + +func (x *RespondPayChProposalResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RespondPayChProposalResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*RespondPayChProposalResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{23, 0} +} + +func (x *RespondPayChProposalResp_MsgSuccess) GetOpenedPayChInfo() *PayChInfo { + if x != nil { + return x.OpenedPayChInfo + } + return nil +} + +type CloseSessionResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OpenPayChsInfo []*PayChInfo `protobuf:"bytes,1,rep,name=openPayChsInfo,proto3" json:"openPayChsInfo,omitempty"` +} + +func (x *CloseSessionResp_MsgSuccess) Reset() { + *x = CloseSessionResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CloseSessionResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloseSessionResp_MsgSuccess) ProtoMessage() {} + +func (x *CloseSessionResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[49] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CloseSessionResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*CloseSessionResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{25, 0} +} + +func (x *CloseSessionResp_MsgSuccess) GetOpenPayChsInfo() []*PayChInfo { + if x != nil { + return x.OpenPayChsInfo + } + return nil +} + +type DeployAssetERC20Resp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AssetAddr string `protobuf:"bytes,2,opt,name=AssetAddr,proto3" json:"AssetAddr,omitempty"` +} + +func (x *DeployAssetERC20Resp_MsgSuccess) Reset() { + *x = DeployAssetERC20Resp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployAssetERC20Resp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployAssetERC20Resp_MsgSuccess) ProtoMessage() {} + +func (x *DeployAssetERC20Resp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[50] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeployAssetERC20Resp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*DeployAssetERC20Resp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{27, 0} +} + +func (x *DeployAssetERC20Resp_MsgSuccess) GetAssetAddr() string { + if x != nil { + return x.AssetAddr + } + return "" +} + +type SendPayChUpdateResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UpdatedPayChInfo *PayChInfo `protobuf:"bytes,1,opt,name=updatedPayChInfo,proto3" json:"updatedPayChInfo,omitempty"` +} + +func (x *SendPayChUpdateResp_MsgSuccess) Reset() { + *x = SendPayChUpdateResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendPayChUpdateResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendPayChUpdateResp_MsgSuccess) ProtoMessage() {} + +func (x *SendPayChUpdateResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[51] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendPayChUpdateResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*SendPayChUpdateResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{29, 0} +} + +func (x *SendPayChUpdateResp_MsgSuccess) GetUpdatedPayChInfo() *PayChInfo { + if x != nil { + return x.UpdatedPayChInfo + } + return nil +} + +type SubPayChUpdatesResp_Notify struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UpdateID string `protobuf:"bytes,1,opt,name=updateID,proto3" json:"updateID,omitempty"` + ProposedPayChInfo *PayChInfo `protobuf:"bytes,2,opt,name=proposedPayChInfo,proto3" json:"proposedPayChInfo,omitempty"` + Type SubPayChUpdatesResp_Notify_ChUpdateType `protobuf:"varint,3,opt,name=Type,proto3,enum=pb.SubPayChUpdatesResp_Notify_ChUpdateType" json:"Type,omitempty"` + Expiry int64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"` + Error *MsgError `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *SubPayChUpdatesResp_Notify) Reset() { + *x = SubPayChUpdatesResp_Notify{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubPayChUpdatesResp_Notify) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubPayChUpdatesResp_Notify) ProtoMessage() {} + +func (x *SubPayChUpdatesResp_Notify) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[52] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubPayChUpdatesResp_Notify.ProtoReflect.Descriptor instead. +func (*SubPayChUpdatesResp_Notify) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{31, 0} +} + +func (x *SubPayChUpdatesResp_Notify) GetUpdateID() string { + if x != nil { + return x.UpdateID + } + return "" +} + +func (x *SubPayChUpdatesResp_Notify) GetProposedPayChInfo() *PayChInfo { + if x != nil { + return x.ProposedPayChInfo + } + return nil +} + +func (x *SubPayChUpdatesResp_Notify) GetType() SubPayChUpdatesResp_Notify_ChUpdateType { + if x != nil { + return x.Type + } + return SubPayChUpdatesResp_Notify_open +} + +func (x *SubPayChUpdatesResp_Notify) GetExpiry() int64 { + if x != nil { + return x.Expiry + } + return 0 +} + +func (x *SubPayChUpdatesResp_Notify) GetError() *MsgError { + if x != nil { + return x.Error + } + return nil +} + +type UnsubPayChUpdatesResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *UnsubPayChUpdatesResp_MsgSuccess) Reset() { + *x = UnsubPayChUpdatesResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsubPayChUpdatesResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsubPayChUpdatesResp_MsgSuccess) ProtoMessage() {} + +func (x *UnsubPayChUpdatesResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[53] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsubPayChUpdatesResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*UnsubPayChUpdatesResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{33, 0} +} + +func (x *UnsubPayChUpdatesResp_MsgSuccess) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type RespondPayChUpdateResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UpdatedPayChInfo *PayChInfo `protobuf:"bytes,1,opt,name=updatedPayChInfo,proto3" json:"updatedPayChInfo,omitempty"` +} + +func (x *RespondPayChUpdateResp_MsgSuccess) Reset() { + *x = RespondPayChUpdateResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RespondPayChUpdateResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RespondPayChUpdateResp_MsgSuccess) ProtoMessage() {} + +func (x *RespondPayChUpdateResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[54] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RespondPayChUpdateResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*RespondPayChUpdateResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{35, 0} +} + +func (x *RespondPayChUpdateResp_MsgSuccess) GetUpdatedPayChInfo() *PayChInfo { + if x != nil { + return x.UpdatedPayChInfo + } + return nil +} + +type GetPayChInfoResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PayChInfo *PayChInfo `protobuf:"bytes,1,opt,name=payChInfo,proto3" json:"payChInfo,omitempty"` +} + +func (x *GetPayChInfoResp_MsgSuccess) Reset() { + *x = GetPayChInfoResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPayChInfoResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPayChInfoResp_MsgSuccess) ProtoMessage() {} + +func (x *GetPayChInfoResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[55] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPayChInfoResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*GetPayChInfoResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{37, 0} +} + +func (x *GetPayChInfoResp_MsgSuccess) GetPayChInfo() *PayChInfo { + if x != nil { + return x.PayChInfo + } + return nil +} + +type ClosePayChResp_MsgSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClosedPayChInfo *PayChInfo `protobuf:"bytes,1,opt,name=closedPayChInfo,proto3" json:"closedPayChInfo,omitempty"` +} + +func (x *ClosePayChResp_MsgSuccess) Reset() { + *x = ClosePayChResp_MsgSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_payment_service_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClosePayChResp_MsgSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClosePayChResp_MsgSuccess) ProtoMessage() {} + +func (x *ClosePayChResp_MsgSuccess) ProtoReflect() protoreflect.Message { + mi := &file_payment_service_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClosePayChResp_MsgSuccess.ProtoReflect.Descriptor instead. +func (*ClosePayChResp_MsgSuccess) Descriptor() ([]byte, []int) { + return file_payment_service_proto_rawDescGZIP(), []int{39, 0} +} + +func (x *ClosePayChResp_MsgSuccess) GetClosedPayChInfo() *PayChInfo { + if x != nil { + return x.ClosedPayChInfo + } + return nil +} + +var File_payment_service_proto protoreflect.FileDescriptor + +var file_payment_service_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0f, 0x6e, 0x6f, 0x64, + 0x65, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0e, 0x0a, 0x0c, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x22, 0xb9, 0x01, 0x0a, 0x0d, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0c, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x45, 0x54, 0x48, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x45, 0x54, 0x48, 0x12, 0x1c, + 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, + 0x69, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x0f, 0x4f, 0x70, 0x65, + 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0a, + 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x5b, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x12, 0x2f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x43, 0x68, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x43, 0x68, + 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x09, 0x0a, + 0x07, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x22, 0x1e, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x13, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1c, 0x0a, + 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x22, 0xb5, 0x01, 0x0a, 0x14, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, + 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x1a, 0x24, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x09, 0x0a, 0x07, 0x48, 0x65, 0x6c, 0x70, 0x52, 0x65, 0x71, 0x22, 0x1e, + 0x0a, 0x08, 0x48, 0x65, 0x6c, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x70, + 0x69, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x70, 0x69, 0x73, 0x22, 0x50, + 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x06, + 0x70, 0x65, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, + 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x44, + 0x22, 0xa9, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x50, + 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, + 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x26, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x0c, + 0x47, 0x65, 0x74, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, + 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x22, 0xb3, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, + 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x30, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, + 0x49, 0x44, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x44, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x50, + 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x33, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, + 0x42, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x70, 0x62, 0x2e, 0x42, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, + 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x68, + 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x44, 0x75, 0x72, 0x53, 0x65, 0x63, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x44, + 0x75, 0x72, 0x53, 0x65, 0x63, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x6e, 0x50, + 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, + 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x73, 0x70, 0x2e, + 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, + 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x45, + 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x0f, + 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, + 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x30, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x49, 0x44, 0x22, 0xce, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0a, 0x6d, 0x73, 0x67, + 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, + 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, + 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x1a, 0x43, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x12, 0x35, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, + 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, + 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x50, 0x61, + 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xa9, 0x02, 0x0a, 0x15, 0x53, + 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, + 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, + 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, + 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xa1, 0x01, 0x0a, 0x06, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x44, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, + 0x44, 0x12, 0x33, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x42, + 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x42, + 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, + 0x6e, 0x67, 0x65, 0x44, 0x75, 0x72, 0x53, 0x65, 0x63, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x10, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x44, 0x75, 0x72, 0x53, 0x65, + 0x63, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x0a, 0x16, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, + 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xbd, + 0x01, 0x0a, 0x17, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x0a, 0x6d, 0x73, + 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x26, 0x0a, 0x0a, 0x4d, 0x73, + 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, + 0x0a, 0x17, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x22, + 0xde, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0a, + 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, + 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, + 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, + 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x45, 0x0a, + 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x0f, 0x6f, + 0x70, 0x65, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, + 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x45, 0x0a, 0x0f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x43, 0x6c, 0x6f, 0x73, + 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, 0x0a, + 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x43, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x12, 0x35, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, 0x43, 0x68, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, + 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, + 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x13, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x22, 0xbb, 0x01, 0x0a, 0x14, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x73, 0x70, + 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, + 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, + 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, + 0x2a, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, + 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x50, + 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x12, + 0x27, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, + 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd6, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x6e, + 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x44, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, + 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, + 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x47, 0x0a, 0x0a, + 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x10, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, + 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x46, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x70, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x22, 0x93, 0x03, 0x0a, 0x13, 0x53, 0x75, + 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x38, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x79, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x1a, 0x8f, 0x02, 0x0a, 0x06, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x0a, 0x08, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x44, 0x12, 0x3b, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, + 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3f, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, + 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4e, 0x6f, 0x74, + 0x69, 0x66, 0x79, 0x2e, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x22, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x22, 0x2f, 0x0a, 0x0c, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, + 0x64, 0x10, 0x02, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x48, 0x0a, 0x14, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x22, 0xb9, 0x01, 0x0a, 0x15, 0x55, 0x6e, + 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, + 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, + 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x1a, 0x26, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7d, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, + 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, + 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x22, 0xdc, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, + 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x47, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, + 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x2e, + 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, + 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x47, + 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x10, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, + 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, + 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x43, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x22, 0xc2, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, + 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x39, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, + 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, + 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x70, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, + 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x0a, + 0x0d, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, + 0x22, 0xca, 0x01, 0x0a, 0x0e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, + 0x73, 0x65, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x45, 0x0a, 0x0a, 0x4d, 0x73, + 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x0f, 0x63, 0x6c, 0x6f, 0x73, + 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, + 0x6f, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x82, 0x0a, + 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x41, 0x50, 0x49, 0x12, 0x32, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x70, + 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, + 0x00, 0x12, 0x38, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x23, 0x0a, 0x04, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, + 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, + 0x12, 0x47, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x23, 0x0a, 0x04, 0x48, 0x65, 0x6c, + 0x70, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x0c, + 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x32, + 0x0a, 0x09, 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x12, 0x10, 0x2e, 0x70, 0x62, + 0x2e, 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, + 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x00, 0x12, 0x32, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x12, + 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, + 0x71, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x61, + 0x79, 0x43, 0x68, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x61, 0x79, + 0x43, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x50, + 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x2e, 0x70, 0x62, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x73, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x11, 0x53, 0x75, + 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, + 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x53, + 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x30, 0x01, 0x12, 0x50, 0x0a, 0x13, 0x55, 0x6e, 0x73, 0x75, + 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, + 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x70, 0x62, + 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x14, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, + 0x61, 0x79, 0x43, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x1a, + 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, + 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, + 0x3b, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x10, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, + 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, + 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, + 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0f, 0x53, + 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x16, + 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x70, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x50, + 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, + 0x00, 0x30, 0x01, 0x12, 0x4a, 0x0a, 0x11, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, + 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x6e, + 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x50, 0x61, 0x79, + 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, + 0x4d, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x64, 0x50, 0x61, 0x79, 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, + 0x43, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3b, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x13, + 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, 0x68, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x43, + 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x0a, 0x43, + 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x61, 0x79, 0x43, 0x68, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x43, + 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, + 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x61, 0x79, 0x43, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_payment_service_proto_rawDescOnce sync.Once + file_payment_service_proto_rawDescData = file_payment_service_proto_rawDesc +) + +func file_payment_service_proto_rawDescGZIP() []byte { + file_payment_service_proto_rawDescOnce.Do(func() { + file_payment_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_payment_service_proto_rawDescData) + }) + return file_payment_service_proto_rawDescData +} + +var file_payment_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_payment_service_proto_msgTypes = make([]protoimpl.MessageInfo, 57) +var file_payment_service_proto_goTypes = []interface{}{ + (SubPayChUpdatesResp_Notify_ChUpdateType)(0), // 0: pb.SubPayChUpdatesResp.Notify.ChUpdateType + (*GetConfigReq)(nil), // 1: pb.GetConfigReq + (*GetConfigResp)(nil), // 2: pb.GetConfigResp + (*OpenSessionReq)(nil), // 3: pb.OpenSessionReq + (*OpenSessionResp)(nil), // 4: pb.OpenSessionResp + (*TimeReq)(nil), // 5: pb.TimeReq + (*TimeResp)(nil), // 6: pb.TimeResp + (*RegisterCurrencyReq)(nil), // 7: pb.RegisterCurrencyReq + (*RegisterCurrencyResp)(nil), // 8: pb.RegisterCurrencyResp + (*HelpReq)(nil), // 9: pb.HelpReq + (*HelpResp)(nil), // 10: pb.HelpResp + (*AddPeerIDReq)(nil), // 11: pb.AddPeerIDReq + (*AddPeerIDResp)(nil), // 12: pb.AddPeerIDResp + (*GetPeerIDReq)(nil), // 13: pb.GetPeerIDReq + (*GetPeerIDResp)(nil), // 14: pb.GetPeerIDResp + (*OpenPayChReq)(nil), // 15: pb.OpenPayChReq + (*OpenPayChResp)(nil), // 16: pb.OpenPayChResp + (*GetPayChsInfoReq)(nil), // 17: pb.GetPayChsInfoReq + (*GetPayChsInfoResp)(nil), // 18: pb.GetPayChsInfoResp + (*SubPayChProposalsReq)(nil), // 19: pb.SubPayChProposalsReq + (*SubPayChProposalsResp)(nil), // 20: pb.SubPayChProposalsResp + (*UnsubPayChProposalsReq)(nil), // 21: pb.UnsubPayChProposalsReq + (*UnsubPayChProposalsResp)(nil), // 22: pb.UnsubPayChProposalsResp + (*RespondPayChProposalReq)(nil), // 23: pb.RespondPayChProposalReq + (*RespondPayChProposalResp)(nil), // 24: pb.RespondPayChProposalResp + (*CloseSessionReq)(nil), // 25: pb.CloseSessionReq + (*CloseSessionResp)(nil), // 26: pb.CloseSessionResp + (*DeployAssetERC20Req)(nil), // 27: pb.DeployAssetERC20Req + (*DeployAssetERC20Resp)(nil), // 28: pb.DeployAssetERC20Resp + (*SendPayChUpdateReq)(nil), // 29: pb.SendPayChUpdateReq + (*SendPayChUpdateResp)(nil), // 30: pb.SendPayChUpdateResp + (*SubpayChUpdatesReq)(nil), // 31: pb.SubpayChUpdatesReq + (*SubPayChUpdatesResp)(nil), // 32: pb.SubPayChUpdatesResp + (*UnsubPayChUpdatesReq)(nil), // 33: pb.UnsubPayChUpdatesReq + (*UnsubPayChUpdatesResp)(nil), // 34: pb.UnsubPayChUpdatesResp + (*RespondPayChUpdateReq)(nil), // 35: pb.RespondPayChUpdateReq + (*RespondPayChUpdateResp)(nil), // 36: pb.RespondPayChUpdateResp + (*GetPayChInfoReq)(nil), // 37: pb.GetPayChInfoReq + (*GetPayChInfoResp)(nil), // 38: pb.GetPayChInfoResp + (*ClosePayChReq)(nil), // 39: pb.ClosePayChReq + (*ClosePayChResp)(nil), // 40: pb.ClosePayChResp + (*OpenSessionResp_MsgSuccess)(nil), // 41: pb.OpenSessionResp.MsgSuccess + (*RegisterCurrencyResp_MsgSuccess)(nil), // 42: pb.RegisterCurrencyResp.MsgSuccess + (*AddPeerIDResp_MsgSuccess)(nil), // 43: pb.AddPeerIDResp.MsgSuccess + (*GetPeerIDResp_MsgSuccess)(nil), // 44: pb.GetPeerIDResp.MsgSuccess + (*OpenPayChResp_MsgSuccess)(nil), // 45: pb.OpenPayChResp.MsgSuccess + (*GetPayChsInfoResp_MsgSuccess)(nil), // 46: pb.GetPayChsInfoResp.MsgSuccess + (*SubPayChProposalsResp_Notify)(nil), // 47: pb.SubPayChProposalsResp.Notify + (*UnsubPayChProposalsResp_MsgSuccess)(nil), // 48: pb.UnsubPayChProposalsResp.MsgSuccess + (*RespondPayChProposalResp_MsgSuccess)(nil), // 49: pb.RespondPayChProposalResp.MsgSuccess + (*CloseSessionResp_MsgSuccess)(nil), // 50: pb.CloseSessionResp.MsgSuccess + (*DeployAssetERC20Resp_MsgSuccess)(nil), // 51: pb.DeployAssetERC20Resp.MsgSuccess + (*SendPayChUpdateResp_MsgSuccess)(nil), // 52: pb.SendPayChUpdateResp.MsgSuccess + (*SubPayChUpdatesResp_Notify)(nil), // 53: pb.SubPayChUpdatesResp.Notify + (*UnsubPayChUpdatesResp_MsgSuccess)(nil), // 54: pb.UnsubPayChUpdatesResp.MsgSuccess + (*RespondPayChUpdateResp_MsgSuccess)(nil), // 55: pb.RespondPayChUpdateResp.MsgSuccess + (*GetPayChInfoResp_MsgSuccess)(nil), // 56: pb.GetPayChInfoResp.MsgSuccess + (*ClosePayChResp_MsgSuccess)(nil), // 57: pb.ClosePayChResp.MsgSuccess + (*MsgError)(nil), // 58: pb.MsgError + (*PeerID)(nil), // 59: pb.PeerID + (*BalInfo)(nil), // 60: pb.BalInfo + (*Payment)(nil), // 61: pb.Payment + (*PayChInfo)(nil), // 62: pb.PayChInfo +} +var file_payment_service_proto_depIdxs = []int32{ + 41, // 0: pb.OpenSessionResp.msgSuccess:type_name -> pb.OpenSessionResp.MsgSuccess + 58, // 1: pb.OpenSessionResp.error:type_name -> pb.MsgError + 42, // 2: pb.RegisterCurrencyResp.msgSuccess:type_name -> pb.RegisterCurrencyResp.MsgSuccess + 58, // 3: pb.RegisterCurrencyResp.error:type_name -> pb.MsgError + 59, // 4: pb.AddPeerIDReq.peerID:type_name -> pb.PeerID + 43, // 5: pb.AddPeerIDResp.msgSuccess:type_name -> pb.AddPeerIDResp.MsgSuccess + 58, // 6: pb.AddPeerIDResp.error:type_name -> pb.MsgError + 44, // 7: pb.GetPeerIDResp.msgSuccess:type_name -> pb.GetPeerIDResp.MsgSuccess + 58, // 8: pb.GetPeerIDResp.error:type_name -> pb.MsgError + 60, // 9: pb.OpenPayChReq.openingBalInfo:type_name -> pb.BalInfo + 45, // 10: pb.OpenPayChResp.msgSuccess:type_name -> pb.OpenPayChResp.MsgSuccess + 58, // 11: pb.OpenPayChResp.error:type_name -> pb.MsgError + 46, // 12: pb.GetPayChsInfoResp.msgSuccess:type_name -> pb.GetPayChsInfoResp.MsgSuccess + 58, // 13: pb.GetPayChsInfoResp.error:type_name -> pb.MsgError + 47, // 14: pb.SubPayChProposalsResp.notify:type_name -> pb.SubPayChProposalsResp.Notify + 58, // 15: pb.SubPayChProposalsResp.error:type_name -> pb.MsgError + 48, // 16: pb.UnsubPayChProposalsResp.msgSuccess:type_name -> pb.UnsubPayChProposalsResp.MsgSuccess + 58, // 17: pb.UnsubPayChProposalsResp.error:type_name -> pb.MsgError + 49, // 18: pb.RespondPayChProposalResp.msgSuccess:type_name -> pb.RespondPayChProposalResp.MsgSuccess + 58, // 19: pb.RespondPayChProposalResp.error:type_name -> pb.MsgError + 50, // 20: pb.CloseSessionResp.msgSuccess:type_name -> pb.CloseSessionResp.MsgSuccess + 58, // 21: pb.CloseSessionResp.error:type_name -> pb.MsgError + 51, // 22: pb.DeployAssetERC20Resp.msgSuccess:type_name -> pb.DeployAssetERC20Resp.MsgSuccess + 58, // 23: pb.DeployAssetERC20Resp.error:type_name -> pb.MsgError + 61, // 24: pb.SendPayChUpdateReq.payments:type_name -> pb.Payment + 52, // 25: pb.SendPayChUpdateResp.msgSuccess:type_name -> pb.SendPayChUpdateResp.MsgSuccess + 58, // 26: pb.SendPayChUpdateResp.error:type_name -> pb.MsgError + 53, // 27: pb.SubPayChUpdatesResp.notify:type_name -> pb.SubPayChUpdatesResp.Notify + 58, // 28: pb.SubPayChUpdatesResp.error:type_name -> pb.MsgError + 54, // 29: pb.UnsubPayChUpdatesResp.msgSuccess:type_name -> pb.UnsubPayChUpdatesResp.MsgSuccess + 58, // 30: pb.UnsubPayChUpdatesResp.error:type_name -> pb.MsgError + 55, // 31: pb.RespondPayChUpdateResp.msgSuccess:type_name -> pb.RespondPayChUpdateResp.MsgSuccess + 58, // 32: pb.RespondPayChUpdateResp.error:type_name -> pb.MsgError + 56, // 33: pb.GetPayChInfoResp.msgSuccess:type_name -> pb.GetPayChInfoResp.MsgSuccess + 58, // 34: pb.GetPayChInfoResp.error:type_name -> pb.MsgError + 57, // 35: pb.ClosePayChResp.msgSuccess:type_name -> pb.ClosePayChResp.MsgSuccess + 58, // 36: pb.ClosePayChResp.error:type_name -> pb.MsgError + 62, // 37: pb.OpenSessionResp.MsgSuccess.restoredChs:type_name -> pb.PayChInfo + 59, // 38: pb.GetPeerIDResp.MsgSuccess.peerID:type_name -> pb.PeerID + 62, // 39: pb.OpenPayChResp.MsgSuccess.openedPayChInfo:type_name -> pb.PayChInfo + 62, // 40: pb.GetPayChsInfoResp.MsgSuccess.openPayChsInfo:type_name -> pb.PayChInfo + 60, // 41: pb.SubPayChProposalsResp.Notify.openingBalInfo:type_name -> pb.BalInfo + 62, // 42: pb.RespondPayChProposalResp.MsgSuccess.openedPayChInfo:type_name -> pb.PayChInfo + 62, // 43: pb.CloseSessionResp.MsgSuccess.openPayChsInfo:type_name -> pb.PayChInfo + 62, // 44: pb.SendPayChUpdateResp.MsgSuccess.updatedPayChInfo:type_name -> pb.PayChInfo + 62, // 45: pb.SubPayChUpdatesResp.Notify.proposedPayChInfo:type_name -> pb.PayChInfo + 0, // 46: pb.SubPayChUpdatesResp.Notify.Type:type_name -> pb.SubPayChUpdatesResp.Notify.ChUpdateType + 58, // 47: pb.SubPayChUpdatesResp.Notify.error:type_name -> pb.MsgError + 62, // 48: pb.RespondPayChUpdateResp.MsgSuccess.updatedPayChInfo:type_name -> pb.PayChInfo + 62, // 49: pb.GetPayChInfoResp.MsgSuccess.payChInfo:type_name -> pb.PayChInfo + 62, // 50: pb.ClosePayChResp.MsgSuccess.closedPayChInfo:type_name -> pb.PayChInfo + 1, // 51: pb.Payment_API.GetConfig:input_type -> pb.GetConfigReq + 3, // 52: pb.Payment_API.OpenSession:input_type -> pb.OpenSessionReq + 5, // 53: pb.Payment_API.Time:input_type -> pb.TimeReq + 7, // 54: pb.Payment_API.RegisterCurrency:input_type -> pb.RegisterCurrencyReq + 9, // 55: pb.Payment_API.Help:input_type -> pb.HelpReq + 11, // 56: pb.Payment_API.AddPeerID:input_type -> pb.AddPeerIDReq + 13, // 57: pb.Payment_API.GetPeerID:input_type -> pb.GetPeerIDReq + 15, // 58: pb.Payment_API.OpenPayCh:input_type -> pb.OpenPayChReq + 17, // 59: pb.Payment_API.GetPayChsInfo:input_type -> pb.GetPayChsInfoReq + 19, // 60: pb.Payment_API.SubPayChProposals:input_type -> pb.SubPayChProposalsReq + 21, // 61: pb.Payment_API.UnsubPayChProposals:input_type -> pb.UnsubPayChProposalsReq + 23, // 62: pb.Payment_API.RespondPayChProposal:input_type -> pb.RespondPayChProposalReq + 25, // 63: pb.Payment_API.CloseSession:input_type -> pb.CloseSessionReq + 27, // 64: pb.Payment_API.DeployAssetERC20:input_type -> pb.DeployAssetERC20Req + 29, // 65: pb.Payment_API.SendPayChUpdate:input_type -> pb.SendPayChUpdateReq + 31, // 66: pb.Payment_API.SubPayChUpdates:input_type -> pb.SubpayChUpdatesReq + 33, // 67: pb.Payment_API.UnsubPayChUpdates:input_type -> pb.UnsubPayChUpdatesReq + 35, // 68: pb.Payment_API.RespondPayChUpdate:input_type -> pb.RespondPayChUpdateReq + 37, // 69: pb.Payment_API.GetPayChInfo:input_type -> pb.GetPayChInfoReq + 39, // 70: pb.Payment_API.ClosePayCh:input_type -> pb.ClosePayChReq + 2, // 71: pb.Payment_API.GetConfig:output_type -> pb.GetConfigResp + 4, // 72: pb.Payment_API.OpenSession:output_type -> pb.OpenSessionResp + 6, // 73: pb.Payment_API.Time:output_type -> pb.TimeResp + 8, // 74: pb.Payment_API.RegisterCurrency:output_type -> pb.RegisterCurrencyResp + 10, // 75: pb.Payment_API.Help:output_type -> pb.HelpResp + 12, // 76: pb.Payment_API.AddPeerID:output_type -> pb.AddPeerIDResp + 14, // 77: pb.Payment_API.GetPeerID:output_type -> pb.GetPeerIDResp + 16, // 78: pb.Payment_API.OpenPayCh:output_type -> pb.OpenPayChResp + 18, // 79: pb.Payment_API.GetPayChsInfo:output_type -> pb.GetPayChsInfoResp + 20, // 80: pb.Payment_API.SubPayChProposals:output_type -> pb.SubPayChProposalsResp + 22, // 81: pb.Payment_API.UnsubPayChProposals:output_type -> pb.UnsubPayChProposalsResp + 24, // 82: pb.Payment_API.RespondPayChProposal:output_type -> pb.RespondPayChProposalResp + 26, // 83: pb.Payment_API.CloseSession:output_type -> pb.CloseSessionResp + 28, // 84: pb.Payment_API.DeployAssetERC20:output_type -> pb.DeployAssetERC20Resp + 30, // 85: pb.Payment_API.SendPayChUpdate:output_type -> pb.SendPayChUpdateResp + 32, // 86: pb.Payment_API.SubPayChUpdates:output_type -> pb.SubPayChUpdatesResp + 34, // 87: pb.Payment_API.UnsubPayChUpdates:output_type -> pb.UnsubPayChUpdatesResp + 36, // 88: pb.Payment_API.RespondPayChUpdate:output_type -> pb.RespondPayChUpdateResp + 38, // 89: pb.Payment_API.GetPayChInfo:output_type -> pb.GetPayChInfoResp + 40, // 90: pb.Payment_API.ClosePayCh:output_type -> pb.ClosePayChResp + 71, // [71:91] is the sub-list for method output_type + 51, // [51:71] is the sub-list for method input_type + 51, // [51:51] is the sub-list for extension type_name + 51, // [51:51] is the sub-list for extension extendee + 0, // [0:51] is the sub-list for field type_name +} + +func init() { file_payment_service_proto_init() } +func file_payment_service_proto_init() { + if File_payment_service_proto != nil { + return + } + file_nodetypes_proto_init() + file_errors_proto_init() + if !protoimpl.UnsafeEnabled { + file_payment_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetConfigReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetConfigResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenSessionReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenSessionResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimeResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterCurrencyReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterCurrencyResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HelpReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HelpResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddPeerIDReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddPeerIDResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPeerIDReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPeerIDResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenPayChReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenPayChResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPayChsInfoReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPayChsInfoResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubPayChProposalsReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubPayChProposalsResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsubPayChProposalsReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsubPayChProposalsResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RespondPayChProposalReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RespondPayChProposalResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloseSessionReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloseSessionResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployAssetERC20Req); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployAssetERC20Resp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendPayChUpdateReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendPayChUpdateResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubpayChUpdatesReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubPayChUpdatesResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsubPayChUpdatesReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsubPayChUpdatesResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RespondPayChUpdateReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RespondPayChUpdateResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPayChInfoReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPayChInfoResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClosePayChReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClosePayChResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenSessionResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterCurrencyResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddPeerIDResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPeerIDResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenPayChResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPayChsInfoResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubPayChProposalsResp_Notify); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsubPayChProposalsResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RespondPayChProposalResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloseSessionResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployAssetERC20Resp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendPayChUpdateResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubPayChUpdatesResp_Notify); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsubPayChUpdatesResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RespondPayChUpdateResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPayChInfoResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_payment_service_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClosePayChResp_MsgSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_payment_service_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*OpenSessionResp_MsgSuccess_)(nil), + (*OpenSessionResp_Error)(nil), + } + file_payment_service_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*RegisterCurrencyResp_MsgSuccess_)(nil), + (*RegisterCurrencyResp_Error)(nil), + } + file_payment_service_proto_msgTypes[11].OneofWrappers = []interface{}{ + (*AddPeerIDResp_MsgSuccess_)(nil), + (*AddPeerIDResp_Error)(nil), + } + file_payment_service_proto_msgTypes[13].OneofWrappers = []interface{}{ + (*GetPeerIDResp_MsgSuccess_)(nil), + (*GetPeerIDResp_Error)(nil), + } + file_payment_service_proto_msgTypes[15].OneofWrappers = []interface{}{ + (*OpenPayChResp_MsgSuccess_)(nil), + (*OpenPayChResp_Error)(nil), + } + file_payment_service_proto_msgTypes[17].OneofWrappers = []interface{}{ + (*GetPayChsInfoResp_MsgSuccess_)(nil), + (*GetPayChsInfoResp_Error)(nil), + } + file_payment_service_proto_msgTypes[19].OneofWrappers = []interface{}{ + (*SubPayChProposalsResp_Notify_)(nil), + (*SubPayChProposalsResp_Error)(nil), + } + file_payment_service_proto_msgTypes[21].OneofWrappers = []interface{}{ + (*UnsubPayChProposalsResp_MsgSuccess_)(nil), + (*UnsubPayChProposalsResp_Error)(nil), + } + file_payment_service_proto_msgTypes[23].OneofWrappers = []interface{}{ + (*RespondPayChProposalResp_MsgSuccess_)(nil), + (*RespondPayChProposalResp_Error)(nil), + } + file_payment_service_proto_msgTypes[25].OneofWrappers = []interface{}{ + (*CloseSessionResp_MsgSuccess_)(nil), + (*CloseSessionResp_Error)(nil), + } + file_payment_service_proto_msgTypes[27].OneofWrappers = []interface{}{ + (*DeployAssetERC20Resp_MsgSuccess_)(nil), + (*DeployAssetERC20Resp_Error)(nil), + } + file_payment_service_proto_msgTypes[29].OneofWrappers = []interface{}{ + (*SendPayChUpdateResp_MsgSuccess_)(nil), + (*SendPayChUpdateResp_Error)(nil), + } + file_payment_service_proto_msgTypes[31].OneofWrappers = []interface{}{ + (*SubPayChUpdatesResp_Notify_)(nil), + (*SubPayChUpdatesResp_Error)(nil), + } + file_payment_service_proto_msgTypes[33].OneofWrappers = []interface{}{ + (*UnsubPayChUpdatesResp_MsgSuccess_)(nil), + (*UnsubPayChUpdatesResp_Error)(nil), + } + file_payment_service_proto_msgTypes[35].OneofWrappers = []interface{}{ + (*RespondPayChUpdateResp_MsgSuccess_)(nil), + (*RespondPayChUpdateResp_Error)(nil), + } + file_payment_service_proto_msgTypes[37].OneofWrappers = []interface{}{ + (*GetPayChInfoResp_MsgSuccess_)(nil), + (*GetPayChInfoResp_Error)(nil), + } + file_payment_service_proto_msgTypes[39].OneofWrappers = []interface{}{ + (*ClosePayChResp_MsgSuccess_)(nil), + (*ClosePayChResp_Error)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_payment_service_proto_rawDesc, + NumEnums: 1, + NumMessages: 57, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_payment_service_proto_goTypes, + DependencyIndexes: file_payment_service_proto_depIdxs, + EnumInfos: file_payment_service_proto_enumTypes, + MessageInfos: file_payment_service_proto_msgTypes, + }.Build() + File_payment_service_proto = out.File + file_payment_service_proto_rawDesc = nil + file_payment_service_proto_goTypes = nil + file_payment_service_proto_depIdxs = nil +} diff --git a/api/grpc/pb/payment_service_grpc.pb.go b/api/grpc/pb/payment_service_grpc.pb.go new file mode 100644 index 00000000..0a49e56d --- /dev/null +++ b/api/grpc/pb/payment_service_grpc.pb.go @@ -0,0 +1,886 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.23.3 +// source: payment_service.proto + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. + +package pb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Payment_API_GetConfig_FullMethodName = "/pb.Payment_API/GetConfig" + Payment_API_OpenSession_FullMethodName = "/pb.Payment_API/OpenSession" + Payment_API_Time_FullMethodName = "/pb.Payment_API/Time" + Payment_API_RegisterCurrency_FullMethodName = "/pb.Payment_API/RegisterCurrency" + Payment_API_Help_FullMethodName = "/pb.Payment_API/Help" + Payment_API_AddPeerID_FullMethodName = "/pb.Payment_API/AddPeerID" + Payment_API_GetPeerID_FullMethodName = "/pb.Payment_API/GetPeerID" + Payment_API_OpenPayCh_FullMethodName = "/pb.Payment_API/OpenPayCh" + Payment_API_GetPayChsInfo_FullMethodName = "/pb.Payment_API/GetPayChsInfo" + Payment_API_SubPayChProposals_FullMethodName = "/pb.Payment_API/SubPayChProposals" + Payment_API_UnsubPayChProposals_FullMethodName = "/pb.Payment_API/UnsubPayChProposals" + Payment_API_RespondPayChProposal_FullMethodName = "/pb.Payment_API/RespondPayChProposal" + Payment_API_CloseSession_FullMethodName = "/pb.Payment_API/CloseSession" + Payment_API_DeployAssetERC20_FullMethodName = "/pb.Payment_API/DeployAssetERC20" + Payment_API_SendPayChUpdate_FullMethodName = "/pb.Payment_API/SendPayChUpdate" + Payment_API_SubPayChUpdates_FullMethodName = "/pb.Payment_API/SubPayChUpdates" + Payment_API_UnsubPayChUpdates_FullMethodName = "/pb.Payment_API/UnsubPayChUpdates" + Payment_API_RespondPayChUpdate_FullMethodName = "/pb.Payment_API/RespondPayChUpdate" + Payment_API_GetPayChInfo_FullMethodName = "/pb.Payment_API/GetPayChInfo" + Payment_API_ClosePayCh_FullMethodName = "/pb.Payment_API/ClosePayCh" +) + +// Payment_APIClient is the client API for Payment_API service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type Payment_APIClient interface { + GetConfig(ctx context.Context, in *GetConfigReq, opts ...grpc.CallOption) (*GetConfigResp, error) + OpenSession(ctx context.Context, in *OpenSessionReq, opts ...grpc.CallOption) (*OpenSessionResp, error) + Time(ctx context.Context, in *TimeReq, opts ...grpc.CallOption) (*TimeResp, error) + RegisterCurrency(ctx context.Context, in *RegisterCurrencyReq, opts ...grpc.CallOption) (*RegisterCurrencyResp, error) + Help(ctx context.Context, in *HelpReq, opts ...grpc.CallOption) (*HelpResp, error) + AddPeerID(ctx context.Context, in *AddPeerIDReq, opts ...grpc.CallOption) (*AddPeerIDResp, error) + GetPeerID(ctx context.Context, in *GetPeerIDReq, opts ...grpc.CallOption) (*GetPeerIDResp, error) + OpenPayCh(ctx context.Context, in *OpenPayChReq, opts ...grpc.CallOption) (*OpenPayChResp, error) + GetPayChsInfo(ctx context.Context, in *GetPayChsInfoReq, opts ...grpc.CallOption) (*GetPayChsInfoResp, error) + SubPayChProposals(ctx context.Context, in *SubPayChProposalsReq, opts ...grpc.CallOption) (Payment_API_SubPayChProposalsClient, error) + UnsubPayChProposals(ctx context.Context, in *UnsubPayChProposalsReq, opts ...grpc.CallOption) (*UnsubPayChProposalsResp, error) + RespondPayChProposal(ctx context.Context, in *RespondPayChProposalReq, opts ...grpc.CallOption) (*RespondPayChProposalResp, error) + CloseSession(ctx context.Context, in *CloseSessionReq, opts ...grpc.CallOption) (*CloseSessionResp, error) + DeployAssetERC20(ctx context.Context, in *DeployAssetERC20Req, opts ...grpc.CallOption) (*DeployAssetERC20Resp, error) + SendPayChUpdate(ctx context.Context, in *SendPayChUpdateReq, opts ...grpc.CallOption) (*SendPayChUpdateResp, error) + SubPayChUpdates(ctx context.Context, in *SubpayChUpdatesReq, opts ...grpc.CallOption) (Payment_API_SubPayChUpdatesClient, error) + UnsubPayChUpdates(ctx context.Context, in *UnsubPayChUpdatesReq, opts ...grpc.CallOption) (*UnsubPayChUpdatesResp, error) + RespondPayChUpdate(ctx context.Context, in *RespondPayChUpdateReq, opts ...grpc.CallOption) (*RespondPayChUpdateResp, error) + GetPayChInfo(ctx context.Context, in *GetPayChInfoReq, opts ...grpc.CallOption) (*GetPayChInfoResp, error) + ClosePayCh(ctx context.Context, in *ClosePayChReq, opts ...grpc.CallOption) (*ClosePayChResp, error) +} + +type payment_APIClient struct { + cc grpc.ClientConnInterface +} + +func NewPayment_APIClient(cc grpc.ClientConnInterface) Payment_APIClient { + return &payment_APIClient{cc} +} + +func (c *payment_APIClient) GetConfig(ctx context.Context, in *GetConfigReq, opts ...grpc.CallOption) (*GetConfigResp, error) { + out := new(GetConfigResp) + err := c.cc.Invoke(ctx, Payment_API_GetConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) OpenSession(ctx context.Context, in *OpenSessionReq, opts ...grpc.CallOption) (*OpenSessionResp, error) { + out := new(OpenSessionResp) + err := c.cc.Invoke(ctx, Payment_API_OpenSession_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) Time(ctx context.Context, in *TimeReq, opts ...grpc.CallOption) (*TimeResp, error) { + out := new(TimeResp) + err := c.cc.Invoke(ctx, Payment_API_Time_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) RegisterCurrency(ctx context.Context, in *RegisterCurrencyReq, opts ...grpc.CallOption) (*RegisterCurrencyResp, error) { + out := new(RegisterCurrencyResp) + err := c.cc.Invoke(ctx, Payment_API_RegisterCurrency_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) Help(ctx context.Context, in *HelpReq, opts ...grpc.CallOption) (*HelpResp, error) { + out := new(HelpResp) + err := c.cc.Invoke(ctx, Payment_API_Help_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) AddPeerID(ctx context.Context, in *AddPeerIDReq, opts ...grpc.CallOption) (*AddPeerIDResp, error) { + out := new(AddPeerIDResp) + err := c.cc.Invoke(ctx, Payment_API_AddPeerID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) GetPeerID(ctx context.Context, in *GetPeerIDReq, opts ...grpc.CallOption) (*GetPeerIDResp, error) { + out := new(GetPeerIDResp) + err := c.cc.Invoke(ctx, Payment_API_GetPeerID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) OpenPayCh(ctx context.Context, in *OpenPayChReq, opts ...grpc.CallOption) (*OpenPayChResp, error) { + out := new(OpenPayChResp) + err := c.cc.Invoke(ctx, Payment_API_OpenPayCh_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) GetPayChsInfo(ctx context.Context, in *GetPayChsInfoReq, opts ...grpc.CallOption) (*GetPayChsInfoResp, error) { + out := new(GetPayChsInfoResp) + err := c.cc.Invoke(ctx, Payment_API_GetPayChsInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) SubPayChProposals(ctx context.Context, in *SubPayChProposalsReq, opts ...grpc.CallOption) (Payment_API_SubPayChProposalsClient, error) { + stream, err := c.cc.NewStream(ctx, &Payment_API_ServiceDesc.Streams[0], Payment_API_SubPayChProposals_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &payment_APISubPayChProposalsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Payment_API_SubPayChProposalsClient interface { + Recv() (*SubPayChProposalsResp, error) + grpc.ClientStream +} + +type payment_APISubPayChProposalsClient struct { + grpc.ClientStream +} + +func (x *payment_APISubPayChProposalsClient) Recv() (*SubPayChProposalsResp, error) { + m := new(SubPayChProposalsResp) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *payment_APIClient) UnsubPayChProposals(ctx context.Context, in *UnsubPayChProposalsReq, opts ...grpc.CallOption) (*UnsubPayChProposalsResp, error) { + out := new(UnsubPayChProposalsResp) + err := c.cc.Invoke(ctx, Payment_API_UnsubPayChProposals_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) RespondPayChProposal(ctx context.Context, in *RespondPayChProposalReq, opts ...grpc.CallOption) (*RespondPayChProposalResp, error) { + out := new(RespondPayChProposalResp) + err := c.cc.Invoke(ctx, Payment_API_RespondPayChProposal_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) CloseSession(ctx context.Context, in *CloseSessionReq, opts ...grpc.CallOption) (*CloseSessionResp, error) { + out := new(CloseSessionResp) + err := c.cc.Invoke(ctx, Payment_API_CloseSession_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) DeployAssetERC20(ctx context.Context, in *DeployAssetERC20Req, opts ...grpc.CallOption) (*DeployAssetERC20Resp, error) { + out := new(DeployAssetERC20Resp) + err := c.cc.Invoke(ctx, Payment_API_DeployAssetERC20_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) SendPayChUpdate(ctx context.Context, in *SendPayChUpdateReq, opts ...grpc.CallOption) (*SendPayChUpdateResp, error) { + out := new(SendPayChUpdateResp) + err := c.cc.Invoke(ctx, Payment_API_SendPayChUpdate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) SubPayChUpdates(ctx context.Context, in *SubpayChUpdatesReq, opts ...grpc.CallOption) (Payment_API_SubPayChUpdatesClient, error) { + stream, err := c.cc.NewStream(ctx, &Payment_API_ServiceDesc.Streams[1], Payment_API_SubPayChUpdates_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &payment_APISubPayChUpdatesClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Payment_API_SubPayChUpdatesClient interface { + Recv() (*SubPayChUpdatesResp, error) + grpc.ClientStream +} + +type payment_APISubPayChUpdatesClient struct { + grpc.ClientStream +} + +func (x *payment_APISubPayChUpdatesClient) Recv() (*SubPayChUpdatesResp, error) { + m := new(SubPayChUpdatesResp) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *payment_APIClient) UnsubPayChUpdates(ctx context.Context, in *UnsubPayChUpdatesReq, opts ...grpc.CallOption) (*UnsubPayChUpdatesResp, error) { + out := new(UnsubPayChUpdatesResp) + err := c.cc.Invoke(ctx, Payment_API_UnsubPayChUpdates_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) RespondPayChUpdate(ctx context.Context, in *RespondPayChUpdateReq, opts ...grpc.CallOption) (*RespondPayChUpdateResp, error) { + out := new(RespondPayChUpdateResp) + err := c.cc.Invoke(ctx, Payment_API_RespondPayChUpdate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) GetPayChInfo(ctx context.Context, in *GetPayChInfoReq, opts ...grpc.CallOption) (*GetPayChInfoResp, error) { + out := new(GetPayChInfoResp) + err := c.cc.Invoke(ctx, Payment_API_GetPayChInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *payment_APIClient) ClosePayCh(ctx context.Context, in *ClosePayChReq, opts ...grpc.CallOption) (*ClosePayChResp, error) { + out := new(ClosePayChResp) + err := c.cc.Invoke(ctx, Payment_API_ClosePayCh_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Payment_APIServer is the server API for Payment_API service. +// All implementations must embed UnimplementedPayment_APIServer +// for forward compatibility +type Payment_APIServer interface { + GetConfig(context.Context, *GetConfigReq) (*GetConfigResp, error) + OpenSession(context.Context, *OpenSessionReq) (*OpenSessionResp, error) + Time(context.Context, *TimeReq) (*TimeResp, error) + RegisterCurrency(context.Context, *RegisterCurrencyReq) (*RegisterCurrencyResp, error) + Help(context.Context, *HelpReq) (*HelpResp, error) + AddPeerID(context.Context, *AddPeerIDReq) (*AddPeerIDResp, error) + GetPeerID(context.Context, *GetPeerIDReq) (*GetPeerIDResp, error) + OpenPayCh(context.Context, *OpenPayChReq) (*OpenPayChResp, error) + GetPayChsInfo(context.Context, *GetPayChsInfoReq) (*GetPayChsInfoResp, error) + SubPayChProposals(*SubPayChProposalsReq, Payment_API_SubPayChProposalsServer) error + UnsubPayChProposals(context.Context, *UnsubPayChProposalsReq) (*UnsubPayChProposalsResp, error) + RespondPayChProposal(context.Context, *RespondPayChProposalReq) (*RespondPayChProposalResp, error) + CloseSession(context.Context, *CloseSessionReq) (*CloseSessionResp, error) + DeployAssetERC20(context.Context, *DeployAssetERC20Req) (*DeployAssetERC20Resp, error) + SendPayChUpdate(context.Context, *SendPayChUpdateReq) (*SendPayChUpdateResp, error) + SubPayChUpdates(*SubpayChUpdatesReq, Payment_API_SubPayChUpdatesServer) error + UnsubPayChUpdates(context.Context, *UnsubPayChUpdatesReq) (*UnsubPayChUpdatesResp, error) + RespondPayChUpdate(context.Context, *RespondPayChUpdateReq) (*RespondPayChUpdateResp, error) + GetPayChInfo(context.Context, *GetPayChInfoReq) (*GetPayChInfoResp, error) + ClosePayCh(context.Context, *ClosePayChReq) (*ClosePayChResp, error) + mustEmbedUnimplementedPayment_APIServer() +} + +// UnimplementedPayment_APIServer must be embedded to have forward compatible implementations. +type UnimplementedPayment_APIServer struct { +} + +func (UnimplementedPayment_APIServer) GetConfig(context.Context, *GetConfigReq) (*GetConfigResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented") +} +func (UnimplementedPayment_APIServer) OpenSession(context.Context, *OpenSessionReq) (*OpenSessionResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method OpenSession not implemented") +} +func (UnimplementedPayment_APIServer) Time(context.Context, *TimeReq) (*TimeResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Time not implemented") +} +func (UnimplementedPayment_APIServer) RegisterCurrency(context.Context, *RegisterCurrencyReq) (*RegisterCurrencyResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterCurrency not implemented") +} +func (UnimplementedPayment_APIServer) Help(context.Context, *HelpReq) (*HelpResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Help not implemented") +} +func (UnimplementedPayment_APIServer) AddPeerID(context.Context, *AddPeerIDReq) (*AddPeerIDResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddPeerID not implemented") +} +func (UnimplementedPayment_APIServer) GetPeerID(context.Context, *GetPeerIDReq) (*GetPeerIDResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPeerID not implemented") +} +func (UnimplementedPayment_APIServer) OpenPayCh(context.Context, *OpenPayChReq) (*OpenPayChResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method OpenPayCh not implemented") +} +func (UnimplementedPayment_APIServer) GetPayChsInfo(context.Context, *GetPayChsInfoReq) (*GetPayChsInfoResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPayChsInfo not implemented") +} +func (UnimplementedPayment_APIServer) SubPayChProposals(*SubPayChProposalsReq, Payment_API_SubPayChProposalsServer) error { + return status.Errorf(codes.Unimplemented, "method SubPayChProposals not implemented") +} +func (UnimplementedPayment_APIServer) UnsubPayChProposals(context.Context, *UnsubPayChProposalsReq) (*UnsubPayChProposalsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnsubPayChProposals not implemented") +} +func (UnimplementedPayment_APIServer) RespondPayChProposal(context.Context, *RespondPayChProposalReq) (*RespondPayChProposalResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method RespondPayChProposal not implemented") +} +func (UnimplementedPayment_APIServer) CloseSession(context.Context, *CloseSessionReq) (*CloseSessionResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseSession not implemented") +} +func (UnimplementedPayment_APIServer) DeployAssetERC20(context.Context, *DeployAssetERC20Req) (*DeployAssetERC20Resp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeployAssetERC20 not implemented") +} +func (UnimplementedPayment_APIServer) SendPayChUpdate(context.Context, *SendPayChUpdateReq) (*SendPayChUpdateResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendPayChUpdate not implemented") +} +func (UnimplementedPayment_APIServer) SubPayChUpdates(*SubpayChUpdatesReq, Payment_API_SubPayChUpdatesServer) error { + return status.Errorf(codes.Unimplemented, "method SubPayChUpdates not implemented") +} +func (UnimplementedPayment_APIServer) UnsubPayChUpdates(context.Context, *UnsubPayChUpdatesReq) (*UnsubPayChUpdatesResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnsubPayChUpdates not implemented") +} +func (UnimplementedPayment_APIServer) RespondPayChUpdate(context.Context, *RespondPayChUpdateReq) (*RespondPayChUpdateResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method RespondPayChUpdate not implemented") +} +func (UnimplementedPayment_APIServer) GetPayChInfo(context.Context, *GetPayChInfoReq) (*GetPayChInfoResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPayChInfo not implemented") +} +func (UnimplementedPayment_APIServer) ClosePayCh(context.Context, *ClosePayChReq) (*ClosePayChResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClosePayCh not implemented") +} +func (UnimplementedPayment_APIServer) mustEmbedUnimplementedPayment_APIServer() {} + +// UnsafePayment_APIServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to Payment_APIServer will +// result in compilation errors. +type UnsafePayment_APIServer interface { + mustEmbedUnimplementedPayment_APIServer() +} + +func RegisterPayment_APIServer(s grpc.ServiceRegistrar, srv Payment_APIServer) { + s.RegisterService(&Payment_API_ServiceDesc, srv) +} + +func _Payment_API_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetConfigReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).GetConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_GetConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).GetConfig(ctx, req.(*GetConfigReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_OpenSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OpenSessionReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).OpenSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_OpenSession_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).OpenSession(ctx, req.(*OpenSessionReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_Time_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TimeReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).Time(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_Time_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).Time(ctx, req.(*TimeReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_RegisterCurrency_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterCurrencyReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).RegisterCurrency(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_RegisterCurrency_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).RegisterCurrency(ctx, req.(*RegisterCurrencyReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_Help_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HelpReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).Help(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_Help_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).Help(ctx, req.(*HelpReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_AddPeerID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddPeerIDReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).AddPeerID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_AddPeerID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).AddPeerID(ctx, req.(*AddPeerIDReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_GetPeerID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPeerIDReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).GetPeerID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_GetPeerID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).GetPeerID(ctx, req.(*GetPeerIDReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_OpenPayCh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OpenPayChReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).OpenPayCh(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_OpenPayCh_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).OpenPayCh(ctx, req.(*OpenPayChReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_GetPayChsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPayChsInfoReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).GetPayChsInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_GetPayChsInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).GetPayChsInfo(ctx, req.(*GetPayChsInfoReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_SubPayChProposals_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubPayChProposalsReq) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(Payment_APIServer).SubPayChProposals(m, &payment_APISubPayChProposalsServer{stream}) +} + +type Payment_API_SubPayChProposalsServer interface { + Send(*SubPayChProposalsResp) error + grpc.ServerStream +} + +type payment_APISubPayChProposalsServer struct { + grpc.ServerStream +} + +func (x *payment_APISubPayChProposalsServer) Send(m *SubPayChProposalsResp) error { + return x.ServerStream.SendMsg(m) +} + +func _Payment_API_UnsubPayChProposals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnsubPayChProposalsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).UnsubPayChProposals(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_UnsubPayChProposals_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).UnsubPayChProposals(ctx, req.(*UnsubPayChProposalsReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_RespondPayChProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RespondPayChProposalReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).RespondPayChProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_RespondPayChProposal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).RespondPayChProposal(ctx, req.(*RespondPayChProposalReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_CloseSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CloseSessionReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).CloseSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_CloseSession_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).CloseSession(ctx, req.(*CloseSessionReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_DeployAssetERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeployAssetERC20Req) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).DeployAssetERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_DeployAssetERC20_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).DeployAssetERC20(ctx, req.(*DeployAssetERC20Req)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_SendPayChUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendPayChUpdateReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).SendPayChUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_SendPayChUpdate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).SendPayChUpdate(ctx, req.(*SendPayChUpdateReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_SubPayChUpdates_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubpayChUpdatesReq) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(Payment_APIServer).SubPayChUpdates(m, &payment_APISubPayChUpdatesServer{stream}) +} + +type Payment_API_SubPayChUpdatesServer interface { + Send(*SubPayChUpdatesResp) error + grpc.ServerStream +} + +type payment_APISubPayChUpdatesServer struct { + grpc.ServerStream +} + +func (x *payment_APISubPayChUpdatesServer) Send(m *SubPayChUpdatesResp) error { + return x.ServerStream.SendMsg(m) +} + +func _Payment_API_UnsubPayChUpdates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnsubPayChUpdatesReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).UnsubPayChUpdates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_UnsubPayChUpdates_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).UnsubPayChUpdates(ctx, req.(*UnsubPayChUpdatesReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_RespondPayChUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RespondPayChUpdateReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).RespondPayChUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_RespondPayChUpdate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).RespondPayChUpdate(ctx, req.(*RespondPayChUpdateReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_GetPayChInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPayChInfoReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).GetPayChInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_GetPayChInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).GetPayChInfo(ctx, req.(*GetPayChInfoReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_API_ClosePayCh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClosePayChReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Payment_APIServer).ClosePayCh(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_API_ClosePayCh_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Payment_APIServer).ClosePayCh(ctx, req.(*ClosePayChReq)) + } + return interceptor(ctx, in, info, handler) +} + +// Payment_API_ServiceDesc is the grpc.ServiceDesc for Payment_API service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Payment_API_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pb.Payment_API", + HandlerType: (*Payment_APIServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetConfig", + Handler: _Payment_API_GetConfig_Handler, + }, + { + MethodName: "OpenSession", + Handler: _Payment_API_OpenSession_Handler, + }, + { + MethodName: "Time", + Handler: _Payment_API_Time_Handler, + }, + { + MethodName: "RegisterCurrency", + Handler: _Payment_API_RegisterCurrency_Handler, + }, + { + MethodName: "Help", + Handler: _Payment_API_Help_Handler, + }, + { + MethodName: "AddPeerID", + Handler: _Payment_API_AddPeerID_Handler, + }, + { + MethodName: "GetPeerID", + Handler: _Payment_API_GetPeerID_Handler, + }, + { + MethodName: "OpenPayCh", + Handler: _Payment_API_OpenPayCh_Handler, + }, + { + MethodName: "GetPayChsInfo", + Handler: _Payment_API_GetPayChsInfo_Handler, + }, + { + MethodName: "UnsubPayChProposals", + Handler: _Payment_API_UnsubPayChProposals_Handler, + }, + { + MethodName: "RespondPayChProposal", + Handler: _Payment_API_RespondPayChProposal_Handler, + }, + { + MethodName: "CloseSession", + Handler: _Payment_API_CloseSession_Handler, + }, + { + MethodName: "DeployAssetERC20", + Handler: _Payment_API_DeployAssetERC20_Handler, + }, + { + MethodName: "SendPayChUpdate", + Handler: _Payment_API_SendPayChUpdate_Handler, + }, + { + MethodName: "UnsubPayChUpdates", + Handler: _Payment_API_UnsubPayChUpdates_Handler, + }, + { + MethodName: "RespondPayChUpdate", + Handler: _Payment_API_RespondPayChUpdate_Handler, + }, + { + MethodName: "GetPayChInfo", + Handler: _Payment_API_GetPayChInfo_Handler, + }, + { + MethodName: "ClosePayCh", + Handler: _Payment_API_ClosePayCh_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "SubPayChProposals", + Handler: _Payment_API_SubPayChProposals_Handler, + ServerStreams: true, + }, + { + StreamName: "SubPayChUpdates", + Handler: _Payment_API_SubPayChUpdates_Handler, + ServerStreams: true, + }, + }, + Metadata: "payment_service.proto", +} diff --git a/api/grpc/pb/sdktypes.go b/api/grpc/pb/sdktypes.go new file mode 100644 index 00000000..98c8c107 --- /dev/null +++ b/api/grpc/pb/sdktypes.go @@ -0,0 +1,588 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pb + +import ( + "fmt" + "math" + "math/big" + reflect "reflect" + "time" + + "github.com/pkg/errors" + pethchannel "perun.network/go-perun/backend/ethereum/channel" //nolint: depguard // This should be replaced. + pchannel "perun.network/go-perun/channel" + pwallet "perun.network/go-perun/wallet" + + "github.com/hyperledger-labs/perun-node" +) + +// SubscribeResponseToAdjEvent converts protobuf's Subscribe Response to +// perun's AdjudicatorEvent. +func SubscribeResponseToAdjEvent(protoResponse *SubscribeResp, +) (adjEvent pchannel.AdjudicatorEvent, err error) { + switch e := protoResponse.Response.(type) { + case *SubscribeResp_RegisteredEvent: + adjEvent, err = ToRegisteredEvent(e.RegisteredEvent) + case *SubscribeResp_ProgressedEvent: + adjEvent, err = ToProgressedEvent(e.ProgressedEvent) + case *SubscribeResp_ConcludedEvent: + adjEvent = ToConcludedEvent(e.ConcludedEvent) + case *SubscribeResp_Error: + return nil, err + default: + return nil, errors.New("unknown even type") + } + return adjEvent, err +} + +// ToRegisteredEvent converts a protobuf's RegisteredEvent to its corresponding +// perun's RegisteredEvent representation. +func ToRegisteredEvent(protoEvent *RegisteredEvent) (event *pchannel.RegisteredEvent, err error) { + event = &pchannel.RegisteredEvent{} + event.AdjudicatorEventBase = toAdjudicatorEventBase(protoEvent.AdjudicatorEventBase) + event.State, err = ToState(protoEvent.State) + if err != nil { + return nil, errors.WithMessage(err, "parsing state") + } + event.Sigs = make([]pwallet.Sig, len(protoEvent.Sigs)) + for i := range protoEvent.Sigs { + copy(event.Sigs[i], protoEvent.Sigs[i]) + } + return event, nil +} + +// ToProgressedEvent converts a protobuf's ProgressedEvent to its corresponding +// perun's ProgressedEvent representation. +func ToProgressedEvent(protoEvent *ProgressedEvent) (event *pchannel.ProgressedEvent, err error) { + event = &pchannel.ProgressedEvent{} + event.AdjudicatorEventBase = toAdjudicatorEventBase(protoEvent.AdjudicatorEventBase) + event.State, err = ToState(protoEvent.State) + if err != nil { + return nil, errors.WithMessage(err, "parsing state") + } + event.Idx = pchannel.Index(protoEvent.Idx) + return event, nil +} + +// ToConcludedEvent converts a protobuf's ConcludedEvent to its corresponding +// perun's ConcludedEvent representation. +func ToConcludedEvent(protoEvent *ConcludedEvent) (event *pchannel.ConcludedEvent) { + event = &pchannel.ConcludedEvent{} + event.AdjudicatorEventBase = toAdjudicatorEventBase(protoEvent.AdjudicatorEventBase) + return event +} + +func toAdjudicatorEventBase(protoEvent *AdjudicatorEventBase, +) (event pchannel.AdjudicatorEventBase) { + copy(event.IDV[:], protoEvent.ChID) + event.VersionV = protoEvent.Version + switch protoEvent.Timeout.Type { + case AdjudicatorEventBase_elapsed: + event.TimeoutV = &pchannel.ElapsedTimeout{} + case AdjudicatorEventBase_time: + //nolint: govet // struct defined in go-perun library uses unkeyed fields. + event.TimeoutV = &pchannel.TimeTimeout{time.Unix(protoEvent.Timeout.Sec, 0)} + case AdjudicatorEventBase_ethBlock: + // TODO: Avoid usage of pethchannel. + event.TimeoutV = &pethchannel.BlockTimeout{Time: uint64(protoEvent.Timeout.Sec)} + } + return event +} + +// ToAdjReq converts protobuf's AdjReq definition to perun's AdjReq definition. +func ToAdjReq(protoReq *AdjudicatorReq) (req perun.AdjudicatorReq, err error) { + if req.Params, err = ToParams(protoReq.Params); err != nil { + return req, err + } + if req.Tx, err = toTransaction(protoReq.Tx); err != nil { + return req, err + } + req.Acc = pwallet.NewAddress() + err = req.Acc.UnmarshalBinary(protoReq.Acc) + if err != nil { + return req, err + } + req.Idx = pchannel.Index(protoReq.Idx) + req.Secondary = protoReq.Secondary + return req, nil +} + +func toTransaction(protoSignedState *Transaction) (transaction pchannel.Transaction, err error) { + transaction.State, err = ToState(protoSignedState.State) + if err != nil { + return transaction, err + } + transaction.Sigs = make([]pwallet.Sig, len(protoSignedState.Sigs)) + for i := range transaction.Sigs { + transaction.Sigs[i] = protoSignedState.Sigs[i] + } + return transaction, nil +} + +// ToSignedState converts protobuf's SignedState definition to perun's SignedState definition. +func ToSignedState(protoSignedState *SignedState) (signedState pchannel.SignedState, err error) { + signedState.Params, err = ToParams(protoSignedState.Params) + if err != nil { + return signedState, err + } + signedState.State, err = ToState(protoSignedState.State) + if err != nil { + return signedState, err + } + signedState.Sigs = make([]pwallet.Sig, len(protoSignedState.Sigs)) + for i := range signedState.Sigs { + signedState.Sigs[i] = protoSignedState.Sigs[i] + } + return signedState, nil +} + +// ToParams converts protobuf's Params definition to perun's Params definition. +func ToParams(protoParams *Params) (*pchannel.Params, error) { + app, err := toApp(protoParams.App) + if err != nil { + return nil, err + } + parts, err := toWalletAddrs(protoParams.Parts) + if err != nil { + return nil, errors.WithMessage(err, "parts") + } + params := pchannel.NewParamsUnsafe( + protoParams.ChallengeDuration, + parts, + app, + (new(big.Int)).SetBytes(protoParams.Nonce), + protoParams.LedgerChannel, + protoParams.VirtualChannel) + + return params, nil +} + +func toApp(protoApp []byte) (app pchannel.App, err error) { + if len(protoApp) == 0 { + app = pchannel.NoApp() + return app, nil + } + appDef := pwallet.NewAddress() + err = appDef.UnmarshalBinary(protoApp) + if err != nil { + return app, err + } + app, err = pchannel.Resolve(appDef) + return app, err +} + +func toWalletAddrs(protoAddrs [][]byte) ([]pwallet.Address, error) { + addrs := make([]pwallet.Address, len(protoAddrs)) + for i := range protoAddrs { + addrs[i] = pwallet.NewAddress() + err := addrs[i].UnmarshalBinary(protoAddrs[i]) + if err != nil { + return nil, errors.WithMessagef(err, "%d'th address", i) + } + } + return addrs, nil +} + +// ToState converts protobuf's State definition to perun's State definition. +func ToState(protoState *State) (state *pchannel.State, err error) { + state = &pchannel.State{} + copy(state.ID[:], protoState.Id) + state.Version = protoState.Version + state.IsFinal = protoState.IsFinal + allocation, err := toAllocation(protoState.Allocation) + if err != nil { + return nil, errors.WithMessage(err, "allocation") + } + state.Allocation = *allocation + state.App, state.Data, err = toAppAndData(protoState.App, protoState.Data) + return state, err +} + +func toAllocation(protoAlloc *Allocation) (alloc *pchannel.Allocation, err error) { + alloc = &pchannel.Allocation{} + alloc.Assets = make([]pchannel.Asset, len(protoAlloc.Assets)) + for i := range protoAlloc.Assets { + alloc.Assets[i] = pchannel.NewAsset() + err = alloc.Assets[i].UnmarshalBinary(protoAlloc.Assets[i]) + if err != nil { + return nil, errors.WithMessagef(err, "%d'th asset", i) + } + } + alloc.Locked = make([]pchannel.SubAlloc, len(protoAlloc.Locked)) + for i := range protoAlloc.Locked { + alloc.Locked[i], err = toSubAlloc(protoAlloc.Locked[i]) + if err != nil { + return nil, errors.WithMessagef(err, "%d'th sub alloc", i) + } + } + alloc.Balances = ToBalances(protoAlloc.Balances.Balances) + return alloc, nil +} + +func toAppAndData(protoApp, protoData []byte) (app pchannel.App, data pchannel.Data, err error) { + if len(protoApp) == 0 { + app = pchannel.NoApp() + data = pchannel.NoData() + return app, data, nil + } + appDef := pwallet.NewAddress() + err = appDef.UnmarshalBinary(protoApp) + if err != nil { + return nil, nil, err + } + app, err = pchannel.Resolve(appDef) + if err != nil { + return + } + data = app.NewData() + return app, data, data.UnmarshalBinary(protoData) +} + +func toSubAlloc(protoSubAlloc *SubAlloc) (subAlloc pchannel.SubAlloc, err error) { + subAlloc = pchannel.SubAlloc{} + subAlloc.Bals = toBalance(protoSubAlloc.Bals) + if len(protoSubAlloc.Id) != len(subAlloc.ID) { + return subAlloc, errors.New("sub alloc id has incorrect length") + } + copy(subAlloc.ID[:], protoSubAlloc.Id) + subAlloc.IndexMap, err = toIndexMap(protoSubAlloc.IndexMap.IndexMap) + return subAlloc, err +} + +// ToBalances converts protobuf's Balances definition to perun's Balances definition. +func ToBalances(protoBalances []*Balance) [][]*big.Int { + balances := make([][]*big.Int, len(protoBalances)) + for i, protoBalance := range protoBalances { + balances[i] = make([]*big.Int, len(protoBalance.Balance)) + for j := range protoBalance.Balance { + balances[i][j] = (&big.Int{}).SetBytes(protoBalance.Balance[j]) + balances[i][j].SetBytes(protoBalance.Balance[j]) + } + } + return balances +} + +func toBalance(protoBalance *Balance) (balance []pchannel.Bal) { + balance = make([]pchannel.Bal, len(protoBalance.Balance)) + for j := range protoBalance.Balance { + balance[j] = new(big.Int).SetBytes(protoBalance.Balance[j]) + } + return balance +} + +func toIndexMap(protoIndexMap []uint32) (indexMap []pchannel.Index, err error) { + indexMap = make([]pchannel.Index, len(protoIndexMap)) + for i := range protoIndexMap { + if protoIndexMap[i] > math.MaxUint16 { + //nolint:goerr113 // We do not want to define this as constant error. + return nil, fmt.Errorf("%d'th index is invalid", i) + } + indexMap[i] = pchannel.Index(uint16(protoIndexMap[i])) + } + return indexMap, nil +} + +// SubscribeResponseFromAdjEvent converts perun's AdjudicatorEvent to protobuf's +// Subscribe Response. +func SubscribeResponseFromAdjEvent(adjEvent pchannel.AdjudicatorEvent) (*SubscribeResp, error) { + protoResponse := &SubscribeResp{} + switch e := adjEvent.(type) { + case *pchannel.RegisteredEvent: + registeredEvent, err := FromRegisteredEvent(e) + protoResponse.Response = &SubscribeResp_RegisteredEvent{registeredEvent} + return protoResponse, err + case *pchannel.ProgressedEvent: + progressedEvent, err := FromProgressedEvent(e) + protoResponse.Response = &SubscribeResp_ProgressedEvent{progressedEvent} + return protoResponse, err + case *pchannel.ConcludedEvent: + concludedEvent, err := FromConcludedEvent(e) + protoResponse.Response = &SubscribeResp_ConcludedEvent{concludedEvent} + return protoResponse, err + default: + apiErr := perun.NewAPIErrUnknownInternal(errors.New("unknown even type")) + protoResponse.Response = &SubscribeResp_Error{ + Error: FromError(apiErr), + } + return protoResponse, nil + } +} + +// FromRegisteredEvent converts a perun's RegisteredEvent to its corresponding +// protobuf's RegisteredEvent representation. +func FromRegisteredEvent(event *pchannel.RegisteredEvent) (grpcEvent *RegisteredEvent, err error) { + grpcEvent = &RegisteredEvent{} + grpcEvent.AdjudicatorEventBase = fromAdjudicatorEventBase(&event.AdjudicatorEventBase) + grpcEvent.Sigs = make([][]byte, len(event.Sigs)) + copy(grpcEvent.Sigs, event.Sigs) + grpcEvent.State, err = FromState(event.State) + return grpcEvent, errors.WithMessage(err, "parsing state") +} + +// FromProgressedEvent converts a perun's ProgressedEvent to its corresponding +// protobuf's ProgressedEvent representation. +func FromProgressedEvent(event *pchannel.ProgressedEvent) (grpcEvent *ProgressedEvent, err error) { + grpcEvent = &ProgressedEvent{} + grpcEvent.AdjudicatorEventBase = fromAdjudicatorEventBase(&event.AdjudicatorEventBase) + grpcEvent.Idx = uint32(event.Idx) + grpcEvent.State, err = FromState(event.State) + return grpcEvent, errors.WithMessage(err, "parsing state") +} + +// FromConcludedEvent converts a perun's ConcludedEvent to its corresponding +// protobuf's ConcludedEvent representation. +func FromConcludedEvent(event *pchannel.ConcludedEvent) (grpcEvent *ConcludedEvent, err error) { + grpcEvent = &ConcludedEvent{} + grpcEvent.AdjudicatorEventBase = fromAdjudicatorEventBase(&event.AdjudicatorEventBase) + return grpcEvent, errors.WithMessage(err, "parsing adjudicator event base") +} + +func fromAdjudicatorEventBase(event *pchannel.AdjudicatorEventBase) (protoEvent *AdjudicatorEventBase) { + // Does a type switch on the underlying timeout type, because timeout cannot be passed as such + // TODO: Make timeout wire friendly. + protoEvent = &AdjudicatorEventBase{} + protoEvent.ChID = event.IDV[:] + protoEvent.Version = event.VersionV + protoEvent.Timeout = &AdjudicatorEventBase_Timeout{} + switch t := event.TimeoutV.(type) { + case *pchannel.ElapsedTimeout: + protoEvent.Timeout.Sec = -1 + protoEvent.Timeout.Type = AdjudicatorEventBase_elapsed + case *pchannel.TimeTimeout: + protoEvent.Timeout.Sec = t.Unix() + protoEvent.Timeout.Type = AdjudicatorEventBase_time + default: + // In this case, it is pethchannel.BlockTimeout. We don't + // directly make it a case of the type switch, because this + // will import pethchannel package, which has transient + // dependency to go-ethereum package, which has copy left + // license and cannot be used in the perun-node project, + // outside of ethereum adapter. + // TODO: Validate if number is less than int64max before type casting. + + timeoutValue := reflect.ValueOf(event.TimeoutV).Elem() + time := timeoutValue.FieldByName("Time") + if time.IsValid() { + protoEvent.Timeout.Sec = int64(time.Uint()) + protoEvent.Timeout.Type = AdjudicatorEventBase_ethBlock + } + } + return protoEvent +} + +// FromStateMap converts perun's StateMap definition to protobuf's StateMap +// definition. +func FromStateMap(req pchannel.StateMap) (protoReq []*StateMap, err error) { + protoReq = make([]*StateMap, len(req)) + + i := 0 + for id, state := range req { + protoReq[i].Id = id[:] + protoReq[i].State, err = FromState(state) + if err != nil { + return nil, err + } + i++ + } + return protoReq, nil +} + +// FromAdjReq converts perun's AdjReq definition to protobuf's AdjReq +// definition. +func FromAdjReq(req pchannel.AdjudicatorReq) (protoReq *AdjudicatorReq, err error) { + protoReq = &AdjudicatorReq{} + + if protoReq.Params, err = FromParams(req.Params); err != nil { + return protoReq, err + } + if protoReq.Tx, err = fromTx(req.Tx); err != nil { + return protoReq, err + } + if protoReq.Acc, err = req.Acc.Address().MarshalBinary(); err != nil { + return protoReq, err + } + + protoReq.Idx = uint32(req.Idx) + protoReq.Secondary = req.Secondary + return protoReq, nil +} + +func fromTx(req pchannel.Transaction) (protoReq *Transaction, err error) { + protoReq = &Transaction{} + + if protoReq.State, err = FromState(req.State); err != nil { + return protoReq, err + } + protoReq.Sigs = make([][]byte, len(req.Sigs)) + for i := range req.Sigs { + copy(protoReq.Sigs[i], req.Sigs[i]) + } + return protoReq, nil +} + +// FromSignedState converts perun's SignedState definition to protobuf's +// SignedState definition. +func FromSignedState(signedState *pchannel.SignedState) (protoSignedState *SignedState, err error) { + protoSignedState = &SignedState{} + protoSignedState.Params, err = FromParams(signedState.Params) + if err != nil { + return nil, err + } + protoSignedState.State, err = FromState(signedState.State) + if err != nil { + return nil, err + } + protoSignedState.Sigs = make([][]byte, len(signedState.Sigs)) + for i := range protoSignedState.Sigs { + protoSignedState.Sigs[i] = signedState.Sigs[i] + } + return protoSignedState, nil +} + +// FromParams converts perun's Params definition to protobuf's Params +// definition. +func FromParams(params *pchannel.Params) (protoParams *Params, err error) { + protoParams = &Params{} + + protoParams.Nonce = params.Nonce.Bytes() + protoParams.ChallengeDuration = params.ChallengeDuration + protoParams.LedgerChannel = params.LedgerChannel + protoParams.VirtualChannel = params.VirtualChannel + protoParams.Parts, err = fromWalletAddrs(params.Parts) + if err != nil { + return nil, errors.WithMessage(err, "parts") + } + protoParams.App, err = fromApp(params.App) + return protoParams, err +} + +func fromWalletAddrs(addrs []pwallet.Address) (protoAddrs [][]byte, err error) { + protoAddrs = make([][]byte, len(addrs)) + for i := range addrs { + protoAddrs[i], err = addrs[i].MarshalBinary() + if err != nil { + return nil, errors.WithMessagef(err, "%d'th address", i) + } + } + return protoAddrs, nil +} + +func fromApp(app pchannel.App) (protoApp []byte, err error) { + if pchannel.IsNoApp(app) { + return []byte{}, nil + } + protoApp, err = app.Def().MarshalBinary() + return protoApp, err +} + +// FromState converts perun's State definition to protobuf's State +// definition. +func FromState(state *pchannel.State) (protoState *State, err error) { + protoState = &State{} + + protoState.Id = make([]byte, len(state.ID)) + copy(protoState.Id, state.ID[:]) + protoState.Version = state.Version + protoState.IsFinal = state.IsFinal + protoState.Allocation, err = fromAllocation(state.Allocation) + if err != nil { + return nil, errors.WithMessage(err, "allocation") + } + protoState.App, protoState.Data, err = fromAppAndData(state.App, state.Data) + return protoState, err +} + +func fromAllocation(alloc pchannel.Allocation) (protoAlloc *Allocation, err error) { + protoAlloc = &Allocation{} + protoAlloc.Assets = make([][]byte, len(alloc.Assets)) + for i := range alloc.Assets { + protoAlloc.Assets[i], err = alloc.Assets[i].MarshalBinary() + if err != nil { + return nil, errors.WithMessagef(err, "%d'th asset", i) + } + } + locked := make([]*SubAlloc, len(alloc.Locked)) + for i := range alloc.Locked { + locked[i], err = fromSubAlloc(alloc.Locked[i]) + if err != nil { + return nil, errors.WithMessagef(err, "%d'th sub alloc", i) + } + } + protoAlloc.Balances, err = FromBalances(alloc.Balances) + return protoAlloc, err +} + +// FromBalances converts perun's Balances definition to protobuf's Balances +// definition. +func FromBalances(balances pchannel.Balances) (protoBalances *Balances, err error) { + protoBalances = &Balances{ + Balances: make([]*Balance, len(balances)), + } + for i := range balances { + protoBalances.Balances[i], err = fromBalance(balances[i]) + if err != nil { + return nil, errors.WithMessagef(err, "%d'th balance", i) + } + } + return protoBalances, nil +} + +func fromBalance(balance []pchannel.Bal) (protoBalance *Balance, err error) { + protoBalance = &Balance{ + Balance: make([][]byte, len(balance)), + } + for i := range balance { + if balance[i] == nil { + return nil, fmt.Errorf("%d'th amount is nil", i) //nolint:goerr113 // constant error is not needed. + } + if balance[i].Sign() == -1 { + return nil, fmt.Errorf("%d'th amount is negative", i) //nolint:goerr113 // constant error is not needed. + } + protoBalance.Balance[i] = balance[i].Bytes() + } + return protoBalance, nil +} + +func fromAppAndData(app pchannel.App, data pchannel.Data) (protoApp, protoData []byte, err error) { + if pchannel.IsNoApp(app) { + return []byte{}, []byte{}, nil + } + protoApp, err = app.Def().MarshalBinary() + if err != nil { + return []byte{}, []byte{}, err + } + protoData, err = data.MarshalBinary() + return protoApp, protoData, err +} + +func fromSubAlloc(subAlloc pchannel.SubAlloc) (protoSubAlloc *SubAlloc, err error) { + protoSubAlloc = &SubAlloc{} + protoSubAlloc.Id = make([]byte, len(subAlloc.ID)) + copy(protoSubAlloc.Id, subAlloc.ID[:]) + protoSubAlloc.IndexMap = &IndexMap{IndexMap: fromIndexMap(subAlloc.IndexMap)} + protoSubAlloc.Bals, err = fromBalance(subAlloc.Bals) + return protoSubAlloc, err +} + +func fromIndexMap(indexMap []pchannel.Index) (protoIndexMap []uint32) { + protoIndexMap = make([]uint32, len(indexMap)) + for i := range indexMap { + protoIndexMap[i] = uint32(indexMap[i]) + } + return protoIndexMap +} diff --git a/api/grpc/pb/sdktypes.pb.go b/api/grpc/pb/sdktypes.pb.go new file mode 100644 index 00000000..e7f59bf0 --- /dev/null +++ b/api/grpc/pb/sdktypes.pb.go @@ -0,0 +1,1499 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v4.23.3 +// source: sdktypes.proto + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AdjudicatorEventBase_TimeoutType int32 + +const ( + AdjudicatorEventBase_elapsed AdjudicatorEventBase_TimeoutType = 0 + AdjudicatorEventBase_time AdjudicatorEventBase_TimeoutType = 1 + AdjudicatorEventBase_ethBlock AdjudicatorEventBase_TimeoutType = 2 +) + +// Enum value maps for AdjudicatorEventBase_TimeoutType. +var ( + AdjudicatorEventBase_TimeoutType_name = map[int32]string{ + 0: "elapsed", + 1: "time", + 2: "ethBlock", + } + AdjudicatorEventBase_TimeoutType_value = map[string]int32{ + "elapsed": 0, + "time": 1, + "ethBlock": 2, + } +) + +func (x AdjudicatorEventBase_TimeoutType) Enum() *AdjudicatorEventBase_TimeoutType { + p := new(AdjudicatorEventBase_TimeoutType) + *p = x + return p +} + +func (x AdjudicatorEventBase_TimeoutType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AdjudicatorEventBase_TimeoutType) Descriptor() protoreflect.EnumDescriptor { + return file_sdktypes_proto_enumTypes[0].Descriptor() +} + +func (AdjudicatorEventBase_TimeoutType) Type() protoreflect.EnumType { + return &file_sdktypes_proto_enumTypes[0] +} + +func (x AdjudicatorEventBase_TimeoutType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AdjudicatorEventBase_TimeoutType.Descriptor instead. +func (AdjudicatorEventBase_TimeoutType) EnumDescriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{8, 0} +} + +// Balance represents the balance of a single asset, for all the channel +// participants. +type Balance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Balance [][]byte `protobuf:"bytes,1,rep,name=balance,proto3" json:"balance,omitempty"` +} + +func (x *Balance) Reset() { + *x = Balance{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Balance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Balance) ProtoMessage() {} + +func (x *Balance) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Balance.ProtoReflect.Descriptor instead. +func (*Balance) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{0} +} + +func (x *Balance) GetBalance() [][]byte { + if x != nil { + return x.Balance + } + return nil +} + +// Balances represents the balance of all the assets, for all the channel +// participants. +type Balances struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Balances []*Balance `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances,omitempty"` +} + +func (x *Balances) Reset() { + *x = Balances{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Balances) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Balances) ProtoMessage() {} + +func (x *Balances) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Balances.ProtoReflect.Descriptor instead. +func (*Balances) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{1} +} + +func (x *Balances) GetBalances() []*Balance { + if x != nil { + return x.Balances + } + return nil +} + +// Params represents channel.Params. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChallengeDuration uint64 `protobuf:"varint,2,opt,name=challenge_duration,json=challengeDuration,proto3" json:"challenge_duration,omitempty"` + Parts [][]byte `protobuf:"bytes,3,rep,name=parts,proto3" json:"parts,omitempty"` + App []byte `protobuf:"bytes,4,opt,name=app,proto3" json:"app,omitempty"` + Nonce []byte `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` + LedgerChannel bool `protobuf:"varint,6,opt,name=ledger_channel,json=ledgerChannel,proto3" json:"ledger_channel,omitempty"` + VirtualChannel bool `protobuf:"varint,7,opt,name=virtual_channel,json=virtualChannel,proto3" json:"virtual_channel,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +func (x *Params) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{2} +} + +func (x *Params) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +func (x *Params) GetChallengeDuration() uint64 { + if x != nil { + return x.ChallengeDuration + } + return 0 +} + +func (x *Params) GetParts() [][]byte { + if x != nil { + return x.Parts + } + return nil +} + +func (x *Params) GetApp() []byte { + if x != nil { + return x.App + } + return nil +} + +func (x *Params) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *Params) GetLedgerChannel() bool { + if x != nil { + return x.LedgerChannel + } + return false +} + +func (x *Params) GetVirtualChannel() bool { + if x != nil { + return x.VirtualChannel + } + return false +} + +// IndexMap represents the mapping of a participant indices in a sub allocation +// or a virtual channel funding proposal to the corresponding indices in the +// parent channel. +type IndexMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IndexMap []uint32 `protobuf:"varint,1,rep,packed,name=index_map,json=indexMap,proto3" json:"index_map,omitempty"` +} + +func (x *IndexMap) Reset() { + *x = IndexMap{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IndexMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndexMap) ProtoMessage() {} + +func (x *IndexMap) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IndexMap.ProtoReflect.Descriptor instead. +func (*IndexMap) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{3} +} + +func (x *IndexMap) GetIndexMap() []uint32 { + if x != nil { + return x.IndexMap + } + return nil +} + +// SubAlloc represts a sub allocation. +type SubAlloc struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Bals *Balance `protobuf:"bytes,2,opt,name=bals,proto3" json:"bals,omitempty"` + IndexMap *IndexMap `protobuf:"bytes,3,opt,name=index_map,json=indexMap,proto3" json:"index_map,omitempty"` +} + +func (x *SubAlloc) Reset() { + *x = SubAlloc{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubAlloc) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubAlloc) ProtoMessage() {} + +func (x *SubAlloc) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubAlloc.ProtoReflect.Descriptor instead. +func (*SubAlloc) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{4} +} + +func (x *SubAlloc) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +func (x *SubAlloc) GetBals() *Balance { + if x != nil { + return x.Bals + } + return nil +} + +func (x *SubAlloc) GetIndexMap() *IndexMap { + if x != nil { + return x.IndexMap + } + return nil +} + +// Allocation represents channel.Allocation. +type Allocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Assets [][]byte `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"` + Balances *Balances `protobuf:"bytes,2,opt,name=balances,proto3" json:"balances,omitempty"` + Locked []*SubAlloc `protobuf:"bytes,3,rep,name=locked,proto3" json:"locked,omitempty"` +} + +func (x *Allocation) Reset() { + *x = Allocation{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Allocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Allocation) ProtoMessage() {} + +func (x *Allocation) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Allocation.ProtoReflect.Descriptor instead. +func (*Allocation) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{5} +} + +func (x *Allocation) GetAssets() [][]byte { + if x != nil { + return x.Assets + } + return nil +} + +func (x *Allocation) GetBalances() *Balances { + if x != nil { + return x.Balances + } + return nil +} + +func (x *Allocation) GetLocked() []*SubAlloc { + if x != nil { + return x.Locked + } + return nil +} + +// State represents channel.State. +type State struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + App []byte `protobuf:"bytes,3,opt,name=app,proto3" json:"app,omitempty"` + Allocation *Allocation `protobuf:"bytes,4,opt,name=allocation,proto3" json:"allocation,omitempty"` + Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` + IsFinal bool `protobuf:"varint,6,opt,name=is_final,json=isFinal,proto3" json:"is_final,omitempty"` +} + +func (x *State) Reset() { + *x = State{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *State) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*State) ProtoMessage() {} + +func (x *State) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use State.ProtoReflect.Descriptor instead. +func (*State) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{6} +} + +func (x *State) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +func (x *State) GetVersion() uint64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *State) GetApp() []byte { + if x != nil { + return x.App + } + return nil +} + +func (x *State) GetAllocation() *Allocation { + if x != nil { + return x.Allocation + } + return nil +} + +func (x *State) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *State) GetIsFinal() bool { + if x != nil { + return x.IsFinal + } + return false +} + +// AdjudicatorReq represents channel.AdjudicatorReq. +type AdjudicatorReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + Acc []byte `protobuf:"bytes,2,opt,name=acc,proto3" json:"acc,omitempty"` + Tx *Transaction `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"` + Idx uint32 `protobuf:"varint,4,opt,name=idx,proto3" json:"idx,omitempty"` + Secondary bool `protobuf:"varint,5,opt,name=secondary,proto3" json:"secondary,omitempty"` +} + +func (x *AdjudicatorReq) Reset() { + *x = AdjudicatorReq{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdjudicatorReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdjudicatorReq) ProtoMessage() {} + +func (x *AdjudicatorReq) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdjudicatorReq.ProtoReflect.Descriptor instead. +func (*AdjudicatorReq) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{7} +} + +func (x *AdjudicatorReq) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +func (x *AdjudicatorReq) GetAcc() []byte { + if x != nil { + return x.Acc + } + return nil +} + +func (x *AdjudicatorReq) GetTx() *Transaction { + if x != nil { + return x.Tx + } + return nil +} + +func (x *AdjudicatorReq) GetIdx() uint32 { + if x != nil { + return x.Idx + } + return 0 +} + +func (x *AdjudicatorReq) GetSecondary() bool { + if x != nil { + return x.Secondary + } + return false +} + +// AdjudicatorEventBase represents channel.AdjudicatorEventBase. +type AdjudicatorEventBase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChID []byte `protobuf:"bytes,1,opt,name=chID,proto3" json:"chID,omitempty"` + Timeout *AdjudicatorEventBase_Timeout `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` + Version uint64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *AdjudicatorEventBase) Reset() { + *x = AdjudicatorEventBase{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdjudicatorEventBase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdjudicatorEventBase) ProtoMessage() {} + +func (x *AdjudicatorEventBase) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdjudicatorEventBase.ProtoReflect.Descriptor instead. +func (*AdjudicatorEventBase) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{8} +} + +func (x *AdjudicatorEventBase) GetChID() []byte { + if x != nil { + return x.ChID + } + return nil +} + +func (x *AdjudicatorEventBase) GetTimeout() *AdjudicatorEventBase_Timeout { + if x != nil { + return x.Timeout + } + return nil +} + +func (x *AdjudicatorEventBase) GetVersion() uint64 { + if x != nil { + return x.Version + } + return 0 +} + +// RegisteredEvent represents channel.RegisteredEvent. +type RegisteredEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdjudicatorEventBase *AdjudicatorEventBase `protobuf:"bytes,1,opt,name=adjudicatorEventBase,proto3" json:"adjudicatorEventBase,omitempty"` + State *State `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` + Sigs [][]byte `protobuf:"bytes,3,rep,name=sigs,proto3" json:"sigs,omitempty"` +} + +func (x *RegisteredEvent) Reset() { + *x = RegisteredEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisteredEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisteredEvent) ProtoMessage() {} + +func (x *RegisteredEvent) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisteredEvent.ProtoReflect.Descriptor instead. +func (*RegisteredEvent) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{9} +} + +func (x *RegisteredEvent) GetAdjudicatorEventBase() *AdjudicatorEventBase { + if x != nil { + return x.AdjudicatorEventBase + } + return nil +} + +func (x *RegisteredEvent) GetState() *State { + if x != nil { + return x.State + } + return nil +} + +func (x *RegisteredEvent) GetSigs() [][]byte { + if x != nil { + return x.Sigs + } + return nil +} + +// ProgressedEvent represents channel.ProgressedEvent. +type ProgressedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdjudicatorEventBase *AdjudicatorEventBase `protobuf:"bytes,1,opt,name=adjudicatorEventBase,proto3" json:"adjudicatorEventBase,omitempty"` + State *State `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` + Idx uint32 `protobuf:"varint,3,opt,name=idx,proto3" json:"idx,omitempty"` +} + +func (x *ProgressedEvent) Reset() { + *x = ProgressedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProgressedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProgressedEvent) ProtoMessage() {} + +func (x *ProgressedEvent) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProgressedEvent.ProtoReflect.Descriptor instead. +func (*ProgressedEvent) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{10} +} + +func (x *ProgressedEvent) GetAdjudicatorEventBase() *AdjudicatorEventBase { + if x != nil { + return x.AdjudicatorEventBase + } + return nil +} + +func (x *ProgressedEvent) GetState() *State { + if x != nil { + return x.State + } + return nil +} + +func (x *ProgressedEvent) GetIdx() uint32 { + if x != nil { + return x.Idx + } + return 0 +} + +// ConcludedEvent represents channel.ConcludedEvent. +type ConcludedEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdjudicatorEventBase *AdjudicatorEventBase `protobuf:"bytes,1,opt,name=adjudicatorEventBase,proto3" json:"adjudicatorEventBase,omitempty"` +} + +func (x *ConcludedEvent) Reset() { + *x = ConcludedEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConcludedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConcludedEvent) ProtoMessage() {} + +func (x *ConcludedEvent) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConcludedEvent.ProtoReflect.Descriptor instead. +func (*ConcludedEvent) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{11} +} + +func (x *ConcludedEvent) GetAdjudicatorEventBase() *AdjudicatorEventBase { + if x != nil { + return x.AdjudicatorEventBase + } + return nil +} + +// Transaction represents channel.Transaction. +type Transaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State *State `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"` +} + +func (x *Transaction) Reset() { + *x = Transaction{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{12} +} + +func (x *Transaction) GetState() *State { + if x != nil { + return x.State + } + return nil +} + +func (x *Transaction) GetSigs() [][]byte { + if x != nil { + return x.Sigs + } + return nil +} + +// SignedState represents channel.SignedState. +type SignedState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + State *State `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` + Sigs [][]byte `protobuf:"bytes,3,rep,name=sigs,proto3" json:"sigs,omitempty"` +} + +func (x *SignedState) Reset() { + *x = SignedState{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedState) ProtoMessage() {} + +func (x *SignedState) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignedState.ProtoReflect.Descriptor instead. +func (*SignedState) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{13} +} + +func (x *SignedState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +func (x *SignedState) GetState() *State { + if x != nil { + return x.State + } + return nil +} + +func (x *SignedState) GetSigs() [][]byte { + if x != nil { + return x.Sigs + } + return nil +} + +// StateMap represents channel.StateMap. +type StateMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + State *State `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` +} + +func (x *StateMap) Reset() { + *x = StateMap{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StateMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateMap) ProtoMessage() {} + +func (x *StateMap) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StateMap.ProtoReflect.Descriptor instead. +func (*StateMap) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{14} +} + +func (x *StateMap) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +func (x *StateMap) GetState() *State { + if x != nil { + return x.State + } + return nil +} + +type AdjudicatorEventBase_Timeout struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sec int64 `protobuf:"varint,1,opt,name=sec,proto3" json:"sec,omitempty"` + Type AdjudicatorEventBase_TimeoutType `protobuf:"varint,3,opt,name=type,proto3,enum=pb.AdjudicatorEventBase_TimeoutType" json:"type,omitempty"` +} + +func (x *AdjudicatorEventBase_Timeout) Reset() { + *x = AdjudicatorEventBase_Timeout{} + if protoimpl.UnsafeEnabled { + mi := &file_sdktypes_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdjudicatorEventBase_Timeout) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdjudicatorEventBase_Timeout) ProtoMessage() {} + +func (x *AdjudicatorEventBase_Timeout) ProtoReflect() protoreflect.Message { + mi := &file_sdktypes_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdjudicatorEventBase_Timeout.ProtoReflect.Descriptor instead. +func (*AdjudicatorEventBase_Timeout) Descriptor() ([]byte, []int) { + return file_sdktypes_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *AdjudicatorEventBase_Timeout) GetSec() int64 { + if x != nil { + return x.Sec + } + return 0 +} + +func (x *AdjudicatorEventBase_Timeout) GetType() AdjudicatorEventBase_TimeoutType { + if x != nil { + return x.Type + } + return AdjudicatorEventBase_elapsed +} + +var File_sdktypes_proto protoreflect.FileDescriptor + +var file_sdktypes_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x73, 0x64, 0x6b, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x02, 0x70, 0x62, 0x22, 0x23, 0x0a, 0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, + 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x08, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xd5, + 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x68, 0x61, + 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x12, 0x10, + 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x61, 0x70, 0x70, + 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, + 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x27, 0x0a, + 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x27, 0x0a, 0x08, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, + 0x61, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x70, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x61, 0x70, 0x22, + 0x66, 0x0a, 0x08, 0x53, 0x75, 0x62, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x62, + 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x62, 0x61, 0x6c, 0x73, 0x12, 0x29, 0x0a, 0x09, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x61, 0x70, 0x52, 0x08, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x61, 0x70, 0x22, 0x74, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x28, 0x0a, + 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x08, 0x62, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, + 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x22, 0xa2, 0x01, + 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, + 0x61, 0x70, 0x70, 0x12, 0x2e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x6c, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x66, 0x69, + 0x6e, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x46, 0x69, 0x6e, + 0x61, 0x6c, 0x22, 0x97, 0x01, 0x0a, 0x0e, 0x41, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x61, 0x63, 0x63, 0x12, 0x1f, 0x0a, 0x02, 0x74, + 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x74, 0x78, 0x12, 0x10, 0x0a, 0x03, + 0x69, 0x64, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x69, 0x64, 0x78, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x22, 0x8b, 0x02, 0x0a, + 0x14, 0x41, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x42, 0x61, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x12, 0x3a, 0x0a, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x62, 0x2e, + 0x41, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x42, 0x61, 0x73, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x07, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, + 0x55, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, + 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x63, 0x12, 0x38, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x70, 0x62, 0x2e, + 0x41, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x42, 0x61, 0x73, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x32, 0x0a, 0x0b, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, + 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x10, 0x02, 0x22, 0x94, 0x01, 0x0a, 0x0f, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x4c, + 0x0a, 0x14, 0x61, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, + 0x62, 0x2e, 0x41, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, 0x52, 0x14, 0x61, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x69, 0x67, + 0x73, 0x22, 0x92, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x14, 0x61, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, 0x52, 0x14, 0x61, + 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, + 0x61, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x03, 0x69, 0x64, 0x78, 0x22, 0x5e, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x14, 0x61, 0x64, 0x6a, 0x75, + 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x6a, 0x75, + 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, + 0x52, 0x14, 0x61, 0x64, 0x6a, 0x75, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x69, 0x67, 0x73, 0x22, 0x66, 0x0a, 0x0b, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, + 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x69, + 0x67, 0x73, 0x22, 0x3b, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, + 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, + 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sdktypes_proto_rawDescOnce sync.Once + file_sdktypes_proto_rawDescData = file_sdktypes_proto_rawDesc +) + +func file_sdktypes_proto_rawDescGZIP() []byte { + file_sdktypes_proto_rawDescOnce.Do(func() { + file_sdktypes_proto_rawDescData = protoimpl.X.CompressGZIP(file_sdktypes_proto_rawDescData) + }) + return file_sdktypes_proto_rawDescData +} + +var file_sdktypes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_sdktypes_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_sdktypes_proto_goTypes = []interface{}{ + (AdjudicatorEventBase_TimeoutType)(0), // 0: pb.AdjudicatorEventBase.TimeoutType + (*Balance)(nil), // 1: pb.Balance + (*Balances)(nil), // 2: pb.Balances + (*Params)(nil), // 3: pb.Params + (*IndexMap)(nil), // 4: pb.IndexMap + (*SubAlloc)(nil), // 5: pb.SubAlloc + (*Allocation)(nil), // 6: pb.Allocation + (*State)(nil), // 7: pb.State + (*AdjudicatorReq)(nil), // 8: pb.AdjudicatorReq + (*AdjudicatorEventBase)(nil), // 9: pb.AdjudicatorEventBase + (*RegisteredEvent)(nil), // 10: pb.RegisteredEvent + (*ProgressedEvent)(nil), // 11: pb.ProgressedEvent + (*ConcludedEvent)(nil), // 12: pb.ConcludedEvent + (*Transaction)(nil), // 13: pb.Transaction + (*SignedState)(nil), // 14: pb.SignedState + (*StateMap)(nil), // 15: pb.StateMap + (*AdjudicatorEventBase_Timeout)(nil), // 16: pb.AdjudicatorEventBase.Timeout +} +var file_sdktypes_proto_depIdxs = []int32{ + 1, // 0: pb.Balances.balances:type_name -> pb.Balance + 1, // 1: pb.SubAlloc.bals:type_name -> pb.Balance + 4, // 2: pb.SubAlloc.index_map:type_name -> pb.IndexMap + 2, // 3: pb.Allocation.balances:type_name -> pb.Balances + 5, // 4: pb.Allocation.locked:type_name -> pb.SubAlloc + 6, // 5: pb.State.allocation:type_name -> pb.Allocation + 3, // 6: pb.AdjudicatorReq.params:type_name -> pb.Params + 13, // 7: pb.AdjudicatorReq.tx:type_name -> pb.Transaction + 16, // 8: pb.AdjudicatorEventBase.timeout:type_name -> pb.AdjudicatorEventBase.Timeout + 9, // 9: pb.RegisteredEvent.adjudicatorEventBase:type_name -> pb.AdjudicatorEventBase + 7, // 10: pb.RegisteredEvent.state:type_name -> pb.State + 9, // 11: pb.ProgressedEvent.adjudicatorEventBase:type_name -> pb.AdjudicatorEventBase + 7, // 12: pb.ProgressedEvent.state:type_name -> pb.State + 9, // 13: pb.ConcludedEvent.adjudicatorEventBase:type_name -> pb.AdjudicatorEventBase + 7, // 14: pb.Transaction.state:type_name -> pb.State + 3, // 15: pb.SignedState.params:type_name -> pb.Params + 7, // 16: pb.SignedState.state:type_name -> pb.State + 7, // 17: pb.StateMap.state:type_name -> pb.State + 0, // 18: pb.AdjudicatorEventBase.Timeout.type:type_name -> pb.AdjudicatorEventBase.TimeoutType + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_sdktypes_proto_init() } +func file_sdktypes_proto_init() { + if File_sdktypes_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sdktypes_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Balance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Balances); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IndexMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubAlloc); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Allocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*State); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdjudicatorReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdjudicatorEventBase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisteredEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProgressedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConcludedEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Transaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdktypes_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdjudicatorEventBase_Timeout); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sdktypes_proto_rawDesc, + NumEnums: 1, + NumMessages: 16, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sdktypes_proto_goTypes, + DependencyIndexes: file_sdktypes_proto_depIdxs, + EnumInfos: file_sdktypes_proto_enumTypes, + MessageInfos: file_sdktypes_proto_msgTypes, + }.Build() + File_sdktypes_proto = out.File + file_sdktypes_proto_rawDesc = nil + file_sdktypes_proto_goTypes = nil + file_sdktypes_proto_depIdxs = nil +} diff --git a/api/grpc/pb/types_test.go b/api/grpc/pb/types_test.go new file mode 100644 index 00000000..73af12db --- /dev/null +++ b/api/grpc/pb/types_test.go @@ -0,0 +1,32 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pb_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/hyperledger-labs/perun-node" + "github.com/hyperledger-labs/perun-node/api/grpc/pb" +) + +func Test_ChUpdateType(t *testing.T) { + assert.EqualValues(t, perun.ChUpdateTypeOpen, pb.SubPayChUpdatesResp_Notify_open) + assert.EqualValues(t, perun.ChUpdateTypeFinal, pb.SubPayChUpdatesResp_Notify_final) + assert.EqualValues(t, perun.ChUpdateTypeClosed, pb.SubPayChUpdatesResp_Notify_closed) +} diff --git a/api/grpc/pb/watching_service.pb.go b/api/grpc/pb/watching_service.pb.go new file mode 100644 index 00000000..2cbfad9f --- /dev/null +++ b/api/grpc/pb/watching_service.pb.go @@ -0,0 +1,505 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v4.23.3 +// source: watching_service.proto + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StartWatchingLedgerChannelReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` + State *State `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` + Sigs [][]byte `protobuf:"bytes,4,rep,name=sigs,proto3" json:"sigs,omitempty"` +} + +func (x *StartWatchingLedgerChannelReq) Reset() { + *x = StartWatchingLedgerChannelReq{} + if protoimpl.UnsafeEnabled { + mi := &file_watching_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartWatchingLedgerChannelReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartWatchingLedgerChannelReq) ProtoMessage() {} + +func (x *StartWatchingLedgerChannelReq) ProtoReflect() protoreflect.Message { + mi := &file_watching_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartWatchingLedgerChannelReq.ProtoReflect.Descriptor instead. +func (*StartWatchingLedgerChannelReq) Descriptor() ([]byte, []int) { + return file_watching_service_proto_rawDescGZIP(), []int{0} +} + +func (x *StartWatchingLedgerChannelReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *StartWatchingLedgerChannelReq) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +func (x *StartWatchingLedgerChannelReq) GetState() *State { + if x != nil { + return x.State + } + return nil +} + +func (x *StartWatchingLedgerChannelReq) GetSigs() [][]byte { + if x != nil { + return x.Sigs + } + return nil +} + +type StartWatchingLedgerChannelResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *StartWatchingLedgerChannelResp_RegisteredEvent + // *StartWatchingLedgerChannelResp_ProgressedEvent + // *StartWatchingLedgerChannelResp_ConcludedEvent + // *StartWatchingLedgerChannelResp_Error + Response isStartWatchingLedgerChannelResp_Response `protobuf_oneof:"response"` +} + +func (x *StartWatchingLedgerChannelResp) Reset() { + *x = StartWatchingLedgerChannelResp{} + if protoimpl.UnsafeEnabled { + mi := &file_watching_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartWatchingLedgerChannelResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartWatchingLedgerChannelResp) ProtoMessage() {} + +func (x *StartWatchingLedgerChannelResp) ProtoReflect() protoreflect.Message { + mi := &file_watching_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartWatchingLedgerChannelResp.ProtoReflect.Descriptor instead. +func (*StartWatchingLedgerChannelResp) Descriptor() ([]byte, []int) { + return file_watching_service_proto_rawDescGZIP(), []int{1} +} + +func (m *StartWatchingLedgerChannelResp) GetResponse() isStartWatchingLedgerChannelResp_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *StartWatchingLedgerChannelResp) GetRegisteredEvent() *RegisteredEvent { + if x, ok := x.GetResponse().(*StartWatchingLedgerChannelResp_RegisteredEvent); ok { + return x.RegisteredEvent + } + return nil +} + +func (x *StartWatchingLedgerChannelResp) GetProgressedEvent() *ProgressedEvent { + if x, ok := x.GetResponse().(*StartWatchingLedgerChannelResp_ProgressedEvent); ok { + return x.ProgressedEvent + } + return nil +} + +func (x *StartWatchingLedgerChannelResp) GetConcludedEvent() *ConcludedEvent { + if x, ok := x.GetResponse().(*StartWatchingLedgerChannelResp_ConcludedEvent); ok { + return x.ConcludedEvent + } + return nil +} + +func (x *StartWatchingLedgerChannelResp) GetError() *MsgError { + if x, ok := x.GetResponse().(*StartWatchingLedgerChannelResp_Error); ok { + return x.Error + } + return nil +} + +type isStartWatchingLedgerChannelResp_Response interface { + isStartWatchingLedgerChannelResp_Response() +} + +type StartWatchingLedgerChannelResp_RegisteredEvent struct { + RegisteredEvent *RegisteredEvent `protobuf:"bytes,1,opt,name=registeredEvent,proto3,oneof"` +} + +type StartWatchingLedgerChannelResp_ProgressedEvent struct { + ProgressedEvent *ProgressedEvent `protobuf:"bytes,2,opt,name=progressedEvent,proto3,oneof"` +} + +type StartWatchingLedgerChannelResp_ConcludedEvent struct { + ConcludedEvent *ConcludedEvent `protobuf:"bytes,3,opt,name=concludedEvent,proto3,oneof"` +} + +type StartWatchingLedgerChannelResp_Error struct { + Error *MsgError `protobuf:"bytes,4,opt,name=error,proto3,oneof"` +} + +func (*StartWatchingLedgerChannelResp_RegisteredEvent) isStartWatchingLedgerChannelResp_Response() {} + +func (*StartWatchingLedgerChannelResp_ProgressedEvent) isStartWatchingLedgerChannelResp_Response() {} + +func (*StartWatchingLedgerChannelResp_ConcludedEvent) isStartWatchingLedgerChannelResp_Response() {} + +func (*StartWatchingLedgerChannelResp_Error) isStartWatchingLedgerChannelResp_Response() {} + +type StopWatchingReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + ChID []byte `protobuf:"bytes,2,opt,name=chID,proto3" json:"chID,omitempty"` +} + +func (x *StopWatchingReq) Reset() { + *x = StopWatchingReq{} + if protoimpl.UnsafeEnabled { + mi := &file_watching_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopWatchingReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopWatchingReq) ProtoMessage() {} + +func (x *StopWatchingReq) ProtoReflect() protoreflect.Message { + mi := &file_watching_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopWatchingReq.ProtoReflect.Descriptor instead. +func (*StopWatchingReq) Descriptor() ([]byte, []int) { + return file_watching_service_proto_rawDescGZIP(), []int{2} +} + +func (x *StopWatchingReq) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +func (x *StopWatchingReq) GetChID() []byte { + if x != nil { + return x.ChID + } + return nil +} + +type StopWatchingResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error *MsgError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *StopWatchingResp) Reset() { + *x = StopWatchingResp{} + if protoimpl.UnsafeEnabled { + mi := &file_watching_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopWatchingResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopWatchingResp) ProtoMessage() {} + +func (x *StopWatchingResp) ProtoReflect() protoreflect.Message { + mi := &file_watching_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopWatchingResp.ProtoReflect.Descriptor instead. +func (*StopWatchingResp) Descriptor() ([]byte, []int) { + return file_watching_service_proto_rawDescGZIP(), []int{3} +} + +func (x *StopWatchingResp) GetError() *MsgError { + if x != nil { + return x.Error + } + return nil +} + +var File_watching_service_proto protoreflect.FileDescriptor + +var file_watching_service_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x77, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0c, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x73, 0x64, 0x6b, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x01, 0x0a, 0x1d, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x64, 0x67, + 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, + 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x73, + 0x69, 0x67, 0x73, 0x22, 0x92, 0x02, 0x0a, 0x1e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x61, 0x74, + 0x63, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x70, + 0x57, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x68, 0x49, + 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x68, 0x49, 0x44, 0x22, 0x36, 0x0a, + 0x10, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0xb6, 0x01, 0x0a, 0x0c, 0x57, 0x61, 0x74, 0x63, 0x68, 0x69, + 0x6e, 0x67, 0x5f, 0x41, 0x50, 0x49, 0x12, 0x69, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, + 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x43, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, + 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x43, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x28, 0x01, 0x30, + 0x01, 0x12, 0x3b, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, + 0x67, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x61, 0x74, 0x63, 0x68, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x70, + 0x57, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_watching_service_proto_rawDescOnce sync.Once + file_watching_service_proto_rawDescData = file_watching_service_proto_rawDesc +) + +func file_watching_service_proto_rawDescGZIP() []byte { + file_watching_service_proto_rawDescOnce.Do(func() { + file_watching_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_watching_service_proto_rawDescData) + }) + return file_watching_service_proto_rawDescData +} + +var file_watching_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_watching_service_proto_goTypes = []interface{}{ + (*StartWatchingLedgerChannelReq)(nil), // 0: pb.StartWatchingLedgerChannelReq + (*StartWatchingLedgerChannelResp)(nil), // 1: pb.StartWatchingLedgerChannelResp + (*StopWatchingReq)(nil), // 2: pb.StopWatchingReq + (*StopWatchingResp)(nil), // 3: pb.StopWatchingResp + (*Params)(nil), // 4: pb.Params + (*State)(nil), // 5: pb.State + (*RegisteredEvent)(nil), // 6: pb.RegisteredEvent + (*ProgressedEvent)(nil), // 7: pb.ProgressedEvent + (*ConcludedEvent)(nil), // 8: pb.ConcludedEvent + (*MsgError)(nil), // 9: pb.MsgError +} +var file_watching_service_proto_depIdxs = []int32{ + 4, // 0: pb.StartWatchingLedgerChannelReq.params:type_name -> pb.Params + 5, // 1: pb.StartWatchingLedgerChannelReq.state:type_name -> pb.State + 6, // 2: pb.StartWatchingLedgerChannelResp.registeredEvent:type_name -> pb.RegisteredEvent + 7, // 3: pb.StartWatchingLedgerChannelResp.progressedEvent:type_name -> pb.ProgressedEvent + 8, // 4: pb.StartWatchingLedgerChannelResp.concludedEvent:type_name -> pb.ConcludedEvent + 9, // 5: pb.StartWatchingLedgerChannelResp.error:type_name -> pb.MsgError + 9, // 6: pb.StopWatchingResp.error:type_name -> pb.MsgError + 0, // 7: pb.Watching_API.StartWatchingLedgerChannel:input_type -> pb.StartWatchingLedgerChannelReq + 2, // 8: pb.Watching_API.StopWatching:input_type -> pb.StopWatchingReq + 1, // 9: pb.Watching_API.StartWatchingLedgerChannel:output_type -> pb.StartWatchingLedgerChannelResp + 3, // 10: pb.Watching_API.StopWatching:output_type -> pb.StopWatchingResp + 9, // [9:11] is the sub-list for method output_type + 7, // [7:9] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_watching_service_proto_init() } +func file_watching_service_proto_init() { + if File_watching_service_proto != nil { + return + } + file_errors_proto_init() + file_sdktypes_proto_init() + if !protoimpl.UnsafeEnabled { + file_watching_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartWatchingLedgerChannelReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_watching_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartWatchingLedgerChannelResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_watching_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopWatchingReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_watching_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopWatchingResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_watching_service_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*StartWatchingLedgerChannelResp_RegisteredEvent)(nil), + (*StartWatchingLedgerChannelResp_ProgressedEvent)(nil), + (*StartWatchingLedgerChannelResp_ConcludedEvent)(nil), + (*StartWatchingLedgerChannelResp_Error)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_watching_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_watching_service_proto_goTypes, + DependencyIndexes: file_watching_service_proto_depIdxs, + MessageInfos: file_watching_service_proto_msgTypes, + }.Build() + File_watching_service_proto = out.File + file_watching_service_proto_rawDesc = nil + file_watching_service_proto_goTypes = nil + file_watching_service_proto_depIdxs = nil +} diff --git a/api/grpc/pb/watching_service_grpc.pb.go b/api/grpc/pb/watching_service_grpc.pb.go new file mode 100644 index 00000000..60986ea9 --- /dev/null +++ b/api/grpc/pb/watching_service_grpc.pb.go @@ -0,0 +1,198 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.23.3 +// source: watching_service.proto + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. + +package pb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Watching_API_StartWatchingLedgerChannel_FullMethodName = "/pb.Watching_API/StartWatchingLedgerChannel" + Watching_API_StopWatching_FullMethodName = "/pb.Watching_API/StopWatching" +) + +// Watching_APIClient is the client API for Watching_API service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type Watching_APIClient interface { + StartWatchingLedgerChannel(ctx context.Context, opts ...grpc.CallOption) (Watching_API_StartWatchingLedgerChannelClient, error) + StopWatching(ctx context.Context, in *StopWatchingReq, opts ...grpc.CallOption) (*StopWatchingResp, error) +} + +type watching_APIClient struct { + cc grpc.ClientConnInterface +} + +func NewWatching_APIClient(cc grpc.ClientConnInterface) Watching_APIClient { + return &watching_APIClient{cc} +} + +func (c *watching_APIClient) StartWatchingLedgerChannel(ctx context.Context, opts ...grpc.CallOption) (Watching_API_StartWatchingLedgerChannelClient, error) { + stream, err := c.cc.NewStream(ctx, &Watching_API_ServiceDesc.Streams[0], Watching_API_StartWatchingLedgerChannel_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &watching_APIStartWatchingLedgerChannelClient{stream} + return x, nil +} + +type Watching_API_StartWatchingLedgerChannelClient interface { + Send(*StartWatchingLedgerChannelReq) error + Recv() (*StartWatchingLedgerChannelResp, error) + grpc.ClientStream +} + +type watching_APIStartWatchingLedgerChannelClient struct { + grpc.ClientStream +} + +func (x *watching_APIStartWatchingLedgerChannelClient) Send(m *StartWatchingLedgerChannelReq) error { + return x.ClientStream.SendMsg(m) +} + +func (x *watching_APIStartWatchingLedgerChannelClient) Recv() (*StartWatchingLedgerChannelResp, error) { + m := new(StartWatchingLedgerChannelResp) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *watching_APIClient) StopWatching(ctx context.Context, in *StopWatchingReq, opts ...grpc.CallOption) (*StopWatchingResp, error) { + out := new(StopWatchingResp) + err := c.cc.Invoke(ctx, Watching_API_StopWatching_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Watching_APIServer is the server API for Watching_API service. +// All implementations must embed UnimplementedWatching_APIServer +// for forward compatibility +type Watching_APIServer interface { + StartWatchingLedgerChannel(Watching_API_StartWatchingLedgerChannelServer) error + StopWatching(context.Context, *StopWatchingReq) (*StopWatchingResp, error) + mustEmbedUnimplementedWatching_APIServer() +} + +// UnimplementedWatching_APIServer must be embedded to have forward compatible implementations. +type UnimplementedWatching_APIServer struct { +} + +func (UnimplementedWatching_APIServer) StartWatchingLedgerChannel(Watching_API_StartWatchingLedgerChannelServer) error { + return status.Errorf(codes.Unimplemented, "method StartWatchingLedgerChannel not implemented") +} +func (UnimplementedWatching_APIServer) StopWatching(context.Context, *StopWatchingReq) (*StopWatchingResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method StopWatching not implemented") +} +func (UnimplementedWatching_APIServer) mustEmbedUnimplementedWatching_APIServer() {} + +// UnsafeWatching_APIServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to Watching_APIServer will +// result in compilation errors. +type UnsafeWatching_APIServer interface { + mustEmbedUnimplementedWatching_APIServer() +} + +func RegisterWatching_APIServer(s grpc.ServiceRegistrar, srv Watching_APIServer) { + s.RegisterService(&Watching_API_ServiceDesc, srv) +} + +func _Watching_API_StartWatchingLedgerChannel_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(Watching_APIServer).StartWatchingLedgerChannel(&watching_APIStartWatchingLedgerChannelServer{stream}) +} + +type Watching_API_StartWatchingLedgerChannelServer interface { + Send(*StartWatchingLedgerChannelResp) error + Recv() (*StartWatchingLedgerChannelReq, error) + grpc.ServerStream +} + +type watching_APIStartWatchingLedgerChannelServer struct { + grpc.ServerStream +} + +func (x *watching_APIStartWatchingLedgerChannelServer) Send(m *StartWatchingLedgerChannelResp) error { + return x.ServerStream.SendMsg(m) +} + +func (x *watching_APIStartWatchingLedgerChannelServer) Recv() (*StartWatchingLedgerChannelReq, error) { + m := new(StartWatchingLedgerChannelReq) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Watching_API_StopWatching_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopWatchingReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(Watching_APIServer).StopWatching(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Watching_API_StopWatching_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(Watching_APIServer).StopWatching(ctx, req.(*StopWatchingReq)) + } + return interceptor(ctx, in, info, handler) +} + +// Watching_API_ServiceDesc is the grpc.ServiceDesc for Watching_API service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Watching_API_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pb.Watching_API", + HandlerType: (*Watching_APIServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "StopWatching", + Handler: _Watching_API_StopWatching_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StartWatchingLedgerChannel", + Handler: _Watching_API_StartWatchingLedgerChannel_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "watching_service.proto", +} diff --git a/api/grpc/server.go b/api/grpc/server.go index 54817305..8c1bcaa0 100644 --- a/api/grpc/server.go +++ b/api/grpc/server.go @@ -17,44 +17,21 @@ package grpc import ( - "context" "net" "github.com/pkg/errors" grpclib "google.golang.org/grpc" - psync "perun.network/go-perun/pkg/sync" + pchannel "perun.network/go-perun/channel" "github.com/hyperledger-labs/perun-node" "github.com/hyperledger-labs/perun-node/api/grpc/pb" - "github.com/hyperledger-labs/perun-node/app/payment" + "github.com/hyperledger-labs/perun-node/api/handlers" ) -// payChAPIServer represents a grpc server that can serve payment channel API. -type payChAPIServer struct { - n perun.NodeAPI - - // The mutex should be used when accessing the map data structures. - psync.Mutex - - // These maps are used to hold an signal channel for each active subscription. - // When a subscription is registered, subscribe function will add an entry to the - // map corresponding to the subscription type. - // The unsubscribe call should retrieve the channel from the map and close it, which - // will signal the subscription routine to end. - // - // chProposalsNotif works on per session basis and hence this is a map - // of session id to signaling channel. - // chUpdatesNotif works on a per channel basis and hence this is a map of session id to - // channel id to signaling channel. - - chProposalsNotif map[string]chan bool - chUpdatesNotif map[string]map[string]chan bool -} - -// ListenAndServePayChAPI starts a payment channel API server that listens for incoming grpc +// ServePaymentAPI starts a payment channel API server that listens for incoming grpc // requests at the specified address and serves those requests using the node API instance. -func ListenAndServePayChAPI(n perun.NodeAPI, grpcPort string) error { - apiServer := &payChAPIServer{ +func ServePaymentAPI(n perun.NodeAPI, grpcPort string) error { + paymentChServer := &payChAPIServer{ n: n, chProposalsNotif: make(map[string]chan bool), chUpdatesNotif: make(map[string]map[string]chan bool), @@ -65,809 +42,40 @@ func ListenAndServePayChAPI(n perun.NodeAPI, grpcPort string) error { return errors.Wrap(err, "starting listener") } grpcServer := grpclib.NewServer() - pb.RegisterPayment_APIServer(grpcServer, apiServer) + pb.RegisterPayment_APIServer(grpcServer, paymentChServer) return grpcServer.Serve(listener) } -// GetConfig wraps node.GetConfig. -func (a *payChAPIServer) GetConfig(context.Context, *pb.GetConfigReq) (*pb.GetConfigResp, error) { - cfg := a.n.GetConfig() - return &pb.GetConfigResp{ - ChainAddress: cfg.ChainURL, - Adjudicator: cfg.Adjudicator, - AssetETH: cfg.AssetETH, - CommTypes: cfg.CommTypes, - IdProviderTypes: cfg.IDProviderTypes, - }, nil -} - -// Time wraps node.Time. -func (a *payChAPIServer) Time(context.Context, *pb.TimeReq) (*pb.TimeResp, error) { - return &pb.TimeResp{ - Time: a.n.Time(), - }, nil -} - -// RegisterCurrency wraps node.RegisterCurrency. -func (a *payChAPIServer) RegisterCurrency(ctx context.Context, req *pb.RegisterCurrencyReq) ( - *pb.RegisterCurrencyResp, error) { - errResponse := func(err perun.APIError) *pb.RegisterCurrencyResp { - return &pb.RegisterCurrencyResp{ - Response: &pb.RegisterCurrencyResp_Error{ - Error: toGrpcError(err), - }, - } - } - - symbol, err := a.n.RegisterCurrency(req.TokenAddr, req.AssetAddr) - if err != nil { - return errResponse(err), nil - } - - return &pb.RegisterCurrencyResp{ - Response: &pb.RegisterCurrencyResp_MsgSuccess_{ - MsgSuccess: &pb.RegisterCurrencyResp_MsgSuccess{ - Symbol: symbol, - }, - }, - }, nil -} - -// Help wraps node.Help. -func (a *payChAPIServer) Help(context.Context, *pb.HelpReq) (*pb.HelpResp, error) { - return &pb.HelpResp{ - Apis: a.n.Help(), - }, nil -} - -// OpenSession wraps node.OpenSession. -func (a *payChAPIServer) OpenSession(ctx context.Context, req *pb.OpenSessionReq) (*pb.OpenSessionResp, error) { - errResponse := func(err perun.APIError) *pb.OpenSessionResp { - return &pb.OpenSessionResp{ - Response: &pb.OpenSessionResp_Error{ - Error: toGrpcError(err), - }, - } - } - - sessionID, restoredChs, err := payment.OpenSession(a.n, req.ConfigFile) - if err != nil { - return errResponse(err), nil - } - - a.Lock() - a.chUpdatesNotif[sessionID] = make(map[string]chan bool) - a.Unlock() - - return &pb.OpenSessionResp{ - Response: &pb.OpenSessionResp_MsgSuccess_{ - MsgSuccess: &pb.OpenSessionResp_MsgSuccess{ - SessionID: sessionID, - RestoredChs: toGrpcPayChsInfo(restoredChs), - }, - }, - }, nil -} - -// AddPeerID wraps session.AddPeerID. -func (a *payChAPIServer) AddPeerID(ctx context.Context, req *pb.AddPeerIDReq) (*pb.AddPeerIDResp, error) { - errResponse := func(err perun.APIError) *pb.AddPeerIDResp { - return &pb.AddPeerIDResp{ - Response: &pb.AddPeerIDResp_Error{ - Error: toGrpcError(err), - }, - } - } - - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - err = sess.AddPeerID(perun.PeerID{ - Alias: req.PeerID.Alias, - OffChainAddrString: req.PeerID.OffChainAddress, - CommAddr: req.PeerID.CommAddress, - CommType: req.PeerID.CommType, - }) - if err != nil { - return errResponse(err), nil - } - - return &pb.AddPeerIDResp{ - Response: &pb.AddPeerIDResp_MsgSuccess_{ - MsgSuccess: &pb.AddPeerIDResp_MsgSuccess{ - Success: true, - }, - }, - }, nil -} - -// GetPeerID wraps session.GetPeerID. -func (a *payChAPIServer) GetPeerID(ctx context.Context, req *pb.GetPeerIDReq) (*pb.GetPeerIDResp, error) { - errResponse := func(err perun.APIError) *pb.GetPeerIDResp { - return &pb.GetPeerIDResp{ - Response: &pb.GetPeerIDResp_Error{ - Error: toGrpcError(err), - }, - } - } - - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - peerID, err := sess.GetPeerID(req.Alias) - if err != nil { - return errResponse(err), nil - } - - return &pb.GetPeerIDResp{ - Response: &pb.GetPeerIDResp_MsgSuccess_{ - MsgSuccess: &pb.GetPeerIDResp_MsgSuccess{ - PeerID: &pb.PeerID{ - Alias: peerID.Alias, - OffChainAddress: peerID.OffChainAddrString, - CommAddress: peerID.CommAddr, - CommType: peerID.CommType, - }, - }, - }, - }, nil -} - -// OpenPayCh wraps payment.OpenPayCh. -func (a *payChAPIServer) OpenPayCh(ctx context.Context, req *pb.OpenPayChReq) (*pb.OpenPayChResp, error) { - errResponse := func(err perun.APIError) *pb.OpenPayChResp { - return &pb.OpenPayChResp{ - Response: &pb.OpenPayChResp_Error{ - Error: toGrpcError(err), - }, - } - } - - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - openingBalInfo := fromGrpcBalInfo(req.OpeningBalInfo) - payChInfo, err := payment.OpenPayCh(ctx, sess, openingBalInfo, req.ChallengeDurSecs) - if err != nil { - return errResponse(err), nil - } - - return &pb.OpenPayChResp{ - Response: &pb.OpenPayChResp_MsgSuccess_{ - MsgSuccess: &pb.OpenPayChResp_MsgSuccess{ - OpenedPayChInfo: &pb.PayChInfo{ - ChID: payChInfo.ChID, - BalInfo: ToGrpcBalInfo(payChInfo.BalInfo), - Version: payChInfo.Version, - }, - }, - }, - }, nil -} - -// GetPayChsInfo wraps payment.GetPayChs. -func (a *payChAPIServer) GetPayChsInfo(ctx context.Context, req *pb.GetPayChsInfoReq) (*pb.GetPayChsInfoResp, error) { - errResponse := func(err perun.APIError) *pb.GetPayChsInfoResp { - return &pb.GetPayChsInfoResp{ - Response: &pb.GetPayChsInfoResp_Error{ - Error: toGrpcError(err), - }, - } - } - - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - openPayChsInfo := payment.GetPayChsInfo(sess) - if err != nil { - return errResponse(err), nil - } - - return &pb.GetPayChsInfoResp{ - Response: &pb.GetPayChsInfoResp_MsgSuccess_{ - MsgSuccess: &pb.GetPayChsInfoResp_MsgSuccess{ - OpenPayChsInfo: toGrpcPayChsInfo(openPayChsInfo), - }, - }, - }, nil -} - -// SubPayChProposals wraps payment.SubPayChProposals. -func (a *payChAPIServer) SubPayChProposals(req *pb.SubPayChProposalsReq, - srv pb.Payment_API_SubPayChProposalsServer) error { - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - // TODO: (mano) Return a error response and not a protocol error - return errors.WithMessage(err, "cannot register subscription") - } - - notifier := func(notif payment.PayChProposalNotif) { - err := srv.Send(&pb.SubPayChProposalsResp{Response: &pb.SubPayChProposalsResp_Notify_{ - Notify: &pb.SubPayChProposalsResp_Notify{ - ProposalID: notif.ProposalID, - OpeningBalInfo: ToGrpcBalInfo(notif.OpeningBalInfo), - ChallengeDurSecs: notif.ChallengeDurSecs, - Expiry: notif.Expiry, - }, - }}) - _ = err - // if err != nil { - // TODO: (mano) Handle error while sending. - // } - } - err = payment.SubPayChProposals(sess, notifier) - if err != nil { - // TODO: (mano) Return a error response and not a protocol error - return errors.WithMessage(err, "cannot register subscription") - } - - signal := make(chan bool) - a.Lock() - a.chProposalsNotif[req.SessionID] = signal - a.Unlock() - - <-signal - return nil -} - -// UnsubPayChProposals wraps payment.UnsubPayChProposals. -func (a *payChAPIServer) UnsubPayChProposals(ctx context.Context, req *pb.UnsubPayChProposalsReq) ( - *pb.UnsubPayChProposalsResp, error) { - errResponse := func(err perun.APIError) *pb.UnsubPayChProposalsResp { - return &pb.UnsubPayChProposalsResp{ - Response: &pb.UnsubPayChProposalsResp_Error{ - Error: toGrpcError(err), - }, - } - } - - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - err = payment.UnsubPayChProposals(sess) - if err != nil { - return errResponse(err), nil - } - - a.closeGrpcPayChProposalSub(req.SessionID) - - return &pb.UnsubPayChProposalsResp{ - Response: &pb.UnsubPayChProposalsResp_MsgSuccess_{ - MsgSuccess: &pb.UnsubPayChProposalsResp_MsgSuccess{ - Success: true, - }, - }, - }, nil -} - -func (a *payChAPIServer) closeGrpcPayChProposalSub(sessionID string) { - a.Lock() - signal := a.chProposalsNotif[sessionID] - delete(a.chProposalsNotif, sessionID) - a.Unlock() - close(signal) -} - -// RespondPayChProposal wraps payment.RespondPayChProposal. -func (a *payChAPIServer) RespondPayChProposal(ctx context.Context, req *pb.RespondPayChProposalReq) ( - *pb.RespondPayChProposalResp, error) { - errResponse := func(err perun.APIError) *pb.RespondPayChProposalResp { - return &pb.RespondPayChProposalResp{ - Response: &pb.RespondPayChProposalResp_Error{ - Error: toGrpcError(err), - }, - } - } - - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - openedPayChInfo, err := payment.RespondPayChProposal(ctx, sess, req.ProposalID, req.Accept) - if err != nil { - return errResponse(err), nil - } - - return &pb.RespondPayChProposalResp{ - Response: &pb.RespondPayChProposalResp_MsgSuccess_{ - MsgSuccess: &pb.RespondPayChProposalResp_MsgSuccess{ - OpenedPayChInfo: toGrpcPayChInfo(openedPayChInfo), - }, - }, - }, nil -} - -// CloseSession wraps payment.CloseSession. -func (a *payChAPIServer) CloseSession(ctx context.Context, req *pb.CloseSessionReq) (*pb.CloseSessionResp, error) { - errResponse := func(err perun.APIError) *pb.CloseSessionResp { - return &pb.CloseSessionResp{ - Response: &pb.CloseSessionResp_Error{ - Error: toGrpcError(err), - }, - } - } - - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - openPayChsInfo, err := payment.CloseSession(sess, req.Force) - if err != nil { - return errResponse(err), nil - } - - return &pb.CloseSessionResp{ - Response: &pb.CloseSessionResp_MsgSuccess_{ - MsgSuccess: &pb.CloseSessionResp_MsgSuccess{ - OpenPayChsInfo: toGrpcPayChsInfo(openPayChsInfo), - }, - }, - }, nil -} - -// DeployAssetERC20 wraps session.DeployAssetERC20. -func (a *payChAPIServer) DeployAssetERC20(ctx context.Context, req *pb.DeployAssetERC20Req) ( - *pb.DeployAssetERC20Resp, error) { - errResponse := func(err perun.APIError) *pb.DeployAssetERC20Resp { - return &pb.DeployAssetERC20Resp{ - Response: &pb.DeployAssetERC20Resp_Error{ - Error: toGrpcError(err), - }, - } - } - - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - assetAddr, err := sess.DeployAssetERC20(req.TokenAddr) - if err != nil { - return errResponse(err), nil - } - - return &pb.DeployAssetERC20Resp{ - Response: &pb.DeployAssetERC20Resp_MsgSuccess_{ - MsgSuccess: &pb.DeployAssetERC20Resp_MsgSuccess{ - AssetAddr: assetAddr, - }, - }, - }, nil -} - -// SendPayChUpdate wraps payment.SendPayChUpdate. -func (a *payChAPIServer) SendPayChUpdate(ctx context.Context, req *pb.SendPayChUpdateReq) ( - *pb.SendPayChUpdateResp, error) { - errResponse := func(err perun.APIError) *pb.SendPayChUpdateResp { - return &pb.SendPayChUpdateResp{ - Response: &pb.SendPayChUpdateResp_Error{ - Error: toGrpcError(err), - }, - } - } - - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - ch, err := sess.GetCh(req.ChID) - if err != nil { - return errResponse(err), nil - } - updatedPayChInfo, err := payment.SendPayChUpdate(ctx, ch, fromGrpcPayments(req.Payments)) - if err != nil { - return errResponse(err), nil - } - - return &pb.SendPayChUpdateResp{ - Response: &pb.SendPayChUpdateResp_MsgSuccess_{ - MsgSuccess: &pb.SendPayChUpdateResp_MsgSuccess{ - UpdatedPayChInfo: toGrpcPayChInfo(updatedPayChInfo), - }, - }, - }, nil -} - -// SubPayChUpdates wraps payment.SubPayChUpdates. -func (a *payChAPIServer) SubPayChUpdates(req *pb.SubpayChUpdatesReq, srv pb.Payment_API_SubPayChUpdatesServer) error { - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - // TODO: (mano) Return a error response and not a protocol error. - return errors.WithMessage(err, "cannot register subscription") - } - ch, err := sess.GetCh(req.ChID) - if err != nil { - return errors.WithMessage(err, "cannot register subscription") - } - - notifier := func(notif payment.PayChUpdateNotif) { - var notifErr *pb.MsgError - if notif.Error != nil { - notifErr = toGrpcError(notif.Error) - } - - err := srv.Send(&pb.SubPayChUpdatesResp{Response: &pb.SubPayChUpdatesResp_Notify_{ - Notify: &pb.SubPayChUpdatesResp_Notify{ - UpdateID: notif.UpdateID, - ProposedPayChInfo: toGrpcPayChInfo(notif.ProposedPayChInfo), - Type: ToGrpcChUpdateType[notif.Type], - Expiry: notif.Expiry, - Error: notifErr, - }, - }}) - _ = err - // if err != nil { - // // TODO: (mano) Error handling when sending notification. - // } - - // Close grpc subscription function (SubPayChUpdates) that will be running in the background. - if perun.ChUpdateTypeClosed == notif.Type { - a.closeGrpcPayChUpdateSub(req.SessionID, req.ChID) - } - } - err = payment.SubPayChUpdates(ch, notifier) - if err != nil { - // TODO: (mano) Error handling when sending notification. - return errors.WithMessage(err, "cannot register subscription") - } - - signal := make(chan bool) - a.Lock() - a.chUpdatesNotif[req.SessionID][req.ChID] = signal - a.Unlock() - - <-signal - return nil -} - -// ToGrpcChUpdateType is a helper var that maps enums from ChUpdateType type defined in perun-node -// to ChUpdateType type defined in grpc package. -var ToGrpcChUpdateType = map[perun.ChUpdateType]pb.SubPayChUpdatesResp_Notify_ChUpdateType{ - perun.ChUpdateTypeOpen: pb.SubPayChUpdatesResp_Notify_open, - perun.ChUpdateTypeFinal: pb.SubPayChUpdatesResp_Notify_final, - perun.ChUpdateTypeClosed: pb.SubPayChUpdatesResp_Notify_closed, -} - -// UnsubPayChUpdates wraps payment.UnsubPayChUpdates. -func (a *payChAPIServer) UnsubPayChUpdates(ctx context.Context, req *pb.UnsubPayChUpdatesReq) ( - *pb.UnsubPayChUpdatesResp, error) { - errResponse := func(err perun.APIError) *pb.UnsubPayChUpdatesResp { - return &pb.UnsubPayChUpdatesResp{ - Response: &pb.UnsubPayChUpdatesResp_Error{ - Error: toGrpcError(err), - }, - } - } - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - ch, err := sess.GetCh(req.ChID) - if err != nil { - return errResponse(err), nil - } - err = payment.UnsubPayChUpdates(ch) - if err != nil { - return errResponse(err), nil - } - a.closeGrpcPayChUpdateSub(req.SessionID, req.ChID) - - return &pb.UnsubPayChUpdatesResp{ - Response: &pb.UnsubPayChUpdatesResp_MsgSuccess_{ - MsgSuccess: &pb.UnsubPayChUpdatesResp_MsgSuccess{ - Success: true, - }, - }, - }, nil -} - -func (a *payChAPIServer) closeGrpcPayChUpdateSub(sessionID, chID string) { - a.Lock() - signal := a.chUpdatesNotif[sessionID][chID] - delete(a.chUpdatesNotif[sessionID], chID) - a.Unlock() - close(signal) -} - -// RespondPayChUpdate wraps payment.RespondPayChUpdate. -func (a *payChAPIServer) RespondPayChUpdate(ctx context.Context, req *pb.RespondPayChUpdateReq) ( - *pb.RespondPayChUpdateResp, error) { - errResponse := func(err perun.APIError) *pb.RespondPayChUpdateResp { - return &pb.RespondPayChUpdateResp{ - Response: &pb.RespondPayChUpdateResp_Error{ - Error: toGrpcError(err), - }, - } - } - - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - ch, err := sess.GetCh(req.ChID) - if err != nil { - return errResponse(err), nil - } - updatedPayChInfo, err := payment.RespondPayChUpdate(ctx, ch, req.UpdateID, req.Accept) - if err != nil { - return errResponse(err), nil +// ServeFundingWatchingAPI starts a payment channel API server that listens for incoming grpc +// requests at the specified address and serves those requests using the node API instance. +func ServeFundingWatchingAPI(n perun.NodeAPI, grpcPort string) error { + paymentChServer := &payChAPIServer{ + n: n, + chProposalsNotif: make(map[string]chan bool), + chUpdatesNotif: make(map[string]map[string]chan bool), } - - return &pb.RespondPayChUpdateResp{ - Response: &pb.RespondPayChUpdateResp_MsgSuccess_{ - MsgSuccess: &pb.RespondPayChUpdateResp_MsgSuccess{ - UpdatedPayChInfo: toGrpcPayChInfo(updatedPayChInfo), - }, + fundingServer := &fundingServer{ + FundingHandler: &handlers.FundingHandler{ + N: n, + Subscribes: make(map[string]map[pchannel.ID]pchannel.AdjudicatorSubscription), }, - }, nil -} - -// GetPayChInfo wraps payment.GetBalInfo. -func (a *payChAPIServer) GetPayChInfo(ctx context.Context, req *pb.GetPayChInfoReq) ( - *pb.GetPayChInfoResp, error) { - errResponse := func(err perun.APIError) *pb.GetPayChInfoResp { - return &pb.GetPayChInfoResp{ - Response: &pb.GetPayChInfoResp_Error{ - Error: toGrpcError(err), - }, - } - } - - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil } - ch, err := sess.GetCh(req.ChID) - if err != nil { - return errResponse(err), nil - } - payChInfo := payment.GetPayChInfo(ch) - if err != nil { - return errResponse(err), nil - } - - return &pb.GetPayChInfoResp{ - Response: &pb.GetPayChInfoResp_MsgSuccess_{ - MsgSuccess: &pb.GetPayChInfoResp_MsgSuccess{ - PayChInfo: toGrpcPayChInfo(payChInfo), - }, + watchingServer := &watchingServer{ + WatchingHandler: &handlers.WatchingHandler{ + N: n, + Subscribes: make(map[string]map[pchannel.ID]pchannel.AdjudicatorSubscription), }, - }, nil -} - -// ClosePayCh wraps payment.ClosePayCh. -func (a *payChAPIServer) ClosePayCh(ctx context.Context, req *pb.ClosePayChReq) (*pb.ClosePayChResp, error) { - errResponse := func(err perun.APIError) *pb.ClosePayChResp { - return &pb.ClosePayChResp{ - Response: &pb.ClosePayChResp_Error{ - Error: toGrpcError(err), - }, - } } - sess, err := a.n.GetSession(req.SessionID) - if err != nil { - return errResponse(err), nil - } - ch, err := sess.GetCh(req.ChID) - if err != nil { - return errResponse(err), nil - } - closedPayChInfo, err := payment.ClosePayCh(ctx, ch) + listener, err := net.Listen("tcp", grpcPort) if err != nil { - return errResponse(err), nil - } - - return &pb.ClosePayChResp{ - Response: &pb.ClosePayChResp_MsgSuccess_{ - MsgSuccess: &pb.ClosePayChResp_MsgSuccess{ - ClosedPayChInfo: toGrpcPayChInfo(closedPayChInfo), - }, - }, - }, nil -} - -// ToGrpcPayments is a helper function to convert slice of Payment struct -// defined in perun-node package to slice of Payment struct defined in grpc -// package. -func ToGrpcPayments(payments []payment.Payment) []*pb.Payment { - grpcPayments := make([]*pb.Payment, len(payments)) - for i := range payments { - grpcPayments[i] = ToGrpcPayment(payments[i]) - } - return grpcPayments -} - -// ToGrpcPayment is a helper function to convert Payment struct defined in -// perun-node package to Payment struct defined in gprc package. -func ToGrpcPayment(src payment.Payment) *pb.Payment { - return &pb.Payment{ - Currency: src.Currency, - Payee: src.Payee, - Amount: src.Amount, - } -} - -// fromGrpcPayment is a helper function to convert slice of Payment struct defined in -// grpc package to slice of Payment struct defined in perun-node. -func fromGrpcPayments(payments []*pb.Payment) []payment.Payment { - grpcPayments := make([]payment.Payment, len(payments)) - for i := range payments { - grpcPayments[i] = fromGrpcPayment(payments[i]) - } - return grpcPayments -} - -// fromGrpcPayment is a helper function to convert Payment struct defined in -// grpc package to Payment struct defined in perun-node. -func fromGrpcPayment(src *pb.Payment) payment.Payment { - return payment.Payment{ - Currency: src.Currency, - Payee: src.Payee, - Amount: src.Amount, - } -} - -// toGrpcPayChInfo is a helper function to convert slice of PayChInfo struct defined in perun-node -// to a slice of PayChInfo struct defined in grpc package. -func toGrpcPayChsInfo(payChsInfo []payment.PayChInfo) []*pb.PayChInfo { - grpcPayChsInfo := make([]*pb.PayChInfo, len(payChsInfo)) - for i := range payChsInfo { - grpcPayChsInfo[i] = toGrpcPayChInfo(payChsInfo[i]) - } - return grpcPayChsInfo -} - -// toGrpcPayChInfo is a helper function to convert PayChInfo struct defined in perun-node -// to PayChInfo struct defined in grpc package. -func toGrpcPayChInfo(src payment.PayChInfo) *pb.PayChInfo { - return &pb.PayChInfo{ - ChID: src.ChID, - BalInfo: ToGrpcBalInfo(src.BalInfo), - Version: src.Version, - } -} - -// fromGrpcBalInfo is a helper function to convert BalInfo struct defined in grpc package -// to BalInfo struct defined in perun-node. -func fromGrpcBalInfo(src *pb.BalInfo) perun.BalInfo { - bals := make([][]string, len(src.Bals)) - for i := range src.Bals { - bals[i] = src.Bals[i].Bal - } - return perun.BalInfo{ - Currencies: src.Currencies, - Parts: src.Parts, - Bals: bals, - } -} - -// ToGrpcBalInfo is a helper function to convert BalInfo struct defined in perun-node -// to BalInfo struct defined in grpc package. -func ToGrpcBalInfo(src perun.BalInfo) *pb.BalInfo { - bals := make([]*pb.BalInfoBal, len(src.Bals)) - for i := range src.Bals { - bals[i] = &pb.BalInfoBal{} - bals[i].Bal = src.Bals[i] - } - return &pb.BalInfo{ - Currencies: src.Currencies, - Parts: src.Parts, - Bals: bals, - } -} - -// toGrpcError is a helper function to convert APIError struct defined in perun-node -// to APIError struct defined in grpc package. -func toGrpcError(err perun.APIError) *pb.MsgError { //nolint: funlen - grpcErr := pb.MsgError{ - Category: pb.ErrorCategory(err.Category()), - Code: pb.ErrorCode(err.Code()), - Message: err.Message(), - } - switch info := err.AddInfo().(type) { - case perun.ErrInfoPeerRequestTimedOut: - grpcErr.AddInfo = &pb.MsgError_ErrInfoPeerRequestTimedOut{ - ErrInfoPeerRequestTimedOut: &pb.ErrInfoPeerRequestTimedOut{ - Timeout: info.Timeout, - }, - } - case perun.ErrInfoPeerRejected: - grpcErr.AddInfo = &pb.MsgError_ErrInfoPeerRejected{ - ErrInfoPeerRejected: &pb.ErrInfoPeerRejected{ - PeerAlias: info.PeerAlias, - Reason: info.Reason, - }, - } - case perun.ErrInfoPeerNotFunded: - grpcErr.AddInfo = &pb.MsgError_ErrInfoPeerNotFunded{ - ErrInfoPeerNotFunded: &pb.ErrInfoPeerNotFunded{ - PeerAlias: info.PeerAlias, - }, - } - case perun.ErrInfoUserResponseTimedOut: - grpcErr.AddInfo = &pb.MsgError_ErrInfoUserResponseTimedOut{ - ErrInfoUserResponseTimedOut: &pb.ErrInfoUserResponseTimedOut{ - Expiry: info.Expiry, - ReceivedAt: info.ReceivedAt, - }, - } - case perun.ErrInfoResourceNotFound: - grpcErr.AddInfo = &pb.MsgError_ErrInfoResourceNotFound{ - ErrInfoResourceNotFound: &pb.ErrInfoResourceNotFound{ - Type: info.Type, - Id: info.ID, - }, - } - case perun.ErrInfoResourceExists: - grpcErr.AddInfo = &pb.MsgError_ErrInfoResourceExists{ - ErrInfoResourceExists: &pb.ErrInfoResourceExists{ - Type: info.Type, - Id: info.ID, - }, - } - case perun.ErrInfoInvalidArgument: - grpcErr.AddInfo = &pb.MsgError_ErrInfoInvalidArgument{ - ErrInfoInvalidArgument: &pb.ErrInfoInvalidArgument{ - Name: info.Name, - Value: info.Value, - Requirement: info.Requirement, - }, - } - case payment.ErrInfoFailedPreCondUnclosedPayChs: - grpcErr.AddInfo = &pb.MsgError_ErrInfoFailedPreCondUnclosedChs{ - ErrInfoFailedPreCondUnclosedChs: &pb.ErrInfoFailedPreCondUnclosedChs{ - Chs: toGrpcPayChsInfo(info.PayChs), - }, - } - case perun.ErrInfoInvalidConfig: - grpcErr.AddInfo = &pb.MsgError_ErrInfoInvalidConfig{ - ErrInfoInvalidConfig: &pb.ErrInfoInvalidConfig{ - Name: info.Name, - Value: info.Value, - }, - } - case perun.ErrInfoInvalidContracts: - grpcErr.AddInfo = &pb.MsgError_ErrInfoInvalidContracts{ - ErrInfoInvalidContracts: &pb.ErrInfoInvalidContracts{ - ContractErrInfos: toGrpcContractErrInfos(info.ContractErrInfos), - }, - } - case perun.ErrInfoTxTimedOut: - grpcErr.AddInfo = &pb.MsgError_ErrInfoTxTimedOut{ - ErrInfoTxTimedOut: &pb.ErrInfoTxTimedOut{ - TxType: info.TxType, - TxID: info.TxID, - TxTimeout: info.TxTimeout, - }, - } - case perun.ErrInfoChainNotReachable: - grpcErr.AddInfo = &pb.MsgError_ErrInfoChainNotReachable{ - ErrInfoChainNotReachable: &pb.ErrInfoChainNotReachable{ - ChainURL: info.ChainURL, - }, - } - default: - // It is Unknonwn Internal Error which has no additional info. - grpcErr.AddInfo = nil + return errors.Wrap(err, "starting listener") } - return &grpcErr -} + grpcServer := grpclib.NewServer() + pb.RegisterFunding_APIServer(grpcServer, fundingServer) + pb.RegisterWatching_APIServer(grpcServer, watchingServer) + pb.RegisterPayment_APIServer(grpcServer, paymentChServer) -// toGrpcContractErrInfos is a helper function to convert a slice of -// ContractErrInfo struct defined in perun-node to a slice of ContractErrInfo -// struct defined in grpc package. -func toGrpcContractErrInfos(src []perun.ContractErrInfo) []*pb.ContractErrInfo { - output := make([]*pb.ContractErrInfo, len(src)) - for i := range src { - output[i].Name = src[i].Name - output[i].Address = src[i].Address - output[i].Error = src[i].Error - } - return output + return grpcServer.Serve(listener) } diff --git a/api/grpc/watching.go b/api/grpc/watching.go new file mode 100644 index 00000000..7ec0fe95 --- /dev/null +++ b/api/grpc/watching.go @@ -0,0 +1,57 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package grpc + +import ( + "context" + + "github.com/pkg/errors" + + "github.com/hyperledger-labs/perun-node/api/grpc/pb" + "github.com/hyperledger-labs/perun-node/api/handlers" +) + +// watchingServer represents a grpc server that can serve watching API. +type watchingServer struct { + pb.UnimplementedWatching_APIServer + *handlers.WatchingHandler +} + +// StartWatchingLedgerChannel wraps session.StartWatchingLedgerChannel. +func (a *watchingServer) StartWatchingLedgerChannel( + srv pb.Watching_API_StartWatchingLedgerChannelServer, +) error { + req, err := srv.Recv() + if err != nil { + return errors.WithMessage(err, "reading request data") + } + + sendAdjEvent := func(resp *pb.StartWatchingLedgerChannelResp) error { + return srv.Send(resp) + } + + receiveState := func() (req *pb.StartWatchingLedgerChannelReq, err error) { + return srv.Recv() + } + + return a.WatchingHandler.StartWatchingLedgerChannel(req, sendAdjEvent, receiveState) +} + +// StopWatching wraps session.StopWatching. +func (a *watchingServer) StopWatching(ctx context.Context, req *pb.StopWatchingReq) (*pb.StopWatchingResp, error) { + return a.WatchingHandler.StopWatching(ctx, req) +} diff --git a/api/handlers/doc.go b/api/handlers/doc.go new file mode 100644 index 00000000..31acb8cf --- /dev/null +++ b/api/handlers/doc.go @@ -0,0 +1,19 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package handlers implements a the handlers for payment, funding and watching API. +// This is used by different network adapters such as grpc and tcp. +package handlers diff --git a/api/handlers/funding.go b/api/handlers/funding.go new file mode 100644 index 00000000..d9e17eeb --- /dev/null +++ b/api/handlers/funding.go @@ -0,0 +1,302 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package handlers + +import ( + "context" + "fmt" + + pchannel "perun.network/go-perun/channel" + psync "polycry.pt/poly-go/sync" + + "github.com/pkg/errors" + + "github.com/hyperledger-labs/perun-node" + "github.com/hyperledger-labs/perun-node/api/grpc/pb" +) + +// FundingHandler represents a grpc server that can serve funding API. +type FundingHandler struct { + N perun.NodeAPI + + // The mutex should be used when accessing the map data structures. + psync.Mutex + Subscribes map[string]map[pchannel.ID]pchannel.AdjudicatorSubscription +} + +// Fund wraps session.Fund. +func (a *FundingHandler) Fund(ctx context.Context, req *pb.FundReq) (*pb.FundResp, error) { + errResponse := func(err perun.APIError) *pb.FundResp { + return &pb.FundResp{ + Error: pb.FromError(err), + } + } + + sess, apiErr := a.N.GetSession(req.SessionID) + if apiErr != nil { + return errResponse(apiErr), nil + } + fundingReq, err := pb.ToFundingReq(req) + if err != nil { + return errResponse(perun.NewAPIErrUnknownInternal(err)), nil + } + + err = sess.Fund(ctx, fundingReq) + if err != nil { + return errResponse(perun.NewAPIErrUnknownInternal(err)), nil + } + + return &pb.FundResp{ + Error: nil, + }, nil +} + +// RegisterAssetERC20 is a stub that always returns false. Because, the remote +// funder does not support use of assets other than the default ERC20 asset. +// +// TODO: Make actual implementation. +func (a *FundingHandler) RegisterAssetERC20(_ context.Context, _ *pb.RegisterAssetERC20Req) ( + *pb.RegisterAssetERC20Resp, error, +) { + return &pb.RegisterAssetERC20Resp{ + MsgSuccess: false, + }, nil +} + +// IsAssetRegistered wraps session.IsAssetRegistered. +func (a *FundingHandler) IsAssetRegistered(_ context.Context, req *pb.IsAssetRegisteredReq) ( + *pb.IsAssetRegisteredResp, + error, +) { + errResponse := func(err perun.APIError) *pb.IsAssetRegisteredResp { + return &pb.IsAssetRegisteredResp{ + Response: &pb.IsAssetRegisteredResp_Error{ + Error: pb.FromError(err), + }, + } + } + + sess, err := a.N.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + asset := pchannel.NewAsset() + err2 := asset.UnmarshalBinary(req.Asset) + if err2 != nil { + err = perun.NewAPIErrInvalidArgument(err2, "asset", fmt.Sprintf("%x", req.Asset)) + return errResponse(err), nil + } + + isRegistered := sess.IsAssetRegistered(asset) + + return &pb.IsAssetRegisteredResp{ + Response: &pb.IsAssetRegisteredResp_MsgSuccess_{ + MsgSuccess: &pb.IsAssetRegisteredResp_MsgSuccess{ + IsRegistered: isRegistered, + }, + }, + }, nil +} + +// Register wraps session.Register. +func (a *FundingHandler) Register(ctx context.Context, req *pb.RegisterReq) (*pb.RegisterResp, error) { + errResponse := func(err perun.APIError) *pb.RegisterResp { + return &pb.RegisterResp{ + Error: pb.FromError(err), + } + } + + sess, err := a.N.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + adjReq, err2 := pb.ToAdjReq(req.AdjReq) + if err2 != nil { + return errResponse(perun.NewAPIErrUnknownInternal(err2)), nil + } + signedStates := make([]pchannel.SignedState, len(req.SignedStates)) + for i := range signedStates { + signedStates[i], err2 = pb.ToSignedState(req.SignedStates[i]) + if err2 != nil { + return errResponse(perun.NewAPIErrUnknownInternal(err2)), nil + } + } + + err2 = sess.Register(ctx, adjReq, signedStates) + if err2 != nil { + return errResponse(perun.NewAPIErrUnknownInternal(err2)), nil + } + + return &pb.RegisterResp{ + Error: nil, + }, nil +} + +// Withdraw wraps session.Withdraw. +func (a *FundingHandler) Withdraw(ctx context.Context, req *pb.WithdrawReq) (*pb.WithdrawResp, error) { + errResponse := func(err perun.APIError) *pb.WithdrawResp { + return &pb.WithdrawResp{ + Error: pb.FromError(err), + } + } + + sess, err := a.N.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + adjReq, err2 := pb.ToAdjReq(req.AdjReq) + if err2 != nil { + return errResponse(perun.NewAPIErrUnknownInternal(err2)), nil + } + stateMap := pchannel.StateMap(make(map[pchannel.ID]*pchannel.State)) + + for i := range req.StateMap { + var id pchannel.ID + copy(id[:], req.StateMap[i].Id) + stateMap[id], err2 = pb.ToState(req.StateMap[i].State) + if err2 != nil { + return errResponse(err), nil + } + } + + err2 = sess.Withdraw(ctx, adjReq, stateMap) + if err2 != nil { + return errResponse(perun.NewAPIErrUnknownInternal(err2)), nil + } + + return &pb.WithdrawResp{ + Error: nil, + }, nil +} + +// Progress wraps session.Progress. +func (a *FundingHandler) Progress(ctx context.Context, req *pb.ProgressReq) (*pb.ProgressResp, error) { + errResponse := func(err perun.APIError) *pb.ProgressResp { + return &pb.ProgressResp{ + Error: pb.FromError(err), + } + } + + sess, err := a.N.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + var progReq perun.ProgressReq + var err2 error + progReq.AdjudicatorReq, err2 = pb.ToAdjReq(req.AdjReq) + if err2 != nil { + return errResponse(perun.NewAPIErrUnknownInternal(err2)), nil + } + progReq.NewState, err2 = pb.ToState(req.NewState) + if err2 != nil { + return errResponse(err), nil + } + copy(progReq.Sig, req.Sig) + + err2 = sess.Progress(ctx, progReq) + if err2 != nil { + return errResponse(perun.NewAPIErrUnknownInternal(err2)), nil + } + + return &pb.ProgressResp{ + Error: nil, + }, nil +} + +// Subscribe wraps session.Subscribe. +func (a *FundingHandler) Subscribe(req *pb.SubscribeReq, notify func(notif *pb.SubscribeResp) error) error { + sess, err := a.N.GetSession(req.SessionID) + if err != nil { + return errors.WithMessage(err, "retrieving session") + } + + var chID pchannel.ID + copy(chID[:], req.ChID) + + adjSub, err := sess.Subscribe(context.Background(), chID) + if err != nil { + return errors.WithMessage(err, "setting up subscription") + } + + a.Lock() + if a.Subscribes[req.SessionID] == nil { + a.Subscribes[req.SessionID] = make(map[pchannel.ID]pchannel.AdjudicatorSubscription) + } + a.Subscribes[req.SessionID][chID] = adjSub + a.Unlock() + + // This stream is anyways closed when StopWatching is called for. + // Hence, that will act as the exit condition for the loop. + go func() { + // will return nil, when the sub is closed. + // so, we need a mechanism to call close on the server side. + // so, add a call Unsubscribe, which simply calls close. + for { + adjEvent := adjSub.Next() + if adjEvent == nil { + err := errors.WithMessage(adjSub.Err(), "sub closed with error") + notif := &pb.SubscribeResp_Error{ + Error: pb.FromError(perun.NewAPIErrUnknownInternal(err)), + } + // TODO: Proper error handling. For now, ignore this error. + _ = notify(&pb.SubscribeResp{Response: notif}) //nolint: errcheck + return + } + notif, err := pb.SubscribeResponseFromAdjEvent(adjEvent) + if err != nil { + return + } + err = notify(notif) + if err != nil { + return + } + } + }() + + return nil +} + +// Unsubscribe wraps session.Unsubscribe. +func (a *FundingHandler) Unsubscribe(_ context.Context, req *pb.UnsubscribeReq) (*pb.UnsubscribeResp, error) { + errResponse := func(err perun.APIError) *pb.UnsubscribeResp { + return &pb.UnsubscribeResp{ + Error: pb.FromError(err), + } + } + + var chID pchannel.ID + copy(chID[:], req.ChID) + + a.Lock() + if _, ok := a.Subscribes[req.SessionID]; !ok { + return errResponse(perun.NewAPIErrUnknownInternal(errors.New("unknown session id"))), nil + } + adjSub, ok := a.Subscribes[req.SessionID][chID] + if !ok { + return errResponse(perun.NewAPIErrUnknownInternal(errors.New("unknown channel id"))), nil + } + delete(a.Subscribes[req.SessionID], chID) + a.Unlock() + + if err := adjSub.Close(); err != nil { + return errResponse(perun.NewAPIErrUnknownInternal(errors.WithMessage(err, "closing sub"))), nil + } + + return &pb.UnsubscribeResp{ + Error: nil, + }, nil +} diff --git a/api/handlers/watching.go b/api/handlers/watching.go new file mode 100644 index 00000000..013cbe17 --- /dev/null +++ b/api/handlers/watching.go @@ -0,0 +1,199 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package handlers + +import ( + "context" + + "github.com/pkg/errors" + pchannel "perun.network/go-perun/channel" + pwallet "perun.network/go-perun/wallet" + psync "polycry.pt/poly-go/sync" + + "github.com/hyperledger-labs/perun-node" + "github.com/hyperledger-labs/perun-node/api/grpc/pb" +) + +// WatchingHandler represents a grpc server that can serve watching API. +type WatchingHandler struct { + N perun.NodeAPI + + // The mutex should be used when accessing the map data structures. + psync.Mutex + Subscribes map[string]map[pchannel.ID]pchannel.AdjudicatorSubscription +} + +// StartWatchingLedgerChannel wraps session.StartWatchingLedgerChannel. +func (a *WatchingHandler) StartWatchingLedgerChannel( //nolint: funlen, gocognit + req *pb.StartWatchingLedgerChannelReq, + sendAdjEvent func(resp *pb.StartWatchingLedgerChannelResp) error, + receiveState func() (req *pb.StartWatchingLedgerChannelReq, err error), +) error { + var err error + sess, err := a.N.GetSession(req.SessionID) + if err != nil { + return errors.WithMessage(err, "retrieving session") + } + + signedState, err := signedStateFromProtoLedgerChReq(req) + if err != nil { + return errors.WithMessage(err, "parsing signed state") + } + + statesPub, adjSub, err := sess.StartWatchingLedgerChannel(context.TODO(), *signedState) + if err != nil { + return errors.WithMessage(err, "start watching") + } + + // This stream is anyways closed when StopWatching is called for. + // Hence, that will act as the exit condition for the loop. + go func() { + adjEventStream := adjSub.EventStream() + var protoResponse *pb.StartWatchingLedgerChannelResp + for { + adjEvent, isOpen := <-adjEventStream + if !isOpen { + return + } + protoResponse, err = adjEventToProtoLedgerChResp(adjEvent) + if err != nil { + return + } + + // Handle error while sending notification. + err = sendAdjEvent(protoResponse) + if err != nil { + return + } + } + }() + + // It should be the responsibility of the streamer to close things. + // Hence, the client should be closing this stream, which will cause srv.Recv to return an error. + // The error will act as the exit condition for this for{} loop. + var tx *pchannel.Transaction +StatesPubLoop: + for { + + req, err = receiveState() + if err != nil { + err = errors.WithMessage(err, "reading published states pub data") + break StatesPubLoop + } + tx, err = transactionFromProtoLedgerChReq(req) + if err != nil { + err = errors.WithMessage(err, "parsing published states pub data") + break StatesPubLoop + } + + err = statesPub.Publish(context.TODO(), *tx) + if err != nil { + err = errors.WithMessage(err, "locally relaying published states pub data") + break StatesPubLoop + } + } + + // TODO: Ensure adjEventSteam go-routine is killed. It should not be leaking. + // It is to allow for that, label breaks are used instead of return statements in the above for-select. + return err +} + +// StopWatching wraps session.StopWatching. +func (a *WatchingHandler) StopWatching(ctx context.Context, req *pb.StopWatchingReq) (*pb.StopWatchingResp, error) { + errResponse := func(err perun.APIError) *pb.StopWatchingResp { + return &pb.StopWatchingResp{ + Error: pb.FromError(err), + } + } + + sess, err := a.N.GetSession(req.SessionID) + if err != nil { + return errResponse(err), nil + } + var chID pchannel.ID + copy(chID[:], req.ChID) + err2 := sess.StopWatching(ctx, chID) + if err2 != nil { + return errResponse(err), nil + } + + return &pb.StopWatchingResp{Error: nil}, nil +} + +func adjEventToProtoLedgerChResp(adjEvent pchannel.AdjudicatorEvent) (*pb.StartWatchingLedgerChannelResp, error) { + protoResponse := &pb.StartWatchingLedgerChannelResp{} + switch e := adjEvent.(type) { + case *pchannel.RegisteredEvent: + registeredEvent, err := pb.FromRegisteredEvent(e) + protoResponse.Response = &pb.StartWatchingLedgerChannelResp_RegisteredEvent{ + RegisteredEvent: registeredEvent, + } + return protoResponse, err + case *pchannel.ProgressedEvent: + progressedEvent, err := pb.FromProgressedEvent(e) + protoResponse.Response = &pb.StartWatchingLedgerChannelResp_ProgressedEvent{ + ProgressedEvent: progressedEvent, + } + return protoResponse, err + case *pchannel.ConcludedEvent: + concludedEvent, err := pb.FromConcludedEvent(e) + protoResponse.Response = &pb.StartWatchingLedgerChannelResp_ConcludedEvent{ + ConcludedEvent: concludedEvent, + } + return protoResponse, err + default: + apiErr := perun.NewAPIErrUnknownInternal(errors.New("unknown even type")) + protoResponse.Response = &pb.StartWatchingLedgerChannelResp_Error{ + Error: pb.FromError(apiErr), + } + return protoResponse, nil + } +} + +func signedStateFromProtoLedgerChReq(req *pb.StartWatchingLedgerChannelReq) ( + signedState *pchannel.SignedState, err error, +) { + signedState = &pchannel.SignedState{} + signedState.Params, err = pb.ToParams(req.Params) + if err != nil { + return nil, err + } + signedState.State, err = pb.ToState(req.State) + if err != nil { + return nil, err + } + sigs := make([]pwallet.Sig, len(req.Sigs)) + for i := range sigs { + copy(sigs[i], req.Sigs[i]) + } + return signedState, nil +} + +func transactionFromProtoLedgerChReq(req *pb.StartWatchingLedgerChannelReq) ( + transaction *pchannel.Transaction, err error, +) { + transaction = &pchannel.Transaction{} + transaction.State, err = pb.ToState(req.State) + if err != nil { + return nil, err + } + transaction.Sigs = make([]pwallet.Sig, len(req.Sigs)) + for i := range transaction.Sigs { + copy(transaction.Sigs[i], req.Sigs[i]) + } + return transaction, nil +} diff --git a/api/tcp/doc.go b/api/tcp/doc.go new file mode 100644 index 00000000..9f058dc8 --- /dev/null +++ b/api/tcp/doc.go @@ -0,0 +1,19 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package peruntcp implements a funding and watching API server over tcp with +// perun protobuf encoding. +package peruntcp diff --git a/api/tcp/server.go b/api/tcp/server.go new file mode 100644 index 00000000..ba7e60c4 --- /dev/null +++ b/api/tcp/server.go @@ -0,0 +1,252 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package peruntcp + +import ( + "context" + "encoding/binary" + "errors" + "fmt" + "io" + "net" + + "github.com/hyperledger-labs/perun-node" + "github.com/hyperledger-labs/perun-node/api/grpc/pb" + "github.com/hyperledger-labs/perun-node/api/handlers" + "github.com/hyperledger-labs/perun-node/app/payment" + + "google.golang.org/protobuf/proto" + pchannel "perun.network/go-perun/channel" + "perun.network/go-perun/log" + psync "polycry.pt/poly-go/sync" +) + +type server struct { + psync.Closer + + server net.Listener + + fundingHandler *handlers.FundingHandler + watchingHandler *handlers.WatchingHandler + + sessionID string // For timebeing use hard-coded session-id + + channels map[string](chan *pb.StartWatchingLedgerChannelReq) + channelsMtx psync.Mutex +} + +// ServeFundingWatchingAPI starts a payment channel API server that listens for incoming grpc +// requests at the specified address and serves those requests using the node API instance. +func ServeFundingWatchingAPI(n perun.NodeAPI, port string) error { + var err error + sessionID, _, err := payment.OpenSession(n, "api/session.yaml") + if err != nil { + return err + } + + fundingServer := &handlers.FundingHandler{ + N: n, + Subscribes: make(map[string]map[pchannel.ID]pchannel.AdjudicatorSubscription), + } + watchingServer := &handlers.WatchingHandler{ + N: n, + Subscribes: make(map[string]map[pchannel.ID]pchannel.AdjudicatorSubscription), + } + + tcpServer, err := net.Listen("tcp", port) + if err != nil { + return fmt.Errorf("listener: %w", err) + } + + s := &server{ + server: tcpServer, + fundingHandler: fundingServer, + watchingHandler: watchingServer, + sessionID: sessionID, + + channels: make(map[string](chan *pb.StartWatchingLedgerChannelReq), 10), + } + s.OnCloseAlways(func() { tcpServer.Close() }) //nolint: errcheck, gosec + + for { + conn, err := s.server.Accept() + if err != nil { + return err + } + + go s.handle(conn) + } +} + +func (s *server) handle(conn io.ReadWriteCloser) { + defer conn.Close() //nolint: errcheck + s.OnCloseAlways(func() { conn.Close() }) //nolint: errcheck, gosec + + var m psync.Mutex + + for { + msg, err := recvMsg(conn) + // log.Info("received message", msg, err) + if err != nil { + log.Errorf("%+v", msg) + log.Errorf("here decoding message failed: %v", err) + return + } + + go func() { + switch msg := msg.GetMsg().(type) { + case *pb.APIMessage_FundReq: + s.handleFundReq(msg, &m, conn) + + case *pb.APIMessage_RegisterReq: + s.handleRegisterReq(msg, &m, conn) + case *pb.APIMessage_WithdrawReq: + s.handleWithdrawReq(msg, &m, conn) + case *pb.APIMessage_StartWatchingLedgerChannelReq: + s.handleStartWatchingLedgerChannelReq(msg) + case *pb.APIMessage_StopWatchingReq: + s.handleStopWatching(msg) + + } + }() + } +} + +func (s *server) handleFundReq(msg *pb.APIMessage_FundReq, m *psync.Mutex, conn io.ReadWriteCloser) { //nolint: dupl + log.Warnf("Server: Got Funding request") + msg.FundReq.SessionID = s.sessionID + fundResp, err := s.fundingHandler.Fund(context.Background(), msg.FundReq) + if err != nil { + log.Errorf("fund response error +%v", err) + } + err = sendMsg(m, conn, &pb.APIMessage{Msg: &pb.APIMessage_FundResp{ + FundResp: fundResp, + }}) + if err != nil { + log.Errorf("sending response error +%v", err) + } +} + +//nolint:dupl +func (s *server) handleRegisterReq(msg *pb.APIMessage_RegisterReq, m *psync.Mutex, conn io.ReadWriteCloser) { + log.Warnf("Server: Got Registering request") + msg.RegisterReq.SessionID = s.sessionID + registerResp, err := s.fundingHandler.Register(context.Background(), msg.RegisterReq) + if err != nil { + log.Errorf("register response error +%v", err) + } + err = sendMsg(m, conn, &pb.APIMessage{Msg: &pb.APIMessage_RegisterResp{ + RegisterResp: registerResp, + }}) + if err != nil { + log.Errorf("sending response error +%v", err) + } +} + +//nolint:dupl +func (s *server) handleWithdrawReq(msg *pb.APIMessage_WithdrawReq, m *psync.Mutex, conn io.ReadWriteCloser) { + log.Warnf("Server: Got Withdrawing request") + msg.WithdrawReq.SessionID = s.sessionID + withdrawResp, err := s.fundingHandler.Withdraw(context.Background(), msg.WithdrawReq) + if err != nil { + log.Errorf("withdraw response error +%v", err) + } + err = sendMsg(m, conn, &pb.APIMessage{Msg: &pb.APIMessage_WithdrawResp{ + WithdrawResp: withdrawResp, + }}) + if err != nil { + log.Errorf("sending response error +%v", err) + } +} + +func (s *server) handleStartWatchingLedgerChannelReq(msg *pb.APIMessage_StartWatchingLedgerChannelReq) { + log.Warnf("Server: Got Watching request") + msg.StartWatchingLedgerChannelReq.SessionID = s.sessionID + + s.channelsMtx.Lock() + ch, ok := s.channels[string(msg.StartWatchingLedgerChannelReq.State.Id)] + s.channelsMtx.Unlock() + if ok { + ch <- msg.StartWatchingLedgerChannelReq + return + } + + ch = make(chan *pb.StartWatchingLedgerChannelReq, 10) + s.channelsMtx.Lock() + s.channels[string(msg.StartWatchingLedgerChannelReq.State.Id)] = ch + s.channelsMtx.Unlock() + + receiveState := func() (*pb.StartWatchingLedgerChannelReq, error) { + update, ok := <-ch + if !ok { + return nil, errors.New("subscription closed") + } + return update, nil + } + + sendAdjEvent := func(resp *pb.StartWatchingLedgerChannelResp) error { + return nil + } + + err := s.watchingHandler.StartWatchingLedgerChannel( + msg.StartWatchingLedgerChannelReq, + sendAdjEvent, + receiveState) + if err != nil { + log.Errorf("start watching returned with error +%v", err) + } +} + +func (s *server) handleStopWatching(msg *pb.APIMessage_StopWatchingReq) { + msg.StopWatchingReq.SessionID = s.sessionID + _, err := s.watchingHandler.StopWatching(context.Background(), msg.StopWatchingReq) + if err != nil { + log.Errorf("start watching returned with error +%v", err) + } +} + +func recvMsg(conn io.Reader) (*pb.APIMessage, error) { + var size uint16 + if err := binary.Read(conn, binary.BigEndian, &size); err != nil { + return nil, fmt.Errorf("reading size of data from wire: %w", err) + } + data := make([]byte, size) + if _, err := io.ReadFull(conn, data); err != nil { + return nil, fmt.Errorf("reading data from wire: %w", err) + } + var msg pb.APIMessage + if err := proto.Unmarshal(data, &msg); err != nil { + return nil, fmt.Errorf("unmarshaling message: %w", err) + } + return &msg, nil +} + +func sendMsg(m *psync.Mutex, conn io.Writer, msg *pb.APIMessage) error { + m.Lock() + defer m.Unlock() + data, err := proto.Marshal(msg) + if err != nil { + return fmt.Errorf("marshaling message: %w", err) + } + if err = binary.Write(conn, binary.BigEndian, uint16(len(data))); err != nil { + return fmt.Errorf("writing length to wire: %w", err) + } + if _, err = conn.Write(data); err != nil { + return fmt.Errorf("writing data to wire: %w", err) + } + return nil +} diff --git a/app/payment/channel.go b/app/payment/channel.go index 1b3c00d3..7e241ccb 100644 --- a/app/payment/channel.go +++ b/app/payment/channel.go @@ -25,7 +25,6 @@ import ( "github.com/pkg/errors" "github.com/hyperledger-labs/perun-node" - "github.com/hyperledger-labs/perun-node/session" ) // Error type is used to define error constants for this package. @@ -87,25 +86,24 @@ func SendPayChUpdate(pctx context.Context, ch perun.ChAPI, payments []Payment) ( for i := range payments { idxOfCurrencyInBals, currency, found := ch.Currency(payments[i].Currency) if !found { - return PayChInfo{}, perun.NewAPIErrResourceNotFound(session.ResTypeCurrency, payments[i].Currency) + return PayChInfo{}, perun.NewAPIErrResourceNotFound(perun.ResTypeCurrency, payments[i].Currency) } parsedAmount, err := currency.Parse(payments[i].Amount) if err != nil { err = errors.WithMessage(err, ErrInvalidAmount.Error()) - return PayChInfo{}, perun.NewAPIErrInvalidArgument(err, session.ArgNameAmount, payments[i].Amount) + return PayChInfo{}, perun.NewAPIErrInvalidArgument(err, perun.ArgNameAmount, payments[i].Amount) } payerIdx, payeeIdx, err := getPayerPayeeIdx(ch.Parts(), payments[i].Payee) if err != nil { - return PayChInfo{}, perun.NewAPIErrInvalidArgument(err, session.ArgNamePayee, payments[i].Payee) + return PayChInfo{}, perun.NewAPIErrInvalidArgument(err, perun.ArgNamePayee, payments[i].Payee) } updates[i] = newUpdate(payerIdx, payeeIdx, idxOfCurrencyInBals, parsedAmount) } - chInfo, apiErr := ch.SendChUpdate(pctx, func(state *pchannel.State) error { + chInfo, apiErr := ch.SendChUpdate(pctx, func(state *pchannel.State) { for i := range updates { updates[i](state) } - return nil }) return toPayChInfo(chInfo), apiErr } @@ -169,7 +167,8 @@ func UnsubPayChUpdates(ch perun.ChAPI) perun.APIError { // // See session.RespondChUpdate for the list of errors returned by this API. func RespondPayChUpdate(pctx context.Context, ch perun.ChAPI, updateID string, accept bool) ( - PayChInfo, perun.APIError) { + PayChInfo, perun.APIError, +) { chInfo, err := ch.RespondChUpdate(pctx, updateID, accept) return toPayChInfo(chInfo), err } diff --git a/app/payment/channel_test.go b/app/payment/channel_test.go index c5ab471b..98a1b96a 100644 --- a/app/payment/channel_test.go +++ b/app/payment/channel_test.go @@ -29,12 +29,11 @@ import ( "github.com/hyperledger-labs/perun-node/currency" "github.com/hyperledger-labs/perun-node/internal/mocks" "github.com/hyperledger-labs/perun-node/peruntest" - "github.com/hyperledger-labs/perun-node/session" ) func Test_SendPayChUpdate(t *testing.T) { currencies := currency.NewRegistry() - //nolint: errcheck // Safe to ignore the error, as it is first register after init. + //nolint:errcheck // Safe to ignore the error, as it is first register after init. ethCurrency, _ := currencies.Register(currency.ETHSymbol, currency.ETHMaxDecimals) // Returns a mock with API calls set up for currency and parts. @@ -90,7 +89,7 @@ func Test_SendPayChUpdate(t *testing.T) { } _, gotErr := payment.SendPayChUpdate(context.Background(), chAPI, payments) peruntest.AssertAPIError(t, gotErr, perun.ClientError, perun.ErrInvalidArgument, payment.ErrInvalidAmount.Error()) - peruntest.AssertErrInfoInvalidArgument(t, gotErr.AddInfo(), session.ArgNameAmount, invalidAmount) + peruntest.AssertErrInfoInvalidArgument(t, gotErr.AddInfo(), perun.ArgNameAmount, invalidAmount) }) t.Run("error_InvalidPayee", func(t *testing.T) { @@ -269,7 +268,7 @@ func Test_ClosePayCh(t *testing.T) { }) } -// nolint: unparam +//nolint:unparam func makePayment(currency, payee, amount string) payment.Payment { return payment.Payment{ Currency: currency, diff --git a/app/payment/session.go b/app/payment/session.go index de13e344..4370da45 100644 --- a/app/payment/session.go +++ b/app/payment/session.go @@ -51,7 +51,8 @@ func OpenSession(n perun.NodeAPI, configFile string) (string, []PayChInfo, perun // // See session.OpenCh for the list of errors returned by this API. func OpenPayCh(pctx context.Context, s perun.SessionAPI, openingBalInfo perun.BalInfo, challengeDurSecs uint64) ( - PayChInfo, perun.APIError) { + PayChInfo, perun.APIError, +) { paymentApp := perun.App{ Def: pchannel.NoApp(), Data: pchannel.NoData(), @@ -100,7 +101,8 @@ func UnsubPayChProposals(s perun.SessionAPI) perun.APIError { // // See session.RespondChProposal for the list of errors returned by this API. func RespondPayChProposal(pctx context.Context, s perun.SessionAPI, proposalID string, accept bool) (PayChInfo, - perun.APIError) { + perun.APIError, +) { chInfo, apiErr := s.RespondChProposal(pctx, proposalID, accept) return toPayChInfo(chInfo), apiErr } diff --git a/blockchain/ethereum/chain.go b/blockchain/ethereum/chain.go index f3141375..ad3a83c8 100644 --- a/blockchain/ethereum/chain.go +++ b/blockchain/ethereum/chain.go @@ -57,7 +57,8 @@ func NewChainBackend(url string, chainConnTimeout, onChainTxTimeout time.Duration, cred perun.Credential) ( - perun.ChainBackend, error) { + perun.ChainBackend, error, +) { ctx, cancel := context.WithTimeout(context.Background(), chainConnTimeout) defer cancel() ethereumBackend, err := ethclient.DialContext(ctx, url) @@ -75,7 +76,7 @@ func NewChainBackend(url string, if err != nil { return nil, err } - tr := pkeystore.NewTransactor(*ksWallet, types.NewEIP155Signer(big.NewInt(int64(chainID)))) + tr := pkeystore.NewTransactor(*ksWallet, types.LatestSignerForChainID(big.NewInt(int64(chainID)))) cb := pethchannel.NewContractBackend(ethereumBackend, tr, txFinalityDepth) return &internal.ChainBackend{Cb: &cb, TxTimeout: onChainTxTimeout}, nil } @@ -86,8 +87,9 @@ func NewChainBackend(url string, // The function signature uses only types defined in the root package of this // project and types from std lib. This enables the function to be loaded as // symbol without importing this package when it is compiled as plugin. -func NewROChainBackend(url string, chainID int, chainConnTimeout time.Duration) ( - perun.ROChainBackend, error) { +func NewROChainBackend(url string, chainConnTimeout time.Duration) ( + perun.ROChainBackend, error, +) { ctx, cancel := context.WithTimeout(context.Background(), chainConnTimeout) defer cancel() ethereumBackend, err := ethclient.DialContext(ctx, url) @@ -101,7 +103,8 @@ func NewROChainBackend(url string, chainID int, chainConnTimeout time.Duration) // BalanceAt reads the on-chain balance of the given address. func BalanceAt(url string, chainConnTimeout, onChainTxTimeout time.Duration, addr pwallet.Address) ( - *big.Int, error) { + *big.Int, error, +) { ctx, cancel := context.WithTimeout(context.Background(), chainConnTimeout) defer cancel() ethereumBackend, err := ethclient.DialContext(ctx, url) diff --git a/blockchain/ethereum/ethereumtest/chain.go b/blockchain/ethereum/ethereumtest/chain.go index e15bc524..bb4907ff 100644 --- a/blockchain/ethereum/ethereumtest/chain.go +++ b/blockchain/ethereum/ethereumtest/chain.go @@ -115,6 +115,6 @@ func newSimContractBackend(t *testing.T, accs []pwallet.Account, ks *keystore.Ke ksWallet, err := pkeystore.NewWallet(ks, "") // Password for test accounts is always empty string. require.NoError(t, err) - tr := pkeystore.NewTransactor(*ksWallet, types.NewEIP155Signer(big.NewInt(int64(ChainID)))) + tr := pkeystore.NewTransactor(*ksWallet, types.LatestSignerForChainID(big.NewInt(int64(ChainID)))) return pethchannel.NewContractBackend(simBackend, tr, txFinalityDepth) } diff --git a/blockchain/ethereum/ethereumtest/setupcontracts.go b/blockchain/ethereum/ethereumtest/setupcontracts.go index 08791bab..988d3137 100644 --- a/blockchain/ethereum/ethereumtest/setupcontracts.go +++ b/blockchain/ethereum/ethereumtest/setupcontracts.go @@ -81,7 +81,8 @@ func ContractAddrs() (adjudicator, assetETH pwallet.Address, assetERC20s map[pwa // It uses the passed testing.T to handle the errors and registers the cleanup // functions on it. func SetupContractsT(t *testing.T, - chainURL string, chainID int, onChainTxTimeout time.Duration, incAssetERC20s bool) perun.ContractRegistry { + chainURL string, chainID int, onChainTxTimeout time.Duration, incAssetERC20s bool, +) perun.ContractRegistry { contracts, err := SetupContracts(chainURL, chainID, onChainTxTimeout, incAssetERC20s) require.NoError(t, err) return contracts @@ -98,7 +99,8 @@ func SetupContractsT(t *testing.T, // Every calls returns a new instance of contract registry, so that modifying // the contract registry in one test does not affect other tests. func SetupContracts(chainURL string, chainID int, onChainTxTimeout time.Duration, incAssetERC20s bool) ( - perun.ContractRegistry, error) { + perun.ContractRegistry, error, +) { var err error if !isBlockchainRunning(chainURL) { @@ -176,7 +178,8 @@ func newContractRegistry(chain perun.ROChainBackend, incAssetERC20s bool) (perun } func deployContracts(chain perun.ChainBackend, onChainCred perun.Credential, - initAccs []pwallet.Address, initBal *big.Int) error { + initAccs []pwallet.Address, initBal *big.Int, +) error { var err error adjudicator, err := chain.DeployAdjudicator(onChainCred.Addr) if err != nil { diff --git a/blockchain/ethereum/ethereumtest/wallet.go b/blockchain/ethereum/ethereumtest/wallet.go index 7a3ded2f..d692e87b 100644 --- a/blockchain/ethereum/ethereumtest/wallet.go +++ b/blockchain/ethereum/ethereumtest/wallet.go @@ -17,7 +17,6 @@ package ethereumtest import ( - "io/ioutil" "math/rand" "os" "testing" @@ -69,14 +68,14 @@ func NewWalletSetupT(t *testing.T, rng *rand.Rand, n uint) *WalletSetup { func NewWalletSetup(rng *rand.Rand, n uint) (*WalletSetup, error) { wb := NewTestWalletBackend() - ksPath, err := ioutil.TempDir("", "perun-node-test-keystore-*") + ksPath, err := os.MkdirTemp("", "perun-node-test-keystore-*") if err != nil { return nil, errors.Wrap(err, "creating temp directory for keystore") } ks := keystore.NewKeyStore(ksPath, internal.WeakScryptN, internal.WeakScryptP) w, err := pkswallet.NewWallet(ks, "") if err != nil { - os.RemoveAll(ksPath) // nolint: errcheck + os.RemoveAll(ksPath) //nolint:errcheck return nil, errors.Wrap(err, "creating creating wallet") } diff --git a/blockchain/ethereum/internal/chain.go b/blockchain/ethereum/internal/chain.go index ce04f53b..bb812e54 100644 --- a/blockchain/ethereum/internal/chain.go +++ b/blockchain/ethereum/internal/chain.go @@ -44,8 +44,8 @@ type Funder struct { // RegisterAssetERC20 wraps the RegisterAssetERC20 on the actual ETH funder // implementation with abstract types defined in go-perun core. -func (f *Funder) RegisterAssetERC20(asset pwallet.Address, token pwallet.Address, onChainAcc pwallet.Address) bool { - assetAddr, ok := asset.(*pethwallet.Address) +func (f *Funder) RegisterAssetERC20(asset pchannel.Asset, token pwallet.Address, onChainAcc pwallet.Address) bool { + assetAddr, ok := asset.(*pethchannel.Asset) if !ok { return false } @@ -58,8 +58,8 @@ func (f *Funder) RegisterAssetERC20(asset pwallet.Address, token pwallet.Address // IsAssetRegistered wraps the IsAssetRegistered on the actual ETH funder // implementation with abstract types defined in go-perun core. -func (f *Funder) IsAssetRegistered(asset pwallet.Address) bool { - assetAddr, ok := asset.(*pethwallet.Address) +func (f *Funder) IsAssetRegistered(asset pchannel.Asset) bool { + assetAddr, ok := asset.(*pethchannel.Asset) if !ok { return false } @@ -79,7 +79,7 @@ type ChainBackend struct { // NewFunder initializes and returns an instance of ethereum funder. func (cb *ChainBackend) NewFunder(assetETHAddr pwallet.Address, txSender pwallet.Address) perun.Funder { - assetETH := pethwallet.AsWalletAddr(pethwallet.AsEthAddr(assetETHAddr)) + assetETH := pethchannel.NewAssetFromAddress(pethwallet.AsEthAddr(assetETHAddr)) txSenderAcc := accounts.Account{Address: pethwallet.AsEthAddr(txSender)} funder := pethchannel.NewFunder(*cb.Cb) // Registering unique assets on a newly initialized funder will always return true. @@ -146,7 +146,8 @@ func (cb *ChainBackend) ValidateAssetETH(adjAddr, assetETHAddr pwallet.Address) // contracts at the given addresses. TokenERC20 is the address of ERC20 token // contract. func (cb *ChainBackend) ValidateAssetERC20(adj, tokenERC20, assetERC20 pwallet.Address) ( - symbol string, decimals uint8, _ error) { + symbol string, decimals uint8, _ error, +) { ctx, cancel := context.WithTimeout(context.Background(), cb.TxTimeout) defer cancel() var err error @@ -185,7 +186,8 @@ func (cb *ChainBackend) DeployAssetETH(adjAddr, txSender pwallet.Address) (pwall // DeployPerunToken deploys the perun ERC20 token contract. func (cb *ChainBackend) DeployPerunToken(initAccs []pwallet.Address, initBal *big.Int, txSender pwallet.Address) ( - pwallet.Address, error) { + pwallet.Address, error, +) { initAccsETH := make([]common.Address, len(initAccs)) for i := range initAccs { initAccsETH[i] = pethwallet.AsEthAddr(initAccs[i]) diff --git a/blockchain/ethereum/internal/chain_integ_test.go b/blockchain/ethereum/internal/chain_integ_test.go index b11b1e0f..1252cec4 100644 --- a/blockchain/ethereum/internal/chain_integ_test.go +++ b/blockchain/ethereum/internal/chain_integ_test.go @@ -42,7 +42,7 @@ func Test_ROChainBackend_ValidateAdjudicator(t *testing.T) { contracts := ethereumtest.SetupContractsT(t, ethereumtest.ChainURL, ethereumtest.ChainID, ethereumtest.OnChainTxTimeout, false) roChainBackend, err := ethereum.NewROChainBackend( - ethereumtest.ChainURL, ethereumtest.ChainID, ethereumtest.ChainConnTimeout) + ethereumtest.ChainURL, ethereumtest.ChainConnTimeout) require.NoError(t, err) t.Run("happy", func(t *testing.T) { @@ -68,7 +68,7 @@ func Test_Integ_ROChainBackend_ValidateAssetETH(t *testing.T) { contracts := ethereumtest.SetupContractsT(t, ethereumtest.ChainURL, ethereumtest.ChainID, ethereumtest.OnChainTxTimeout, false) roChainBackend, err := ethereum.NewROChainBackend( - ethereumtest.ChainURL, ethereumtest.ChainID, ethereumtest.ChainConnTimeout) + ethereumtest.ChainURL, ethereumtest.ChainConnTimeout) require.NoError(t, err) rng := rand.New(rand.NewSource(ethereumtest.RandSeedForTestAccs)) diff --git a/blockchain/ethereum/internal/wallet.go b/blockchain/ethereum/internal/wallet.go index 071d6d0d..b1b06cf4 100644 --- a/blockchain/ethereum/internal/wallet.go +++ b/blockchain/ethereum/internal/wallet.go @@ -90,7 +90,7 @@ func (wb *WalletBackend) ParseAddr(str string) (pwallet.Address, error) { // zero value representation of the address type. Valid zero value representations are // "", "0x", "0x00000" (any number of zeros) or the canonical form of forty zeros. zeroValue := pethwallet.Address{} - if addr.Equals(&zeroValue) && !strings.Contains(zeroValue.String(), str) { + if addr.Equal(&zeroValue) && !strings.Contains(zeroValue.String(), str) { return nil, errors.New("invalid string") } return addr, nil diff --git a/blockchain/ethereum/internal/wallet_test.go b/blockchain/ethereum/internal/wallet_test.go index 3056c73b..bae92cac 100644 --- a/blockchain/ethereum/internal/wallet_test.go +++ b/blockchain/ethereum/internal/wallet_test.go @@ -89,14 +89,14 @@ func Test_WalletBackend_ParseAddr(t *testing.T) { gotAddr, err := wb.ParseAddr(validAddr.String()) assert.NoError(t, err) require.NotNil(t, gotAddr) - assert.True(t, validAddr.Equals(gotAddr)) + assert.True(t, validAddr.Equal(gotAddr)) }) t.Run("happy_zero_value", func(t *testing.T) { validAddr := pethwallet.Address{} gotAddr, err := wb.ParseAddr(validAddr.String()) assert.NoError(t, err) require.NotNil(t, gotAddr) - assert.True(t, validAddr.Equals(gotAddr)) + assert.True(t, validAddr.Equal(gotAddr)) }) t.Run("invalid_addr", func(t *testing.T) { gotAddr, err := wb.ParseAddr("invalid-addr") diff --git a/blockchain/ethereum/registry.go b/blockchain/ethereum/registry.go index e669640e..a3d741cb 100644 --- a/blockchain/ethereum/registry.go +++ b/blockchain/ethereum/registry.go @@ -19,6 +19,9 @@ package ethereum import ( "sync" + pethchannel "perun.network/go-perun/backend/ethereum/channel" + pethwallet "perun.network/go-perun/backend/ethereum/wallet" + pchannel "perun.network/go-perun/channel" pwallet "perun.network/go-perun/wallet" "github.com/hyperledger-labs/perun-node" @@ -46,7 +49,8 @@ type contractRegistry struct { // - Standard error if the adjudicator address in the asset ETH contract does not // match the passed value. func NewContractRegistry(chain perun.ROChainBackend, adjudicator, assetETH pwallet.Address) ( - perun.ContractRegistry, error) { + perun.ContractRegistry, error, +) { err := chain.ValidateAdjudicator(adjudicator) if err != nil { return nil, err @@ -82,7 +86,8 @@ func NewContractRegistry(chain perun.ROChainBackend, adjudicator, assetETH pwall // blockchain or if the token address in the asset contract does not match the // passed value. func (r *contractRegistry) RegisterAssetERC20(token, asset pwallet.Address) ( - string, uint8, error) { + string, uint8, error, +) { r.mtx.Lock() defer r.mtx.Unlock() @@ -136,14 +141,14 @@ func (r *contractRegistry) Assets() map[string]string { } // Asset returns asset contract address for the given symbol. -func (r *contractRegistry) Asset(symbol string) (pwallet.Address, bool) { +func (r *contractRegistry) Asset(symbol string) (pchannel.Asset, bool) { r.mtx.RLock() idx, found := r.isSymbolRegistered(symbol) r.mtx.RUnlock() if !found || r.assets[idx] == nil { return nil, false } - return r.assets[idx], true + return pethchannel.NewAssetFromAddress(pethwallet.AsEthAddr(r.assets[idx])), true } // Token returns asset contract address for the given symbol. @@ -163,10 +168,13 @@ func (r *contractRegistry) Token(symbol string) (pwallet.Address, bool) { } // Symbol returns symbol for the given asset contract address. -func (r *contractRegistry) Symbol(asset pwallet.Address) (symbol string, found bool) { +func (r *contractRegistry) Symbol(asset pchannel.Asset) (symbol string, found bool) { r.mtx.RLock() - symbol, found = r.isAssetRegistered(asset) - r.mtx.RUnlock() + defer r.mtx.RUnlock() + ethAsset, ok := asset.(*pethchannel.Asset) + if ok { + symbol, found = r.isAssetRegistered(ðAsset.Address) + } return symbol, found } @@ -177,7 +185,7 @@ func (r *contractRegistry) isSymbolRegistered(symbol string) (idx int, found boo func (r *contractRegistry) isAssetRegistered(asset pwallet.Address) (symbol string, found bool) { for assetIdx, gotAsset := range r.assets { - if gotAsset.Equals(asset) { + if gotAsset.Equal(asset) { for symbol, i := range r.currencies { if assetIdx == i { return symbol, true diff --git a/blockchain/ethereum/registry_test.go b/blockchain/ethereum/registry_test.go index d85b9794..b70e60d8 100644 --- a/blockchain/ethereum/registry_test.go +++ b/blockchain/ethereum/registry_test.go @@ -23,6 +23,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + pethchannel "perun.network/go-perun/backend/ethereum/channel" + pethwallet "perun.network/go-perun/backend/ethereum/wallet" pwallet "perun.network/go-perun/wallet" "github.com/hyperledger-labs/perun-node/blockchain" @@ -53,7 +55,7 @@ func Test_ContractRegistry_Adjudicator_AssetETH(t *testing.T) { assert.Equal(t, setup.AssetETH, r.AssetETH()) gotAssetETH, found := r.Asset("ETH") assert.True(t, found) - assert.Equal(t, setup.AssetETH, gotAssetETH) + assert.Equal(t, pethchannel.NewAssetFromAddress(pethwallet.AsEthAddr(setup.AssetETH)), gotAssetETH) // happy/registry.assets. assets := r.Assets() @@ -109,15 +111,15 @@ func Test_ContractRegistry_ERC20(t *testing.T) { // happy/registry.Asset. gotAsset, found := r.Asset(perunSymbol) assert.True(t, found, "No ERC20 tokens should be registered during init") - require.True(t, assetERC20.Equals(gotAsset)) + require.True(t, (pethchannel.NewAssetFromAddress(pethwallet.AsEthAddr(assetERC20))).Equal(gotAsset)) // happy/registry.Token. gotToken, found := r.Token(perunSymbol) assert.True(t, found, "No ERC20 tokens should be registered during init") - require.True(t, tokenERC20.Equals(gotToken)) + require.True(t, tokenERC20.Equal(gotToken)) // happy/registry.Symbol. - gotSymbol, found := r.Symbol(assetERC20) + gotSymbol, found := r.Symbol(pethchannel.NewAssetFromAddress(pethwallet.AsEthAddr(assetERC20))) assert.True(t, found, "No ERC20 tokens should be registered during init") require.Equal(t, perunSymbol, gotSymbol) diff --git a/cmd/perunnode/generate.go b/cmd/perunnode/generate.go index 7f489277..98cae917 100644 --- a/cmd/perunnode/generate.go +++ b/cmd/perunnode/generate.go @@ -18,7 +18,6 @@ package main import ( "fmt" - "io/ioutil" "math/rand" "os" "path/filepath" @@ -37,6 +36,7 @@ import ( const ( aliceAlias, bobAlias = "alice", "bob" + apiAlias = "api" nodeConfigFile = "node.yaml" sessionConfigFile = "session.yaml" keystoreDir = "keystore" @@ -85,7 +85,7 @@ func defineGenerateCmdFlags() { generateCmd.Flags().Bool(onlySessionF, false, "generate only session configuration artifacts for both alice & bob.") } -func generate(cmd *cobra.Command, args []string) { +func generate(cmd *cobra.Command, _ []string) { genNodeConfig, err := cmd.Flags().GetBool(onlyNodeF) if err != nil { panic("unknown flag " + onlyNodeF + "\n") @@ -114,7 +114,8 @@ func generate(cmd *cobra.Command, args []string) { if err = generateSessionConfig(); err != nil { fmt.Printf("Error generating session configuration artifacts: %v\n", err) } else { - fmt.Printf("Generated session configuration artifacts: %s, %s directories\n", aliceAlias, bobAlias) + fmt.Printf("Generated session configuration artifacts: %s, %s, %s directories\n", + aliceAlias, bobAlias, apiAlias) } } if err != nil { @@ -147,58 +148,62 @@ func generateNodeConfig() error { // & off-chain). To use this configuration, start the node from same directory containing the session config artifacts // directory and pass the path "alice/session.yaml" and "bob/session.yaml" for alice and bob respectively. func generateSessionConfig() error { - if isPresent, dirName := isAnyDirPresent(aliceAlias, bobAlias); isPresent { + if isPresent, dirName := isAnyDirPresent(aliceAlias, bobAlias, apiAlias); isPresent { return errors.New("dir exists - " + dirName) } - if err := makeDirs(aliceAlias, bobAlias); err != nil { + err := makeDirs(aliceAlias, bobAlias, apiAlias) + if err != nil { return err } + const count = 3 + aliases := [count]string{aliceAlias, bobAlias, apiAlias} + cfgs := [count]session.Config{} + peers := [count][]perun.PeerID{} + providersFile := [count]string{} + cfgFile := [count]string{} + // Generate session config, the seed ethereumtest.RandSeedForTestAccs generates two accounts which were funded // when starting the ganache cli node with the command documented in help message. - prng := rand.New(rand.NewSource(ethereumtest.RandSeedForTestAccs)) //nolint: gosec // okay to use weak rand in tests. - aliceCfg, err := sessiontest.NewConfig(prng) - if err != nil { - return err - } - aliceCfg.User.Alias = aliceAlias - bobCfg, err := sessiontest.NewConfig(prng) - if err != nil { - return err + prng := rand.New(rand.NewSource(ethereumtest.RandSeedForTestAccs)) //nolint:gosec // okay to use weak rand in tests. + for i := 0; i < count; i++ { + cfgs[i], err = sessiontest.NewConfig(prng) + if err != nil { + return err + } + cfgs[i].User.Alias = aliases[i] } - bobCfg.User.Alias = bobAlias - // Create IDProvider file. - aliceIDProviderFile, err := idprovidertest.NewIDProvider(peerID(bobCfg.User)) - if err != nil { - return err - } - bobIDProviderFile, err := idprovidertest.NewIDProvider(peerID(aliceCfg.User)) - if err != nil { - return err + for i := 0; i < count; i++ { // Everyone except the self is a peer. + peers[i] = make([]perun.PeerID, 0, count-1) + for j := 0; j < count; j++ { + if i != j { + peers[i] = append(peers[i], peerID(cfgs[j].User)) + } + } } - // Create session config file. - aliceCfgFile, err := sessiontest.NewConfigFile(updatedConfigCopy(aliceCfg)) - if err != nil { - return err + for i := 0; i < count; i++ { + providersFile[i], err = idprovidertest.NewIDProvider(peers[i]...) + if err != nil { + return err + } } - bobCfgFile, err := sessiontest.NewConfigFile(updatedConfigCopy(bobCfg)) - if err != nil { - return err + + for i := 0; i < count; i++ { + cfgFile[i], err = sessiontest.NewConfigFile(updatedConfigCopy(cfgs[i])) + if err != nil { + return err + } } // Move the artifacts to currenct directory. - filesToMove := map[string]string{ - aliceCfgFile: filepath.Join(aliceAlias, sessionConfigFile), - aliceIDProviderFile: filepath.Join(aliceAlias, idProviderFile), - aliceCfg.DatabaseDir: filepath.Join(aliceAlias, databaseDir), - aliceCfg.User.OnChainWallet.KeystorePath: filepath.Join(aliceAlias, keystoreDir), - - bobCfgFile: filepath.Join(bobAlias, sessionConfigFile), - bobCfg.DatabaseDir: filepath.Join(bobAlias, databaseDir), - bobIDProviderFile: filepath.Join(bobAlias, idProviderFile), - bobCfg.User.OnChainWallet.KeystorePath: filepath.Join(bobAlias, keystoreDir), + filesToMove := make(map[string]string) + for i := 0; i < count; i++ { + filesToMove[cfgFile[i]] = filepath.Join(aliases[i], sessionConfigFile) + filesToMove[providersFile[i]] = filepath.Join(aliases[i], idProviderFile) + filesToMove[cfgs[i].DatabaseDir] = filepath.Join(aliases[i], databaseDir) + filesToMove[cfgs[i].User.OnChainWallet.KeystorePath] = filepath.Join(aliases[i], keystoreDir) } return moveFiles(filesToMove) } @@ -269,7 +274,7 @@ func handleDir(srcDir string, destDir string) error { if err := os.Mkdir(destDir, dirFileMode); err != nil { errs = append(errs, fmt.Sprintf("creating dir - %s: %v", destDir, err)) } - files, err := ioutil.ReadDir(srcDir) + files, err := os.ReadDir(srcDir) if err != nil { errs = append(errs, fmt.Sprintf("reading dir - %s: %v", srcDir, err)) } diff --git a/cmd/perunnode/generate_test.go b/cmd/perunnode/generate_test.go new file mode 100644 index 00000000..7b1de11e --- /dev/null +++ b/cmd/perunnode/generate_test.go @@ -0,0 +1,63 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestGenerateSessionConfig(t *testing.T) { + // Create a temporary directory + tempDir, err := os.MkdirTemp("", "session_test") + require.NoError(t, err) + defer os.RemoveAll(tempDir) //nolint:errcheck + + // Change to the temporary directory + err = os.Chdir(tempDir) + require.NoError(t, err) + + // Now you can test the function with a clean temporary directory + err = generateSessionConfig() + require.NoError(t, err) + + // List of aliases for testing + aliasesList := []string{"alice", "bob", "api"} + + // Verify the directories and files were created as expected + for _, alias := range aliasesList { + dirPath := filepath.Join(tempDir, alias) + require.DirExists(t, dirPath) + + require.DirExists(t, filepath.Join(dirPath, "database")) + require.FileExists(t, filepath.Join(dirPath, "idprovider.yaml")) + require.DirExists(t, filepath.Join(dirPath, "keystore")) + + keystoreFiles, err := os.ReadDir(filepath.Join(dirPath, "keystore")) + require.NoError(t, err) + require.Len(t, keystoreFiles, 2) + for _, file := range keystoreFiles { + require.True(t, strings.HasPrefix(file.Name(), "UTC")) + } + + require.FileExists(t, filepath.Join(dirPath, "session.yaml")) + } +} diff --git a/cmd/perunnode/main.go b/cmd/perunnode/main.go index 25763de5..9ef818f2 100644 --- a/cmd/perunnode/main.go +++ b/cmd/perunnode/main.go @@ -14,6 +14,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package perunnode implements a command line tool for running a perun node. package main import ( diff --git a/cmd/perunnode/run.go b/cmd/perunnode/run.go index 5f3535e5..ce18836a 100644 --- a/cmd/perunnode/run.go +++ b/cmd/perunnode/run.go @@ -43,10 +43,12 @@ const ( responsetimeoutF = "responsetimeout" configfileF = "configfile" // can only be specified in flag, not via config file. grpcPortF = "grpcport" // can only be specified in flag, not via config file. + serviceF = "service" // can only be specified in flag, not via config file. // default values for flags in run command. defaultConfigFile = "node.yaml" defaultGrpcPort = 50001 + defaultService = "payment" ) var ( @@ -98,6 +100,7 @@ func init() { func defineFlags() { runCmd.Flags().String(configfileF, defaultConfigFile, "node config file") runCmd.Flags().Uint64(grpcPortF, defaultGrpcPort, "port for grpc payment channel API server to listen") + runCmd.Flags().String(serviceF, defaultService, "service to be enabled (payment or fundwatch)") // Default values of all these flags should be zero, as their only purpose is to allow the user to // explicitly specify the configuration. @@ -127,7 +130,7 @@ all the config flags are specified, config file is ignored.`, Run: run, } -func run(cmd *cobra.Command, args []string) { +func run(cmd *cobra.Command, _ []string) { nodeCfg := parseNodeConfig(cmd.LocalNonPersistentFlags(), nodeCfgViper) grpcPort, err := cmd.Flags().GetUint64(grpcPortF) if err != nil { @@ -141,10 +144,27 @@ func run(cmd *cobra.Command, args []string) { return } - fmt.Printf("Running perun node with the below config:\n%s.\n\nServing payment channel API via grpc at port %s\n\n", - prettify(nodeCfg), grpcAddr) - if err := grpc.ListenAndServePayChAPI(nodeAPI, grpcAddr); err != nil { - fmt.Printf("Server returned with error: %v\n", err) + service, err := cmd.Flags().GetString(serviceF) + if err != nil { + panic("unknown flag service\n") + } + switch service { + case "payment": + fmt.Printf("Running perun node with the below config:\n%s.\n\nServing payment channel API via grpc at port %s\n\n", + prettify(nodeCfg), grpcAddr) + if err := grpc.ServePaymentAPI(nodeAPI, grpcAddr); err != nil { + fmt.Printf("Server returned with error: %v\n", err) + } + case "fundwatch": + fmt.Printf( + "Running perun node with the below config:\n%s.\n\nServing funding and watching API via grpc at port %s\n\n", + prettify(nodeCfg), grpcAddr) + if err := grpc.ServeFundingWatchingAPI(nodeAPI, grpcAddr); err != nil { + fmt.Printf("Server returned with error: %v\n", err) + } + default: + panic("invalid value for service flag\n") + } } diff --git a/cmd/perunnode/version.go b/cmd/perunnode/version.go index b8b313cf..98742557 100644 --- a/cmd/perunnode/version.go +++ b/cmd/perunnode/version.go @@ -48,6 +48,6 @@ var versionCmd = &cobra.Command{ Run: versionFn, } -func versionFn(cmd *cobra.Command, args []string) { +func versionFn(_ *cobra.Command, _ []string) { fmt.Printf("%s Git revision: %s (go-perun version: %s)\n", version, gitCommitID, goperunVersion) } diff --git a/cmd/perunnodecli/idprovider.go b/cmd/perunnodecli/idprovider.go index e6854eb6..1df5be77 100644 --- a/cmd/perunnodecli/idprovider.go +++ b/cmd/perunnodecli/idprovider.go @@ -96,7 +96,6 @@ func peerIDAddFn(c *ishell.Context) { req := pb.AddPeerIDReq{ SessionID: sessionID, PeerID: &pb.PeerID{ - Alias: c.Args[0], OffChainAddress: c.Args[1], CommAddress: c.Args[2], diff --git a/cmd/perunnodecli/main.go b/cmd/perunnodecli/main.go index 592271eb..c4902ec0 100644 --- a/cmd/perunnodecli/main.go +++ b/cmd/perunnodecli/main.go @@ -14,6 +14,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package perunnodecli implements a client with a command line interface for +// interacting with the perun node. package main import ( diff --git a/cmd/perunnodecli/payment.go b/cmd/perunnodecli/payment.go index c7753520..5e068c09 100644 --- a/cmd/perunnodecli/payment.go +++ b/cmd/perunnodecli/payment.go @@ -108,7 +108,7 @@ func paymentFn(c *ishell.Context) { c.Println(c.Cmd.HelpText()) } -// nolint: dupl // not a duplicate of paymentRequestFn +//nolint:dupl // not a duplicate of paymentRequestFn func paymentSendFn(c *ishell.Context) { if client == nil { printNodeNotConnectedError(c) @@ -155,7 +155,7 @@ func paymentSendFn(c *ishell.Context) { chAlias, prettifyPayChInfo(msg.MsgSuccess.UpdatedPayChInfo))) } -// nolint: dupl // not a duplicate of paymentSendFn +//nolint:dupl // not a duplicate of paymentSendFn func paymentRequestFn(c *ishell.Context) { if client == nil { printNodeNotConnectedError(c) diff --git a/cmd/perunnodetui/channels.go b/cmd/perunnodetui/channels.go index 11c80c3f..3669dd91 100644 --- a/cmd/perunnodetui/channels.go +++ b/cmd/perunnodetui/channels.go @@ -427,8 +427,8 @@ func trimZeros(s *string) { // This is a hacky function, that computes the proposed state when sending an update. // Assumes, the version is an integer and will be incremented. func getProposedBalInfo(current balInfo, amountStr string, isPayeePeer bool) (balInfo, error) { - currOurs, _ := ethCurrency.Parse(current.ours) // nolint: errcheck - currTheirs, _ := ethCurrency.Parse(current.theirs) // nolint: errcheck + currOurs, _ := ethCurrency.Parse(current.ours) //nolint:errcheck + currTheirs, _ := ethCurrency.Parse(current.theirs) //nolint:errcheck // Values received from node should parse without errors. amount, err := ethCurrency.Parse(amountStr) diff --git a/cmd/perunnodetui/main.go b/cmd/perunnodetui/main.go index 3e5b9587..3436e8a7 100755 --- a/cmd/perunnodetui/main.go +++ b/cmd/perunnodetui/main.go @@ -14,6 +14,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package perunnodetui implements a client with a text based user interface +// for interacting with the perun node. package main import ( @@ -213,30 +215,30 @@ func runEventLoop(c *termdash.Controller, keyEvents chan *terminalapi.Keyboard, func logErrorf(format string, a ...interface{}) { msg := fmt.Sprintf(format, a...) logger.Error(msg) - logBox.Write("Error: "+msg+"\n", text.WriteCellOpts(cell.FgColor(cell.ColorRed))) // nolint: errcheck, gosec + logBox.Write("Error: "+msg+"\n", text.WriteCellOpts(cell.FgColor(cell.ColorRed))) //nolint:errcheck, gosec } func logInfof(format string, a ...interface{}) { msg := fmt.Sprintf(format, a...) logger.Info(msg) - logBox.Write(msg + "\n") // nolint: errcheck, gosec + logBox.Write(msg + "\n") //nolint:errcheck, gosec } func logError(a ...interface{}) { msg := fmt.Sprint(a...) logger.Error(msg) - logBox.Write("Error: "+msg+"\n", text.WriteCellOpts(cell.FgColor(cell.ColorRed))) // nolint: errcheck, gosec + logBox.Write("Error: "+msg+"\n", text.WriteCellOpts(cell.FgColor(cell.ColorRed))) //nolint:errcheck, gosec } func logInfo(a ...interface{}) { msg := fmt.Sprint(a...) logger.Error(msg) - logBox.Write(msg + "\n") // nolint: errcheck, gosec + logBox.Write(msg + "\n") //nolint:errcheck, gosec } // renderDummyDashboard is used to fill dummy data in the table for testing. // call this immediately after renderDashboard in main. -func renderDummyDashboard(c *container.Container) { // nolint: unused,deadcode +func renderDummyDashboard(c *container.Container) { //nolint:unused,deadcode var err error chainURL = defaultChainURL onChainAddr, err = ethereum.NewWalletBackend().ParseAddr(defaultOnChainAddrs[alice]) @@ -260,20 +262,20 @@ func renderDummyDashboard(c *container.Container) { // nolint: unused,deadcode theirs: "2.6700000", version: "1", } - p1, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) // nolint: errcheck + p1, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) //nolint:errcheck p1.status = waitingForPeer - p2, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) // nolint: errcheck + p2, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) //nolint:errcheck p2.status = accepted p2.phase = transact - p3, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) // nolint: errcheck + p3, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) //nolint:errcheck p3.status = responding p3.phase = register - p4, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) // nolint: errcheck + p4, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) //nolint:errcheck p4.status = peerRejected p4.phase = settle - p5, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) // nolint: errcheck + p5, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) //nolint:errcheck p5.phase = closed - p6, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) // nolint: errcheck + p6, _ := newIncomingChannel("", "peer", "", "", time.Now().Format("15:04:05")) //nolint:errcheck p6.phase = errorPhase p1.current, p1.proposed = dummyBalInfo, dummyBalInfo p2.current, p2.proposed = dummyBalInfo, dummyBalInfo diff --git a/currency/currencytest/registry.go b/currency/currencytest/registry.go index 7c8c6368..28e56e65 100644 --- a/currency/currencytest/registry.go +++ b/currency/currencytest/registry.go @@ -32,7 +32,7 @@ func Registry() *currency.Registry { return r } r = currency.NewRegistry() - // nolint: errcheck // Registering currencies on new registry will not fail. + //nolint: errcheck // Registering currencies on new registry will not fail. r.Register(currency.ETHSymbol, currency.ETHMaxDecimals) return r } diff --git a/errors.go b/errors.go index fca8d8fa..2c1bb237 100644 --- a/errors.go +++ b/errors.go @@ -65,7 +65,7 @@ func (e apiError) Format(s fmt.State, verb rune) { } fallthrough case 's': - //nolint: errcheck,gosec // Error of ioString need not be checked. + //nolint:errcheck,gosec // Error of ioString need not be checked. io.WriteString(s, e.Error()) case 'q': fmt.Fprintf(s, "%q", e.Error()) @@ -224,7 +224,6 @@ func NewAPIErrFailedPreCondition(err error) APIError { // NewAPIErrFailedPreConditionUnclosedChs returns an ErrFailedPreCondition // API Error for the special case where channel close was closed with no-force // option and, one or more open channels exists. -// func NewAPIErrFailedPreConditionUnclosedChs(err error, chs []ChInfo) APIError { return newAPIErrFailedPreCondition(err, ErrInfoFailedPreCondUnclosedChs{ @@ -336,3 +335,48 @@ func APIErrAsMap(method string, err APIError) map[string]interface{} { "code": err.Code(), } } + +// Error type is used to define error constants for this package. +type Error string + +// Error implements error interface. +func (e Error) Error() string { + return string(e) +} + +// Definition of error constants for this package. +const ( + // For failed pre-condition. + ErrChClosed Error = "action not allowed on a closed channel" + ErrSessionClosed Error = "action not allowed on a closed session" + + // For invalid config. + ErrUnsupportedType Error = "type not supported, see node config for supported types" + ErrRepeatedPeerAlias Error = "found repeated entries but each value should be unique" + ErrEntryForSelfNotFound Error = "own peer alias (self) not found" +) + +// Enumeration of valid resource types for used in ResourceNotFound and +// ResourceExists errors. +const ( + ResTypeUpdate ResourceType = "update" + ResTypeUpdateSub ResourceType = "updatesSub" + ResTypeChannel ResourceType = "channel" + ResTypeProposal ResourceType = "proposal" + ResTypeProposalSub ResourceType = "proposalsSub" + ResTypePeerID ResourceType = "peerID" + ResTypeSession ResourceType = "session" + ResTypeCurrency ResourceType = "currency" +) + +// Enumeration of valid argument names for using in InvalidArgument error. +const ( + ArgNameAmount ArgumentName = "amount" + ArgNameCurrency ArgumentName = "currency" + ArgNamePeerAlias ArgumentName = "peerAlias" + ArgNameOffChainAddr ArgumentName = "offChainAddress" + ArgNameConfigFile ArgumentName = "configFile" + ArgNamePayee ArgumentName = "payee" + ArgNameToken ArgumentName = "token" + ArgNameAsset ArgumentName = "asset" +) diff --git a/generateproto.go b/generateproto.go new file mode 100644 index 00000000..525f01e2 --- /dev/null +++ b/generateproto.go @@ -0,0 +1,20 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package perun + +//go:generate protoc --proto_path=proto --go_out=api/grpc/pb --go-grpc_out=api/grpc/pb proto/nodetypes.proto proto/errors.proto proto/payment_service.proto +//go:generate protoc --proto_path=proto --go_out=api/grpc/pb --go-grpc_out=api/grpc/pb proto/sdktypes.proto proto/watching_service.proto proto/funding_service.proto proto/api_messages.proto diff --git a/go.mod b/go.mod index c3c5f9ce..520e955e 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,11 @@ module github.com/hyperledger-labs/perun-node -go 1.17 +go 1.19 require ( github.com/abiosoft/ishell v2.0.0+incompatible github.com/ethereum/go-ethereum v1.10.12 github.com/fatih/color v1.13.0 - github.com/golang/protobuf v1.5.2 github.com/gorilla/websocket v1.4.2 github.com/idoall/gocryptotrader v1.0.1 github.com/kylelemons/godebug v1.1.0 @@ -20,20 +19,68 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.10.1 github.com/stretchr/testify v1.7.0 - golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d - google.golang.org/grpc v1.43.0 - google.golang.org/protobuf v1.27.1 + golang.org/x/net v0.9.0 + google.golang.org/grpc v1.56.0 + google.golang.org/protobuf v1.30.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b gotest.tools v2.2.0+incompatible - perun.network/go-perun v0.8.0 + perun.network/go-perun v0.9.0 + polycry.pt/poly-go v0.0.0-20211115212618-87069dfa360f ) require ( + github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect + github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db // indirect + github.com/btcsuite/btcd v0.21.0-beta // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea // indirect + github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/gdamore/encoding v1.0.0 // indirect github.com/gdamore/tcell/v2 v2.3.3 // indirect + github.com/go-ole/go-ole v1.2.1 // indirect + github.com/go-stack/stack v1.8.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/holiman/bloomfilter/v2 v2.0.3 // indirect + github.com/holiman/uint256 v1.2.0 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/magiconair/properties v1.8.5 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.12 // indirect + github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/pelletier/go-toml v1.9.4 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/tsdb v0.7.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect + github.com/rjeczalik/notify v0.9.1 // indirect + github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect + github.com/spf13/afero v1.6.0 // indirect + github.com/spf13/cast v1.4.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/stretchr/objx v0.1.1 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/tklauser/go-sysconf v0.3.5 // indirect + github.com/tklauser/numcpus v0.2.2 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect - golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect + golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/term v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect + gopkg.in/ini.v1 v1.66.2 // indirect + gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index 8b4f0744..a4182956 100644 --- a/go.sum +++ b/go.sum @@ -8,46 +8,15 @@ cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTj cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= @@ -66,9 +35,7 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= @@ -80,23 +47,14 @@ github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db/go.mod h1:rB3B4r github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= -github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= -github.com/apmckinlay/gsuneido v0.0.0-20180907175622-1f10244968e3/go.mod h1:hJnaqxrCRgMCTWtpNz9XUFkBCREiQdlcyK6YNmOfroM= -github.com/apmckinlay/gsuneido v0.0.0-20190404155041-0b6cd442a18f/go.mod h1:JU2DOj5Fc6rol0yaT79Csr47QR0vONGwJtBNGRD7jmc= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= @@ -108,20 +66,16 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxq github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bombsimon/wsl v1.2.5/go.mod h1:43lEF/i0kpXbLCeDXL9LMT8c92HyBywXb0AsgMHYngM= -github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= @@ -131,52 +85,30 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/d5/tengo/v2 v2.10.0/go.mod h1:XRGjEs5I9jYIKTxly6HCF8oiiilk5E/RYXOZ5b0DZC8= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -187,37 +119,21 @@ github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vs github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= -github.com/denisenkom/go-mssqldb v0.0.0-20190924004331-208c0a498538/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/ericlagergren/decimal v0.0.0-20180907214518-0bb163153a5d/go.mod h1:1yj25TwtUlJ+pfOu9apAVaM1RWfZGg+aFpd4hPQZekQ= -github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= github.com/ethereum/go-ethereum v1.10.12 h1:el/KddB3gLEsnNgGQ3SQuZuiZjwnFTYHe5TwUet5Om4= github.com/ethereum/go-ethereum v1.10.12/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= -github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239/go.mod h1:Gdwt2ce0yfBxPvZrHkprdPPTTS3N5rwmLE8T22KBXlw= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= @@ -225,7 +141,6 @@ github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+ github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BMXYYRWTLOJKlh+lOBt6nUQgXAfB7oVIQt5cNreqSLI= github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:rZfgFAXFS/z/lEd6LJmf9HVZ1LkgYiHx5pHhV5DR16M= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/friendsofgo/errors v0.9.2/go.mod h1:yCvFW5AkDIL9qn7suHVLiI/gH228n7PC4Pn44IGoTOI= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= @@ -243,14 +158,10 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= -github.com/go-critic/go-critic v0.3.5-0.20190904082202-d79a9f0c64db/go.mod h1:+sE8vrLDS2M0pZkBk0wy6+nLdKexVDrl/jBqQOTDThA= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= @@ -258,92 +169,41 @@ github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= -github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.21.0/go.mod h1:phxpHK52q7SE+5KpPnti4oZTdFCEsn/tKN+nFvCKXfk= -github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= -github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -352,76 +212,39 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.5 h1:kxhtnfFVi+rYdOALN0B3k9UT86zVJKfBimRaciULW4I= github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2/go.mod h1:lsuH8kb4GlMdSlI4alNIBBSAt5CHJtg3i+0WuN9J5YM= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -429,35 +252,25 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo= github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/idoall/TokenExchangeCommon v0.0.0-20200122034525-176e7af5305f/go.mod h1:bK9a54nuknlsIN8Lu7OtCbdXnWShIbO0yUphetDLnIo= -github.com/idoall/TokenExchangeCommon v0.0.0-20210826162402-3cd32beb497d/go.mod h1:bK9a54nuknlsIN8Lu7OtCbdXnWShIbO0yUphetDLnIo= github.com/idoall/gocryptotrader v1.0.1 h1:NSMscCjxkuwzWJUFjB7ip4USDTpzkNi65qjoL0Wc7yI= github.com/idoall/gocryptotrader v1.0.1/go.mod h1:7J3RZSuCzzjEOpOKEyd5rltbKFxv7Uc2Eo7KAh9yq9c= -github.com/idoall/logger v0.0.0-20200226150847-c2e7d71fdeb4/go.mod h1:xrgud+BkTCuQznbqOa4LVSjzda50cuOBeArZahXhwnE= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= @@ -474,18 +287,13 @@ github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1: github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= -github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj7dQo+O6GJNiMx+Pa94qKj+TG8ONdKHgMNIyyag= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= @@ -493,19 +301,13 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kat-co/vala v0.0.0-20170210184112-42e1d8b61f12/go.mod h1:u9MdXq/QageOOSGp7qG4XAQsYUMP+V5zEel/Vrl6OOc= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -513,11 +315,9 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -526,30 +326,18 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= -github.com/lestrrat-go/file-rotatelogs v2.3.0+incompatible/go.mod h1:ZQnN8lSECaebrkQytbHj4xNgtg8CR7RYXnPok8e0EHA= -github.com/lestrrat-go/strftime v1.0.1/go.mod h1:E1nN3pCbtMSu1yjSVeyuRFVm/U0xoR76fd03sz+Qz4g= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -559,11 +347,8 @@ github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HN github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -573,19 +358,12 @@ github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRC github.com/mattn/go-runewidth v0.0.12 h1:Y41i/hVW3Pgwr8gV+J23B9YEY0zxjptBuCWEaxmAOow= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.14.10/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miguelmota/go-ethereum-hdwallet v0.1.1/go.mod h1:f9m9uXokAHA6WNoYOPjj4AqjJS5pquQRiYYj/XSyPYc= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= @@ -596,20 +374,14 @@ github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGg github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mum4k/termdash v0.16.0 h1:oez5/noRpk8Lc+4u05QTU1LGGcvUkhEFk2kV9lClQAg= github.com/mum4k/termdash v0.16.0/go.mod h1:bkSQsw2tif8pLQtGmfxh20N1idek+Hzol/wj+1ZC3cM= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nsf/termbox-go v0.0.0-20201107200903-9b52a5faed9e/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -618,13 +390,11 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -639,10 +409,8 @@ github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT9 github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= @@ -660,78 +428,56 @@ github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUI github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/pquerna/otp v1.3.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d/go.mod h1:w5+eXa0mYznDkHaMCXA4XYffjlH+cy1oyKbfzJXa2Do= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -740,109 +486,60 @@ github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0 github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ= -github.com/thrasher-corp/gct-ta v0.0.0-20200623072738-f2b55b7f9f41/go.mod h1:z51vdK6i7okTmwu9tPh9+W8nqPWv80B/nMZUCX17fwY= -github.com/thrasher-corp/goose v2.7.0-rc4.0.20191002032028-0f2c2a27abdb+incompatible/go.mod h1:2Bb/y0SpnUWOlPU5kDz+ctvb3w/mzuAVqxy7JPfBzgw= -github.com/thrasher-corp/sqlboiler v1.0.1-0.20191001234224-71e17f37a85e/go.mod h1:JfJE+3gijF30ZJbUCzxGkU0+ymQxBfBOVp4XDObmJBE= -github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA= github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/toorop/go-pusher v0.0.0-20180521062818-4521e2eb39fb/go.mod h1:VTLqNCX1tXrur6pdIRCl8Q90FR7nw/mEBdyMkWMcsb0= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/uudashr/gocognit v0.0.0-20190926065955-1655d0de0517/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/volatiletech/inflect v0.0.0-20170731032912-e7201282ae8d/go.mod h1:jspfvgf53t5NLUT4o9L1IX0kIBNKamGq1tWc/MgWK9Q= -github.com/volatiletech/inflect v0.0.1/go.mod h1:IBti31tG6phkHitLlr5j7shC5SOo//x0AjDzaJU1PLA= -github.com/volatiletech/null v8.0.0+incompatible/go.mod h1:0wD98JzdqB+rLyZ70fN05VDbXbafIb0KU0MdVhCzmOQ= -github.com/volatiletech/sqlboiler v3.5.0+incompatible/go.mod h1:jLfDkkHWPbS2cWRLkyC20vQWaIQsASEY7gM7zSo11Yw= -github.com/volatiletech/sqlboiler v3.7.1+incompatible/go.mod h1:jLfDkkHWPbS2cWRLkyC20vQWaIQsASEY7gM7zSo11Yw= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -862,9 +559,6 @@ golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm0 golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -876,28 +570,17 @@ golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -908,60 +591,26 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d h1:LO7XpTYMwTqxjLcGWPijK3vRXg1aWdlNOVOHRq45d7c= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -969,9 +618,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -981,12 +628,10 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -994,74 +639,36 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190927073244-c990c680b611/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486 h1:5hpz5aRr+W1erYCL5JRhSUBJRph7l9XkNveoExlrKYk= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -1069,11 +676,10 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1081,74 +687,31 @@ golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1167,38 +730,11 @@ google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEn google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1213,116 +749,35 @@ google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM= -google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY= +google.golang.org/grpc v1.56.0 h1:+y7Bs8rtMd07LeXmL3NxcTLn7mUkbKZqEpPhMNkwJEE= +google.golang.org/grpc v1.56.0/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= @@ -1336,7 +791,6 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -1351,17 +805,10 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= -perun.network/go-perun v0.8.0 h1:ltGjAlv4Ep1WlR4G7xsCuRTw6Tbb1x+otQiZ9Dh20PM= -perun.network/go-perun v0.8.0/go.mod h1:VwcPIRO9hLyhHOjvl+8FZWtgh56c68E/miXGNPe2OdQ= +perun.network/go-perun v0.9.0 h1:IAGIR/ktytMo2rZjck+69Eaz1qnaOXLvHoRuExMGwJ4= +perun.network/go-perun v0.9.0/go.mod h1:4aGqubL05HJCvPcBltMyJekrqLYwxBaDmHHS7p1BBHc= +polycry.pt/poly-go v0.0.0-20211115212618-87069dfa360f h1:MPnodSa5wlQr8OnRRi3aHKEyp4wakTe9l9b+xL8xb+A= +polycry.pt/poly-go v0.0.0-20211115212618-87069dfa360f/go.mod h1:XUBrNtqgEhN3EEOP/5gh7IBd3xVHKidCjXDZfl9+kMU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/idprovider/idprovidertest/idprovider.go b/idprovider/idprovidertest/idprovider.go index 0565db50..9f4b8bad 100644 --- a/idprovider/idprovidertest/idprovider.go +++ b/idprovider/idprovidertest/idprovider.go @@ -17,7 +17,6 @@ package idprovidertest import ( - "io/ioutil" "os" "testing" @@ -44,7 +43,7 @@ func NewIDProviderT(t *testing.T, peerIDs ...perun.PeerID) string { // NewIDProvider sets up a local ID provider instance as a file in the system's temp directory with // the given list of peers IDs and returns the ID provider URL, which is path of the file. . func NewIDProvider(peerIDs ...perun.PeerID) (string, error) { - tempFile, err := ioutil.TempFile("", "") + tempFile, err := os.CreateTemp("", "") if err != nil { return "", errors.Wrap(err, "creating temp file for local idProvider") } @@ -56,13 +55,13 @@ func NewIDProvider(peerIDs ...perun.PeerID) (string, error) { encoder := yaml.NewEncoder(tempFile) if err := encoder.Encode(idProvider); err != nil { - tempFile.Close() // nolint: errcheck - os.Remove(tempFile.Name()) // nolint: errcheck + tempFile.Close() //nolint:errcheck + os.Remove(tempFile.Name()) //nolint:errcheck return "", errors.Wrap(err, "encoding idProvider") } if err := encoder.Close(); err != nil { - tempFile.Close() // nolint: errcheck - os.Remove(tempFile.Name()) // nolint: errcheck + tempFile.Close() //nolint:errcheck + os.Remove(tempFile.Name()) //nolint:errcheck return "", errors.Wrap(err, "closing encoder") } return tempFile.Name(), tempFile.Close() diff --git a/idprovider/local/idprovider.go b/idprovider/local/idprovider.go index 002d6898..d7ca1e93 100644 --- a/idprovider/local/idprovider.go +++ b/idprovider/local/idprovider.go @@ -53,7 +53,7 @@ func NewIDprovider(filePath string, backend perun.WalletBackend) (*IDProvider, e if err != nil { return nil, err } - defer f.Close() // nolint: errcheck, gosec // safe to defer f.Close() for files opened in read mode. + defer f.Close() //nolint:errcheck cache := make(map[string]perun.PeerID) decoder := yaml.NewDecoder(f) diff --git a/idprovider/local/idprovider_test.go b/idprovider/local/idprovider_test.go index 7ebfb935..c091787b 100644 --- a/idprovider/local/idprovider_test.go +++ b/idprovider/local/idprovider_test.go @@ -19,7 +19,6 @@ package local_test import ( "bytes" "errors" - "io/ioutil" "os" "testing" @@ -134,7 +133,7 @@ Bob: comm_address: 127.0.0.1:5750 comm_type: tcpip` - tempFile, err := ioutil.TempFile("", "") + tempFile, err := os.CreateTemp("", "") require.NoError(t, err) t.Cleanup(func() { if err = os.Remove(tempFile.Name()); err != nil { @@ -147,7 +146,7 @@ Bob: return tempFile.Name() } -// nolint:dupl // False positive. ReadByAlias is diff from ReadByOffChainAddr. +//nolint:dupl // False positive. ReadByAlias is diff from ReadByOffChainAddr. func Test_YAML_ReadByAlias(t *testing.T) { idProviderFile := idprovidertest.NewIDProviderT(t, peer1, peer2) c, err := local.NewIDprovider(idProviderFile, walletBackend) @@ -165,7 +164,7 @@ func Test_YAML_ReadByAlias(t *testing.T) { }) } -// nolint:dupl // False positive. ReadByOffChainAddr is diff from ReadByAlias. +//nolint:dupl // False positive. ReadByOffChainAddr is diff from ReadByAlias. func Test_YAML_ReadByOffChainAddr(t *testing.T) { idProviderFile := idprovidertest.NewIDProviderT(t, peer1, peer2) c, err := local.NewIDprovider(idProviderFile, walletBackend) @@ -284,9 +283,9 @@ func Test_YAML_UpdateStorage(t *testing.T) { } func compareFileContent(t *testing.T, file1, file2 string) bool { - f1, err := ioutil.ReadFile(file1) + f1, err := os.ReadFile(file1) require.NoError(t, err) - f2, err := ioutil.ReadFile(file2) + f2, err := os.ReadFile(file2) require.NoError(t, err) return bytes.Equal(f1, f2) diff --git a/internal/mocks/ChAPI.go b/internal/mocks/ChAPI.go index bb38d357..42cde3db 100644 --- a/internal/mocks/ChAPI.go +++ b/internal/mocks/ChAPI.go @@ -1,4 +1,4 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -202,3 +202,18 @@ func (_m *ChAPI) UnsubChUpdates() perun.APIError { return r0 } + +type mockConstructorTestingTNewChAPI interface { + mock.TestingT + Cleanup(func()) +} + +// NewChAPI creates a new instance of ChAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewChAPI(t mockConstructorTestingTNewChAPI) *ChAPI { + mock := &ChAPI{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/ChClient.go b/internal/mocks/ChClient.go index fc75bc9c..4b7fdee3 100644 --- a/internal/mocks/ChClient.go +++ b/internal/mocks/ChClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -148,3 +148,18 @@ func (_m *ChClient) RestoreChs(databaseDir string, timeout time.Duration, handle return r0 } + +type mockConstructorTestingTNewChClient interface { + mock.TestingT + Cleanup(func()) +} + +// NewChClient creates a new instance of ChClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewChClient(t mockConstructorTestingTNewChClient) *ChClient { + mock := &ChClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/ChProposalResponder.go b/internal/mocks/ChProposalResponder.go index c9fd4d23..b74d036a 100644 --- a/internal/mocks/ChProposalResponder.go +++ b/internal/mocks/ChProposalResponder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -18,11 +18,11 @@ type ChProposalResponder struct { } // Accept provides a mock function with given fields: _a0, _a1 -func (_m *ChProposalResponder) Accept(_a0 context.Context, _a1 *client.LedgerChannelProposalAcc) (session.PChannel, error) { +func (_m *ChProposalResponder) Accept(_a0 context.Context, _a1 *client.LedgerChannelProposalAccMsg) (session.PChannel, error) { ret := _m.Called(_a0, _a1) var r0 session.PChannel - if rf, ok := ret.Get(0).(func(context.Context, *client.LedgerChannelProposalAcc) session.PChannel); ok { + if rf, ok := ret.Get(0).(func(context.Context, *client.LedgerChannelProposalAccMsg) session.PChannel); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { @@ -31,7 +31,7 @@ func (_m *ChProposalResponder) Accept(_a0 context.Context, _a1 *client.LedgerCha } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *client.LedgerChannelProposalAcc) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *client.LedgerChannelProposalAccMsg) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -53,3 +53,18 @@ func (_m *ChProposalResponder) Reject(ctx context.Context, reason string) error return r0 } + +type mockConstructorTestingTNewChProposalResponder interface { + mock.TestingT + Cleanup(func()) +} + +// NewChProposalResponder creates a new instance of ChProposalResponder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewChProposalResponder(t mockConstructorTestingTNewChProposalResponder) *ChProposalResponder { + mock := &ChProposalResponder{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/ChUpdateResponder.go b/internal/mocks/ChUpdateResponder.go index a4b4a27c..e9830603 100644 --- a/internal/mocks/ChUpdateResponder.go +++ b/internal/mocks/ChUpdateResponder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -40,3 +40,18 @@ func (_m *ChUpdateResponder) Reject(ctx context.Context, reason string) error { return r0 } + +type mockConstructorTestingTNewChUpdateResponder interface { + mock.TestingT + Cleanup(func()) +} + +// NewChUpdateResponder creates a new instance of ChUpdateResponder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewChUpdateResponder(t mockConstructorTestingTNewChUpdateResponder) *ChUpdateResponder { + mock := &ChUpdateResponder{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/ChannelProposal.go b/internal/mocks/ChannelProposal.go index b1792ef3..6807e886 100644 --- a/internal/mocks/ChannelProposal.go +++ b/internal/mocks/ChannelProposal.go @@ -1,4 +1,4 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -47,20 +47,6 @@ func (_m *ChannelProposal) Decode(_a0 io.Reader) error { return r0 } -// Encode provides a mock function with given fields: _a0 -func (_m *ChannelProposal) Encode(_a0 io.Writer) error { - ret := _m.Called(_a0) - - var r0 error - if rf, ok := ret.Get(0).(func(io.Writer) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - // Matches provides a mock function with given fields: _a0 func (_m *ChannelProposal) Matches(_a0 client.ChannelProposalAccept) bool { ret := _m.Called(_a0) @@ -75,22 +61,6 @@ func (_m *ChannelProposal) Matches(_a0 client.ChannelProposalAccept) bool { return r0 } -// ProposalID provides a mock function with given fields: -func (_m *ChannelProposal) ProposalID() [32]byte { - ret := _m.Called() - - var r0 [32]byte - if rf, ok := ret.Get(0).(func() [32]byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([32]byte) - } - } - - return r0 -} - // Type provides a mock function with given fields: func (_m *ChannelProposal) Type() wire.Type { ret := _m.Called() @@ -118,3 +88,18 @@ func (_m *ChannelProposal) Valid() error { return r0 } + +type mockConstructorTestingTNewChannelProposal interface { + mock.TestingT + Cleanup(func()) +} + +// NewChannelProposal creates a new instance of ChannelProposal. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewChannelProposal(t mockConstructorTestingTNewChannelProposal) *ChannelProposal { + mock := &ChannelProposal{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/Closer.go b/internal/mocks/Closer.go index 7d9d906e..08467abc 100644 --- a/internal/mocks/Closer.go +++ b/internal/mocks/Closer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -22,3 +22,18 @@ func (_m *Closer) Close() error { return r0 } + +type mockConstructorTestingTNewCloser interface { + mock.TestingT + Cleanup(func()) +} + +// NewCloser creates a new instance of Closer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewCloser(t mockConstructorTestingTNewCloser) *Closer { + mock := &Closer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/CommBackend.go b/internal/mocks/CommBackend.go index 3a000d83..a8faac30 100644 --- a/internal/mocks/CommBackend.go +++ b/internal/mocks/CommBackend.go @@ -1,4 +1,4 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -52,3 +52,18 @@ func (_m *CommBackend) NewListener(address string) (net.Listener, error) { return r0, r1 } + +type mockConstructorTestingTNewCommBackend interface { + mock.TestingT + Cleanup(func()) +} + +// NewCommBackend creates a new instance of CommBackend. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewCommBackend(t mockConstructorTestingTNewCommBackend) *CommBackend { + mock := &CommBackend{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/Dialer.go b/internal/mocks/Dialer.go index 3cbd7462..3057e4ab 100644 --- a/internal/mocks/Dialer.go +++ b/internal/mocks/Dialer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -30,13 +30,13 @@ func (_m *Dialer) Close() error { return r0 } -// Dial provides a mock function with given fields: ctx, addr -func (_m *Dialer) Dial(ctx context.Context, addr wire.Address) (net.Conn, error) { - ret := _m.Called(ctx, addr) +// Dial provides a mock function with given fields: ctx, addr, ser +func (_m *Dialer) Dial(ctx context.Context, addr wire.Address, ser wire.EnvelopeSerializer) (net.Conn, error) { + ret := _m.Called(ctx, addr, ser) var r0 net.Conn - if rf, ok := ret.Get(0).(func(context.Context, wire.Address) net.Conn); ok { - r0 = rf(ctx, addr) + if rf, ok := ret.Get(0).(func(context.Context, wire.Address, wire.EnvelopeSerializer) net.Conn); ok { + r0 = rf(ctx, addr, ser) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(net.Conn) @@ -44,8 +44,8 @@ func (_m *Dialer) Dial(ctx context.Context, addr wire.Address) (net.Conn, error) } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, wire.Address) error); ok { - r1 = rf(ctx, addr) + if rf, ok := ret.Get(1).(func(context.Context, wire.Address, wire.EnvelopeSerializer) error); ok { + r1 = rf(ctx, addr, ser) } else { r1 = ret.Error(1) } @@ -57,3 +57,18 @@ func (_m *Dialer) Dial(ctx context.Context, addr wire.Address) (net.Conn, error) func (_m *Dialer) Register(offChainAddr wire.Address, commAddr string) { _m.Called(offChainAddr, commAddr) } + +type mockConstructorTestingTNewDialer interface { + mock.TestingT + Cleanup(func()) +} + +// NewDialer creates a new instance of Dialer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewDialer(t mockConstructorTestingTNewDialer) *Dialer { + mock := &Dialer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/PChannel.go b/internal/mocks/PChannel.go index 9bdfbc08..f3d83690 100644 --- a/internal/mocks/PChannel.go +++ b/internal/mocks/PChannel.go @@ -1,4 +1,4 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -157,12 +157,12 @@ func (_m *PChannel) State() *channel.State { return r0 } -// UpdateBy provides a mock function with given fields: ctx, update -func (_m *PChannel) UpdateBy(ctx context.Context, update func(*channel.State) error) error { +// Update provides a mock function with given fields: ctx, update +func (_m *PChannel) Update(ctx context.Context, update func(*channel.State)) error { ret := _m.Called(ctx, update) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, func(*channel.State) error) error); ok { + if rf, ok := ret.Get(0).(func(context.Context, func(*channel.State)) error); ok { r0 = rf(ctx, update) } else { r0 = ret.Error(0) @@ -184,3 +184,18 @@ func (_m *PChannel) Watch(_a0 client.AdjudicatorEventHandler) error { return r0 } + +type mockConstructorTestingTNewPChannel interface { + mock.TestingT + Cleanup(func()) +} + +// NewPChannel creates a new instance of PChannel. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPChannel(t mockConstructorTestingTNewPChannel) *PChannel { + mock := &PChannel{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/ROContractRegistry.go b/internal/mocks/ROContractRegistry.go index 65fa6eb1..16677724 100644 --- a/internal/mocks/ROContractRegistry.go +++ b/internal/mocks/ROContractRegistry.go @@ -1,9 +1,10 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks import ( mock "github.com/stretchr/testify/mock" + channel "perun.network/go-perun/channel" wallet "perun.network/go-perun/wallet" ) @@ -30,15 +31,15 @@ func (_m *ROContractRegistry) Adjudicator() wallet.Address { } // Asset provides a mock function with given fields: symbol -func (_m *ROContractRegistry) Asset(symbol string) (wallet.Address, bool) { +func (_m *ROContractRegistry) Asset(symbol string) (channel.Asset, bool) { ret := _m.Called(symbol) - var r0 wallet.Address - if rf, ok := ret.Get(0).(func(string) wallet.Address); ok { + var r0 channel.Asset + if rf, ok := ret.Get(0).(func(string) channel.Asset); ok { r0 = rf(symbol) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(wallet.Address) + r0 = ret.Get(0).(channel.Asset) } } @@ -85,18 +86,18 @@ func (_m *ROContractRegistry) Assets() map[string]string { } // Symbol provides a mock function with given fields: asset -func (_m *ROContractRegistry) Symbol(asset wallet.Address) (string, bool) { +func (_m *ROContractRegistry) Symbol(asset channel.Asset) (string, bool) { ret := _m.Called(asset) var r0 string - if rf, ok := ret.Get(0).(func(wallet.Address) string); ok { + if rf, ok := ret.Get(0).(func(channel.Asset) string); ok { r0 = rf(asset) } else { r0 = ret.Get(0).(string) } var r1 bool - if rf, ok := ret.Get(1).(func(wallet.Address) bool); ok { + if rf, ok := ret.Get(1).(func(channel.Asset) bool); ok { r1 = rf(asset) } else { r1 = ret.Get(1).(bool) @@ -127,3 +128,18 @@ func (_m *ROContractRegistry) Token(symbol string) (wallet.Address, bool) { return r0, r1 } + +type mockConstructorTestingTNewROContractRegistry interface { + mock.TestingT + Cleanup(func()) +} + +// NewROContractRegistry creates a new instance of ROContractRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewROContractRegistry(t mockConstructorTestingTNewROContractRegistry) *ROContractRegistry { + mock := &ROContractRegistry{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/Registerer.go b/internal/mocks/Registerer.go index fd4f6a28..3200584e 100644 --- a/internal/mocks/Registerer.go +++ b/internal/mocks/Registerer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -17,3 +17,18 @@ type Registerer struct { func (_m *Registerer) Register(offChainAddr wire.Address, commAddr string) { _m.Called(offChainAddr, commAddr) } + +type mockConstructorTestingTNewRegisterer interface { + mock.TestingT + Cleanup(func()) +} + +// NewRegisterer creates a new instance of Registerer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewRegisterer(t mockConstructorTestingTNewRegisterer) *Registerer { + mock := &Registerer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/SessionAPI.go b/internal/mocks/SessionAPI.go index bfccd7ba..00347702 100644 --- a/internal/mocks/SessionAPI.go +++ b/internal/mocks/SessionAPI.go @@ -1,12 +1,19 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks import ( context "context" - perun "github.com/hyperledger-labs/perun-node" + channel "perun.network/go-perun/channel" + mock "github.com/stretchr/testify/mock" + + perun "github.com/hyperledger-labs/perun-node" + + wallet "perun.network/go-perun/wallet" + + watcher "perun.network/go-perun/watcher" ) // SessionAPI is an autogenerated mock type for the SessionAPI type @@ -78,6 +85,20 @@ func (_m *SessionAPI) DeployAssetERC20(tokenERC20 string) (string, perun.APIErro return r0, r1 } +// Fund provides a mock function with given fields: ctx, req +func (_m *SessionAPI) Fund(ctx context.Context, req channel.FundingReq) error { + ret := _m.Called(ctx, req) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, channel.FundingReq) error); ok { + r0 = rf(ctx, req) + } else { + r0 = ret.Error(0) + } + + return r0 +} + // GetCh provides a mock function with given fields: _a0 func (_m *SessionAPI) GetCh(_a0 string) (perun.ChAPI, perun.APIError) { ret := _m.Called(_a0) @@ -156,6 +177,20 @@ func (_m *SessionAPI) ID() string { return r0 } +// IsAssetRegistered provides a mock function with given fields: asset +func (_m *SessionAPI) IsAssetRegistered(asset channel.Asset) bool { + ret := _m.Called(asset) + + var r0 bool + if rf, ok := ret.Get(0).(func(channel.Asset) bool); ok { + r0 = rf(asset) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + // OpenCh provides a mock function with given fields: _a0, _a1, _a2, _a3 func (_m *SessionAPI) OpenCh(_a0 context.Context, _a1 perun.BalInfo, _a2 perun.App, _a3 uint64) (perun.ChInfo, perun.APIError) { ret := _m.Called(_a0, _a1, _a2, _a3) @@ -179,6 +214,52 @@ func (_m *SessionAPI) OpenCh(_a0 context.Context, _a1 perun.BalInfo, _a2 perun.A return r0, r1 } +// Progress provides a mock function with given fields: _a0, _a1 +func (_m *SessionAPI) Progress(_a0 context.Context, _a1 perun.ProgressReq) perun.APIError { + ret := _m.Called(_a0, _a1) + + var r0 perun.APIError + if rf, ok := ret.Get(0).(func(context.Context, perun.ProgressReq) perun.APIError); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(perun.APIError) + } + } + + return r0 +} + +// Register provides a mock function with given fields: _a0, _a1, _a2 +func (_m *SessionAPI) Register(_a0 context.Context, _a1 perun.AdjudicatorReq, _a2 []channel.SignedState) perun.APIError { + ret := _m.Called(_a0, _a1, _a2) + + var r0 perun.APIError + if rf, ok := ret.Get(0).(func(context.Context, perun.AdjudicatorReq, []channel.SignedState) perun.APIError); ok { + r0 = rf(_a0, _a1, _a2) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(perun.APIError) + } + } + + return r0 +} + +// RegisterAssetERC20 provides a mock function with given fields: asset, token, acc +func (_m *SessionAPI) RegisterAssetERC20(asset channel.Asset, token wallet.Address, acc wallet.Address) bool { + ret := _m.Called(asset, token, acc) + + var r0 bool + if rf, ok := ret.Get(0).(func(channel.Asset, wallet.Address, wallet.Address) bool); ok { + r0 = rf(asset, token, acc) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + // RespondChProposal provides a mock function with given fields: _a0, _a1, _a2 func (_m *SessionAPI) RespondChProposal(_a0 context.Context, _a1 string, _a2 bool) (perun.ChInfo, perun.APIError) { ret := _m.Called(_a0, _a1, _a2) @@ -202,6 +283,90 @@ func (_m *SessionAPI) RespondChProposal(_a0 context.Context, _a1 string, _a2 boo return r0, r1 } +// StartWatchingLedgerChannel provides a mock function with given fields: _a0, _a1 +func (_m *SessionAPI) StartWatchingLedgerChannel(_a0 context.Context, _a1 channel.SignedState) (watcher.StatesPub, watcher.AdjudicatorSub, perun.APIError) { + ret := _m.Called(_a0, _a1) + + var r0 watcher.StatesPub + if rf, ok := ret.Get(0).(func(context.Context, channel.SignedState) watcher.StatesPub); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(watcher.StatesPub) + } + } + + var r1 watcher.AdjudicatorSub + if rf, ok := ret.Get(1).(func(context.Context, channel.SignedState) watcher.AdjudicatorSub); ok { + r1 = rf(_a0, _a1) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(watcher.AdjudicatorSub) + } + } + + var r2 perun.APIError + if rf, ok := ret.Get(2).(func(context.Context, channel.SignedState) perun.APIError); ok { + r2 = rf(_a0, _a1) + } else { + if ret.Get(2) != nil { + r2 = ret.Get(2).(perun.APIError) + } + } + + return r0, r1, r2 +} + +// StartWatchingSubChannel provides a mock function with given fields: ctx, parent, signedState +func (_m *SessionAPI) StartWatchingSubChannel(ctx context.Context, parent [32]byte, signedState channel.SignedState) (watcher.StatesPub, watcher.AdjudicatorSub, perun.APIError) { + ret := _m.Called(ctx, parent, signedState) + + var r0 watcher.StatesPub + if rf, ok := ret.Get(0).(func(context.Context, [32]byte, channel.SignedState) watcher.StatesPub); ok { + r0 = rf(ctx, parent, signedState) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(watcher.StatesPub) + } + } + + var r1 watcher.AdjudicatorSub + if rf, ok := ret.Get(1).(func(context.Context, [32]byte, channel.SignedState) watcher.AdjudicatorSub); ok { + r1 = rf(ctx, parent, signedState) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(watcher.AdjudicatorSub) + } + } + + var r2 perun.APIError + if rf, ok := ret.Get(2).(func(context.Context, [32]byte, channel.SignedState) perun.APIError); ok { + r2 = rf(ctx, parent, signedState) + } else { + if ret.Get(2) != nil { + r2 = ret.Get(2).(perun.APIError) + } + } + + return r0, r1, r2 +} + +// StopWatching provides a mock function with given fields: _a0, _a1 +func (_m *SessionAPI) StopWatching(_a0 context.Context, _a1 [32]byte) perun.APIError { + ret := _m.Called(_a0, _a1) + + var r0 perun.APIError + if rf, ok := ret.Get(0).(func(context.Context, [32]byte) perun.APIError); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(perun.APIError) + } + } + + return r0 +} + // SubChProposals provides a mock function with given fields: _a0 func (_m *SessionAPI) SubChProposals(_a0 perun.ChProposalNotifier) perun.APIError { ret := _m.Called(_a0) @@ -218,6 +383,31 @@ func (_m *SessionAPI) SubChProposals(_a0 perun.ChProposalNotifier) perun.APIErro return r0 } +// Subscribe provides a mock function with given fields: _a0, _a1 +func (_m *SessionAPI) Subscribe(_a0 context.Context, _a1 [32]byte) (channel.AdjudicatorSubscription, perun.APIError) { + ret := _m.Called(_a0, _a1) + + var r0 channel.AdjudicatorSubscription + if rf, ok := ret.Get(0).(func(context.Context, [32]byte) channel.AdjudicatorSubscription); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(channel.AdjudicatorSubscription) + } + } + + var r1 perun.APIError + if rf, ok := ret.Get(1).(func(context.Context, [32]byte) perun.APIError); ok { + r1 = rf(_a0, _a1) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(perun.APIError) + } + } + + return r0, r1 +} + // UnsubChProposals provides a mock function with given fields: func (_m *SessionAPI) UnsubChProposals() perun.APIError { ret := _m.Called() @@ -233,3 +423,34 @@ func (_m *SessionAPI) UnsubChProposals() perun.APIError { return r0 } + +// Withdraw provides a mock function with given fields: _a0, _a1, _a2 +func (_m *SessionAPI) Withdraw(_a0 context.Context, _a1 perun.AdjudicatorReq, _a2 channel.StateMap) perun.APIError { + ret := _m.Called(_a0, _a1, _a2) + + var r0 perun.APIError + if rf, ok := ret.Get(0).(func(context.Context, perun.AdjudicatorReq, channel.StateMap) perun.APIError); ok { + r0 = rf(_a0, _a1, _a2) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(perun.APIError) + } + } + + return r0 +} + +type mockConstructorTestingTNewSessionAPI interface { + mock.TestingT + Cleanup(func()) +} + +// NewSessionAPI creates a new instance of SessionAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewSessionAPI(t mockConstructorTestingTNewSessionAPI) *SessionAPI { + mock := &SessionAPI{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mocks/WireBus.go b/internal/mocks/WireBus.go index 43514a6a..34fb7c2c 100644 --- a/internal/mocks/WireBus.go +++ b/internal/mocks/WireBus.go @@ -1,4 +1,4 @@ -// Code generated by mockery v0.0.0-dev. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package mocks @@ -56,3 +56,18 @@ func (_m *WireBus) SubscribeClient(c wire.Consumer, clientAddr wire.Address) err return r0 } + +type mockConstructorTestingTNewWireBus interface { + mock.TestingT + Cleanup(func()) +} + +// NewWireBus creates a new instance of WireBus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewWireBus(t mockConstructorTestingTNewWireBus) *WireBus { + mock := &WireBus{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/log/logger.go b/log/logger.go index 69744f10..ed786413 100755 --- a/log/logger.go +++ b/log/logger.go @@ -71,7 +71,7 @@ func InitLogger(levelStr, logFile string) error { // initialized to "debug" level and logs to the standard output (stdout). func NewLogger() Logger { if logger == nil { - InitLogger("debug", "") // nolint: errcheck, gosec // err will always be nil in this case. + InitLogger("debug", "") //nolint:errcheck, gosec // err will always be nil in this case. } return logger } @@ -84,7 +84,7 @@ func NewLogger() Logger { // initialized to "debug" level and logs to the standard output (stdout). func NewLoggerWithField(key string, value interface{}) Logger { if logger == nil { - InitLogger("debug", "") // nolint: errcheck, gosec // err will always be nil in this case. + InitLogger("debug", "") //nolint:errcheck, gosec // err will always be nil in this case. } return logger.WithField(key, value) } diff --git a/log/logger_internal_test.go b/log/logger_internal_test.go index 592784cf..83dbc15b 100755 --- a/log/logger_internal_test.go +++ b/log/logger_internal_test.go @@ -17,7 +17,6 @@ package log import ( - "io/ioutil" "os" "path/filepath" "testing" @@ -56,7 +55,7 @@ func Test_NewLoggerWithField(t *testing.T) { }) t.Run("happy_with_init_file", func(t *testing.T) { setCleanup(t) - tempFile, err := ioutil.TempFile("", "") + tempFile, err := os.CreateTemp("", "") require.NoError(t, err) require.NoError(t, tempFile.Close()) t.Cleanup(func() { @@ -104,7 +103,7 @@ func Test_InitLogger(t *testing.T) { t.Run("err_setting_up_file", func(t *testing.T) { setCleanup(t) - tempDir, err := ioutil.TempDir("", "") + tempDir, err := os.MkdirTemp("", "") require.NoError(t, err) logFile := filepath.Join(tempDir, "1") f, err := os.OpenFile(logFile, os.O_RDONLY|os.O_CREATE, 0o000) diff --git a/node/node.go b/node/node.go index 0944b864..ccbed41d 100644 --- a/node/node.go +++ b/node/node.go @@ -20,7 +20,7 @@ import ( "time" "github.com/pkg/errors" - psync "perun.network/go-perun/pkg/sync" + psync "polycry.pt/poly-go/sync" "github.com/hyperledger-labs/perun-node" "github.com/hyperledger-labs/perun-node/blockchain" @@ -51,7 +51,7 @@ func (e Error) Error() string { // This should be called only once, subsequent calls after the first non error // response will return an error. func New(cfg perun.NodeConfig) (perun.NodeAPI, error) { - chain, err := ethereum.NewROChainBackend(cfg.ChainURL, cfg.ChainID, cfg.ChainConnTimeout) + chain, err := ethereum.NewROChainBackend(cfg.ChainURL, cfg.ChainConnTimeout) if err != nil { return nil, errors.WithMessage(err, "connecting to blockchain") } @@ -85,7 +85,8 @@ func New(cfg perun.NodeConfig) (perun.NodeAPI, error) { } func initContractRegistry(chain perun.ROChainBackend, adjudicator, assetETH string) ( - perun.ContractRegistry, error) { + perun.ContractRegistry, error, +) { walletBackend := ethereum.NewWalletBackend() adjudicatorAddr, err := walletBackend.ParseAddr(adjudicator) if err != nil { @@ -105,7 +106,8 @@ func initContractRegistry(chain perun.ROChainBackend, adjudicator, assetETH stri } func registerAssetERC20s(assetERC20s map[string]string, - contractRegistry perun.ContractRegistry, currencyRegistry perun.CurrencyRegistry) error { + contractRegistry perun.ContractRegistry, currencyRegistry perun.CurrencyRegistry, +) error { walletBackend := ethereum.NewWalletBackend() for tokenERC20, assetERC20 := range assetERC20s { tokenERC20Addr, err := walletBackend.ParseAddr(tokenERC20) @@ -170,11 +172,16 @@ func (n *node) OpenSession(configFile string) (string, []perun.ChInfo, perun.API sessionConfig, err := session.ParseConfig(configFile) if err != nil { err = errors.WithMessage(err, "parsing config") - return "", nil, perun.NewAPIErrInvalidArgument(err, session.ArgNameConfigFile, configFile) + return "", nil, perun.NewAPIErrInvalidArgument(err, perun.ArgNameConfigFile, configFile) } + + if sessionConfig.FundingType == "local" { + // AssetETH is set during contract registry init and will always be + // found, other assets will be added later. + sessionConfig.AssetETH = n.contractRegistry.AssetETH() + } + // Set adjudicator anyways until remote adjudicator is implemented. sessionConfig.Adjudicator = n.contractRegistry.Adjudicator() - // AssetETH is set during contract registry init and will always be found. - sessionConfig.AssetETH = n.contractRegistry.AssetETH() sess, apiErr := session.New(sessionConfig, n.currencyRegistry, n.contractRegistry) if apiErr != nil { return "", nil, apiErr @@ -210,13 +217,13 @@ func (n *node) RegisterCurrency(tokenERC20Addr, assetERC20Addr string) (symbol s walletBackend := ethereum.NewWalletBackend() assetERC20, err := walletBackend.ParseAddr(assetERC20Addr) if err != nil { - apiErr = perun.NewAPIErrInvalidArgument(err, session.ArgNameAsset, assetERC20Addr) + apiErr = perun.NewAPIErrInvalidArgument(err, perun.ArgNameAsset, assetERC20Addr) return "", apiErr } tokenERC20, err := walletBackend.ParseAddr(tokenERC20Addr) if err != nil { - apiErr = perun.NewAPIErrInvalidArgument(err, session.ArgNameToken, tokenERC20Addr) + apiErr = perun.NewAPIErrInvalidArgument(err, perun.ArgNameToken, tokenERC20Addr) return "", apiErr } @@ -226,7 +233,7 @@ func (n *node) RegisterCurrency(tokenERC20Addr, assetERC20Addr string) (symbol s invalidContractError := blockchain.InvalidContractError{} switch { case errors.As(err, &assetERC20RegisteredError): - apiErr = perun.NewAPIErrResourceExists(session.ResTypeCurrency, assetERC20RegisteredError.Symbol) + apiErr = perun.NewAPIErrResourceExists(perun.ResTypeCurrency, assetERC20RegisteredError.Symbol) return "", apiErr case errors.As(err, &invalidContractError): contractErrorInfo := perun.ContractErrInfo{ @@ -247,7 +254,7 @@ func (n *node) RegisterCurrency(tokenERC20Addr, assetERC20Addr string) (symbol s // Ideally, code should not reach here, because currency registry is // only updated after contracts registry, this condition would have // already been detected when registering to contract registry. - return "", perun.NewAPIErrResourceExists(session.ResTypeCurrency, symbol) + return "", perun.NewAPIErrResourceExists(perun.ResTypeCurrency, symbol) } return symbol, nil } @@ -272,7 +279,7 @@ func (n *node) GetSession(sessionID string) (perun.SessionAPI, perun.APIError) { sess, ok := n.sessions[sessionID] n.Unlock() if !ok { - apiErr := perun.NewAPIErrResourceNotFound(session.ResTypeSession, sessionID) + apiErr := perun.NewAPIErrResourceNotFound(perun.ResTypeSession, sessionID) n.WithFields(perun.APIErrAsMap("GetSession (internal)", apiErr)).Error(apiErr.Message()) return nil, apiErr } diff --git a/node/node_integ_test.go b/node/node_integ_test.go index ae4dbc62..771a89c7 100644 --- a/node/node_integ_test.go +++ b/node/node_integ_test.go @@ -32,7 +32,6 @@ import ( "github.com/hyperledger-labs/perun-node/node" "github.com/hyperledger-labs/perun-node/node/nodetest" "github.com/hyperledger-labs/perun-node/peruntest" - "github.com/hyperledger-labs/perun-node/session" "github.com/hyperledger-labs/perun-node/session/sessiontest" ) @@ -167,7 +166,7 @@ func Test_Integ_Node_OpenSession_GetSession(t *testing.T) { _, apiErr := n.GetSession(unknownSessID) peruntest.AssertAPIError(t, apiErr, perun.ClientError, perun.ErrResourceNotFound) - peruntest.AssertErrInfoResourceNotFound(t, apiErr.AddInfo(), session.ResTypeSession, unknownSessID) + peruntest.AssertErrInfoResourceNotFound(t, apiErr.AddInfo(), perun.ResTypeSession, unknownSessID) }) } @@ -198,7 +197,7 @@ func Test_Integ_Node_RegisterCurrency(t *testing.T) { require.Error(t, apiErr) peruntest.AssertAPIError(t, apiErr, perun.ClientError, perun.ErrResourceExists) - peruntest.AssertErrInfoResourceExists(t, apiErr.AddInfo(), session.ResTypeCurrency, "PRN") + peruntest.AssertErrInfoResourceExists(t, apiErr.AddInfo(), perun.ResTypeCurrency, "PRN") } }) } diff --git a/perun.go b/perun.go index 97a716f4..8946a21d 100644 --- a/perun.go +++ b/perun.go @@ -23,6 +23,7 @@ import ( pchannel "perun.network/go-perun/channel" pwallet "perun.network/go-perun/wallet" + pwatcher "perun.network/go-perun/watcher" pwire "perun.network/go-perun/wire" pnet "perun.network/go-perun/wire/net" ) @@ -149,8 +150,8 @@ type ROChainBackend interface { // core abstraction. type Funder interface { pchannel.Funder - RegisterAssetERC20(asset, token, acc pwallet.Address) bool - IsAssetRegistered(asset pwallet.Address) bool + RegisterAssetERC20(asset pchannel.Asset, token, acc pwallet.Address) bool + IsAssetRegistered(asset pchannel.Asset) bool } // WalletBackend wraps the methods for instantiating wallets and accounts that are specific to a blockchain platform. @@ -195,9 +196,9 @@ type ContractRegistry interface { type ROContractRegistry interface { Adjudicator() pwallet.Address AssetETH() pwallet.Address - Asset(symbol string) (asset pwallet.Address, found bool) + Asset(symbol string) (asset pchannel.Asset, found bool) Token(symbol string) (token pwallet.Address, found bool) - Symbol(asset pwallet.Address) (symbol string, found bool) + Symbol(asset pchannel.Asset) (symbol string, found bool) Assets() map[string]string } @@ -219,7 +220,6 @@ type NodeConfig struct { CommTypes []string // Communication protocols supported by the node for off-chain communication. IDProviderTypes []string // ID Provider types supported by the node. CurrencyInterpreters []string // Currencies Interpreters supported by the node. - } // APIError represents the newer version of error returned by node, session @@ -433,6 +433,21 @@ type SessionAPI interface { DeployAssetERC20(tokenERC20 string) (asset string, _ APIError) + Fund(ctx context.Context, req pchannel.FundingReq) error + RegisterAssetERC20(asset pchannel.Asset, token, acc pwallet.Address) bool + IsAssetRegistered(asset pchannel.Asset) bool + + Register(context.Context, AdjudicatorReq, []pchannel.SignedState) APIError + Withdraw(context.Context, AdjudicatorReq, pchannel.StateMap) APIError + Progress(context.Context, ProgressReq) APIError + Subscribe(context.Context, pchannel.ID) (pchannel.AdjudicatorSubscription, APIError) + + StartWatchingLedgerChannel(context.Context, pchannel.SignedState) ( + pwatcher.StatesPub, pwatcher.AdjudicatorSub, APIError) + StartWatchingSubChannel(ctx context.Context, parent pchannel.ID, signedState pchannel.SignedState) ( + pwatcher.StatesPub, pwatcher.AdjudicatorSub, APIError) + StopWatching(context.Context, pchannel.ID) APIError + // This function is used internally to get a ChAPI instance. // Should not be exposed via user API. GetCh(string) (ChAPI, APIError) @@ -560,5 +575,32 @@ type ( } // StateUpdater function is the function that will be used for applying state updates. - StateUpdater func(*pchannel.State) error + StateUpdater func(*pchannel.State) ) + +// AdjudicatorReq redefines pchannel.AdjudicatorReq with a slight modification. +// +// It uses pwallet.Address type instead of pwallet.Account for acc, which is +// used for signing withdrawal auth. +// +// Because, only addresses can be passed over the wire or from external sources. +// The corresponding account will be initialized by the API using its wallet. +type AdjudicatorReq struct { + Params *pchannel.Params + Acc pwallet.Address + Tx pchannel.Transaction + Idx pchannel.Index // Always the own index + Secondary bool // Optimized secondary call protocol +} + +// ProgressReq redefines pchannel.ProgressReq with a slight modification. +// +// It uses redefined AdjudicatorReq type instead of pchannel.AdjudicatorReq. +// +// See documentation of AdjudicatorReq, for details on why this redefined type +// is used in session API. +type ProgressReq struct { + AdjudicatorReq // Tx should refer to the currently registered state + NewState *pchannel.State // New state to progress into + Sig pwallet.Sig // Own signature on the new state +} diff --git a/peruntest/assert.go b/peruntest/assert.go index 25f946d4..852e5194 100644 --- a/peruntest/assert.go +++ b/peruntest/assert.go @@ -137,7 +137,7 @@ func AssertErrInfoInvalidConfig(t *testing.T, info interface{}, name, value stri // AssertErrInfoInvalidContracts tests if additional info field is of // correct type and has expected values. -func AssertErrInfoInvalidContracts(t *testing.T, info interface{}, contractErrInfos []perun.ContractErrInfo) { +func AssertErrInfoInvalidContracts(t *testing.T, info interface{}, _ []perun.ContractErrInfo) { t.Helper() _, ok := info.(perun.ErrInfoInvalidContracts) diff --git a/proto/api_messages.proto b/proto/api_messages.proto new file mode 100644 index 00000000..29e0faf1 --- /dev/null +++ b/proto/api_messages.proto @@ -0,0 +1,43 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. +package pb; + +import "funding_service.proto"; +import "watching_service.proto"; + +// Option go_package is to specify the exact path where the generated go code should reside. +option go_package = ".;pb"; + +// This type is defined as the enumeration of all messages in funding and +// watching service, in order to be able to parse the messages in api/tcp +// package. +message APIMessage{ + oneof msg { + FundReq fund_req = 1; + FundResp fund_resp = 2; + RegisterReq register_req = 3; + RegisterResp register_resp = 4; + WithdrawReq withdraw_req = 5; + WithdrawResp withdraw_resp = 6; + StartWatchingLedgerChannelReq start_watching_ledger_channel_req = 7; + StopWatchingReq stop_watching_req = 8; + } +} diff --git a/proto/errors.proto b/proto/errors.proto new file mode 100644 index 00000000..89bd194f --- /dev/null +++ b/proto/errors.proto @@ -0,0 +1,138 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. +package pb; + +import "nodetypes.proto"; + +// Option go_package is to specify the exact path where the generated go code should reside. +option go_package = ".;pb"; + +message MsgError { + ErrorCategory category = 1; + ErrorCode code = 2; + string message = 3; + oneof addInfo { + ErrInfoPeerRequestTimedOut ErrInfoPeerRequestTimedOut = 4; + ErrInfoPeerRejected ErrInfoPeerRejected = 5; + ErrInfoPeerNotFunded ErrInfoPeerNotFunded = 6; + ErrInfoUserResponseTimedOut ErrInfoUserResponseTimedOut = 7; + ErrInfoResourceNotFound ErrInfoResourceNotFound = 8; + ErrInfoResourceExists ErrInfoResourceExists = 9; + ErrInfoInvalidArgument ErrInfoInvalidArgument = 10; + ErrInfoFailedPreCondUnclosedChs ErrInfoFailedPreCondUnclosedChs = 11; + ErrInfoInvalidConfig ErrInfoInvalidConfig = 13; + ErrInfoInvalidContracts ErrInfoInvalidContracts = 14; + ErrInfoTxTimedOut ErrInfoTxTimedOut = 15; + ErrInfoChainNotReachable ErrInfoChainNotReachable = 16; + } +} + +enum ErrorCategory { + ParticipantError = 0; + ClientError = 1; + ProtocolError = 2; + InternalError = 3; +} + +enum ErrorCode { + /* Though "0" is an invalid error code, we still define it, because + proto3 requires that every enum definition should have 0 mapped to + atleast one constant. */ + DefaultInvalidCode = 0; + + ErrPeerRequestTimedOut = 101; + ErrPeerRejected = 102; + ErrPeerNotFunded = 103; + ErrUserResponseTimedOut = 104; + ErrResourceNotFound = 201; + ErrResourceExists = 202; + ErrInvalidArgument = 203; + ErrFailedPreCondition = 204; + ErrInvalidConfig = 205; + ErrInvalidContracts = 206; + ErrTxTimedOut = 301; + ErrChainNotReachable = 302; + ErrUnknownInternal = 401; +} + +message ErrInfoPeerRequestTimedOut { + string peerAlias = 1; + string timeout = 2; +} + +message ErrInfoPeerRejected { + string peerAlias = 1; + string reason = 2; +} + +message ErrInfoPeerNotFunded { + string peerAlias = 1; +} + +message ErrInfoUserResponseTimedOut { + int64 expiry = 1; + int64 receivedAt = 2; +} + +message ErrInfoResourceNotFound { + string type = 1; + string id = 2; +} + +message ErrInfoResourceExists { + string type = 1; + string id = 2; +} + +message ErrInfoInvalidArgument { + string name = 1; + string value = 2; + string requirement = 3; +} + +message ErrInfoFailedPreCondUnclosedChs { + repeated PayChInfo chs = 1; +} + +message ErrInfoInvalidConfig { + string name = 1; + string value = 2; +} + +message ContractErrInfo { + string name = 1; + string address = 2; + string error = 3; +} + +message ErrInfoInvalidContracts { + repeated ContractErrInfo ContractErrInfos = 1; +} + +message ErrInfoTxTimedOut { + string txType = 1; + string txID = 2; + string txTimeout = 3; +} + +message ErrInfoChainNotReachable { + string chainURL = 1; +} diff --git a/proto/funding_service.proto b/proto/funding_service.proto new file mode 100644 index 00000000..44b136ae --- /dev/null +++ b/proto/funding_service.proto @@ -0,0 +1,134 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. +package pb; + +import "errors.proto"; +import "sdktypes.proto"; + +// Option go_package is to specify the exact path where the generated go code should reside. +option go_package = ".;pb"; + +// Funding_API provides APIs for a user to deposit and withdraw funds for +// payment channels on the blockchain. +service Funding_API{ + rpc RegisterAssetERC20(RegisterAssetERC20Req) returns (RegisterAssetERC20Resp){} + rpc IsAssetRegistered(IsAssetRegisteredReq) returns (IsAssetRegisteredResp){} + + rpc Fund(FundReq) returns (FundResp){} + + rpc Register(RegisterReq) returns (RegisterResp){} + rpc Withdraw(WithdrawReq) returns (WithdrawResp){} + rpc Progress(ProgressReq) returns (ProgressResp){} + rpc Subscribe(SubscribeReq) returns (stream SubscribeResp){} + rpc Unsubscribe(UnsubscribeReq) returns (UnsubscribeResp){} +} + +message RegisterAssetERC20Req { + string sessionID=1; + bytes asset = 2; + string tokenAddr = 3; + string deposiorAcc = 4; +} + +message RegisterAssetERC20Resp { + bool msgSuccess = 1; +} + +message IsAssetRegisteredReq { + string sessionID=1; + bytes asset = 2; +} + +message IsAssetRegisteredResp { + oneof response{ + MsgSuccess msgSuccess = 1; + MsgError error = 2; + } + message MsgSuccess { + bool isRegistered = 1; + } +} + +message FundReq { + string sessionID=1; + Params params = 2; + State state = 3; + uint32 idx = 4; + Balances agreement = 5; +} + +message FundResp { + MsgError error = 1; +} + +message RegisterReq { + string sessionID = 1; + AdjudicatorReq adjReq = 2; + repeated SignedState signedStates = 3; +} + +message RegisterResp { + MsgError error = 1; +} + +message WithdrawReq { + string sessionID = 1; + AdjudicatorReq adjReq = 2; + repeated StateMap stateMap = 3; +} + +message WithdrawResp { + MsgError error = 1; +} + +message ProgressReq { + string sessionID = 1; + AdjudicatorReq adjReq = 2; + State newState = 3; + bytes sig = 4; +} + +message ProgressResp { + MsgError error = 1; +} + +message SubscribeReq { + string sessionID = 1; + bytes chID = 2; +} + +message SubscribeResp { + oneof response{ + RegisteredEvent registeredEvent = 1; + ProgressedEvent progressedEvent = 2; + ConcludedEvent concludedEvent = 3; + MsgError error = 4; + } +} + +message UnsubscribeReq { + string sessionID = 1; + bytes chID = 2; +} + +message UnsubscribeResp { + MsgError error = 1; +} diff --git a/proto/nodetypes.proto b/proto/nodetypes.proto new file mode 100644 index 00000000..2c38fa51 --- /dev/null +++ b/proto/nodetypes.proto @@ -0,0 +1,64 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. +package pb; + +// Option go_package is to specify the exact path where the generated go code should reside. +option go_package = ".;pb"; + +// Peer ID represents the data required to identify and communicate +// with a participant in the the off-chain network. +message PeerID { + string alias=1; + string offChainAddress=2; + string commAddress=3; + string commType=4; +} + +// BalInfo represents the balance information of the channel: Currency and the channel balance. +// Balance is represented as two corresponding lists: +// Parts contains the list of aliases of the channel participants and +// Balance list contains the amount held by each channel participant in the give currency. +// +// A valid BalInfo should meet the following conditions, it should be validated when using them. +// 1. Lengths of Parts list and Balance list are equal. +// 2. All entries in Parts list are unique. +// 3. Parts list has an entry "self", that represents the user of the session. +// 4. No amount in Balance must be negative. +message BalInfo { + message bal { + repeated string bal=1; + } + repeated string currencies=1; + repeated string parts=2; + repeated bal bals=3; +} + +message PayChInfo { + string chID = 1; + BalInfo balInfo = 2; + string version=3; +} + +message Payment { + string currency = 1; + string payee = 2; + string amount = 3; +} diff --git a/api/grpc/pb/api.proto b/proto/payment_service.proto similarity index 66% rename from api/grpc/pb/api.proto rename to proto/payment_service.proto index 87479d6d..bbf51781 100644 --- a/api/grpc/pb/api.proto +++ b/proto/payment_service.proto @@ -20,161 +20,12 @@ syntax = "proto3"; // generated code for grpc server and client. package pb; +import "nodetypes.proto"; +import "errors.proto"; + // Option go_package is to specify the exact path where the generated go code should reside. option go_package = ".;pb"; -// Peer ID represents the data required to identify and communicate -// with a participant in the the off-chain network. -message PeerID { - string alias=1; - string offChainAddress=2; - string commAddress=3; - string commType=4; -} - -// BalInfo represents the balance information of the channel: Currency and the channel balance. -// Balance is represented as two corresponding lists: -// Parts contains the list of aliases of the channel participants and -// Balance list contains the amount held by each channel participant in the give currency. -// -// A valid BalInfo should meet the following conditions, it should be validated when using them. -// 1. Lengths of Parts list and Balance list are equal. -// 2. All entries in Parts list are unique. -// 3. Parts list has an entry "self", that represents the user of the session. -// 4. No amount in Balance must be negative. -message BalInfo { - message bal { - repeated string bal=1; - } - repeated string currencies=1; - repeated string parts=2; - repeated bal bals=3; -} - -message PayChInfo { - string chID = 1; - BalInfo balInfo = 2; - string version=3; -} - -message Payment { - string currency = 1; - string payee = 2; - string amount = 3; -} - -message MsgError { - ErrorCategory category = 1; - ErrorCode code = 2; - string message = 3; - oneof addInfo { - ErrInfoPeerRequestTimedOut ErrInfoPeerRequestTimedOut = 4; - ErrInfoPeerRejected ErrInfoPeerRejected = 5; - ErrInfoPeerNotFunded ErrInfoPeerNotFunded = 6; - ErrInfoUserResponseTimedOut ErrInfoUserResponseTimedOut = 7; - ErrInfoResourceNotFound ErrInfoResourceNotFound = 8; - ErrInfoResourceExists ErrInfoResourceExists = 9; - ErrInfoInvalidArgument ErrInfoInvalidArgument = 10; - ErrInfoFailedPreCondUnclosedChs ErrInfoFailedPreCondUnclosedChs = 11; - ErrInfoInvalidConfig ErrInfoInvalidConfig = 13; - ErrInfoInvalidContracts ErrInfoInvalidContracts = 14; - ErrInfoTxTimedOut ErrInfoTxTimedOut = 15; - ErrInfoChainNotReachable ErrInfoChainNotReachable = 16; - } -} - -enum ErrorCategory { - ParticipantError = 0; - ClientError = 1; - ProtocolError = 2; - InternalError = 3; -} - -enum ErrorCode { - /* Though "0" is an invalid error code, we still define it, because - proto3 requires that every enum definition should have 0 mapped to - atleast one constant. */ - DefaultInvalidCode = 0; - - ErrPeerRequestTimedOut = 101; - ErrPeerRejected = 102; - ErrPeerNotFunded = 103; - ErrUserResponseTimedOut = 104; - ErrResourceNotFound = 201; - ErrResourceExists = 202; - ErrInvalidArgument = 203; - ErrFailedPreCondition = 204; - ErrInvalidConfig = 205; - ErrInvalidContracts = 206; - ErrTxTimedOut = 301; - ErrChainNotReachable = 302; - ErrUnknownInternal = 401; -} - -message ErrInfoPeerRequestTimedOut { - string peerAlias = 1; - string timeout = 2; -} - -message ErrInfoPeerRejected { - string peerAlias = 1; - string reason = 2; -} - -message ErrInfoPeerNotFunded { - string peerAlias = 1; -} - -message ErrInfoUserResponseTimedOut { - int64 expiry = 1; - int64 receivedAt = 2; -} - -message ErrInfoResourceNotFound { - string type = 1; - string id = 2; -} - -message ErrInfoResourceExists { - string type = 1; - string id = 2; -} - -message ErrInfoInvalidArgument { - string name = 1; - string value = 2; - string requirement = 3; -} - -message ErrInfoFailedPreCondUnclosedChs { - repeated PayChInfo chs = 1; -} - -message ErrInfoInvalidConfig { - string name = 1; - string value = 2; -} - -message ContractErrInfo { - string name = 1; - string address = 2; - string error = 3; -} - -message ErrInfoInvalidContracts { - repeated ContractErrInfo ContractErrInfos = 1; -} - -message ErrInfoTxTimedOut { - string txType = 1; - string txID = 2; - string txTimeout = 3; -} - -message ErrInfoChainNotReachable { - string chainURL = 1; -} - // Payment_API provides APIs for a user to open payment channels, send/receive payments // and finalize the channels on the blockchain service Payment_API{ diff --git a/proto/sdktypes.proto b/proto/sdktypes.proto new file mode 100644 index 00000000..701a019d --- /dev/null +++ b/proto/sdktypes.proto @@ -0,0 +1,143 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. +package pb; + +// Option go_package is to specify the exact path where the generated go code should reside. +option go_package = ".;pb"; + +// Balance represents the balance of a single asset, for all the channel +// participants. +message Balance { + repeated bytes balance = 1; +} + +// Balances represents the balance of all the assets, for all the channel +// participants. +message Balances { + repeated Balance balances = 1; +} + +// Params represents channel.Params. +message Params { + bytes id = 1; + uint64 challenge_duration = 2; + repeated bytes parts = 3; + bytes app = 4; + bytes nonce = 5; + bool ledger_channel = 6; + bool virtual_channel = 7; +} + + +// IndexMap represents the mapping of a participant indices in a sub allocation +// or a virtual channel funding proposal to the corresponding indices in the +// parent channel. +message IndexMap { + repeated uint32 index_map = 1; +} + +// SubAlloc represts a sub allocation. +message SubAlloc { + bytes id = 1; + Balance bals = 2; + IndexMap index_map = 3; +} + +// Allocation represents channel.Allocation. +message Allocation { + repeated bytes assets = 1; + Balances balances = 2; + repeated SubAlloc locked = 3; +} + +// State represents channel.State. +message State { + bytes id = 1; + uint64 version = 2; + bytes app = 3; + Allocation allocation = 4; + bytes data = 5; + bool is_final = 6; +} + +// AdjudicatorReq represents channel.AdjudicatorReq. +message AdjudicatorReq { + Params params = 1; + bytes acc = 2; + Transaction tx = 3; + uint32 idx = 4; + bool secondary = 5; +} + +// AdjudicatorEventBase represents channel.AdjudicatorEventBase. +message AdjudicatorEventBase { + bytes chID = 1; + Timeout timeout = 2; + uint64 version = 3; + + enum TimeoutType { + elapsed = 0; + time = 1; + ethBlock = 2; + } + message Timeout { + int64 sec = 1; + TimeoutType type = 3; + } +} + +// RegisteredEvent represents channel.RegisteredEvent. +message RegisteredEvent { + AdjudicatorEventBase adjudicatorEventBase = 1; + State state = 2; + repeated bytes sigs = 3; +} + +// ProgressedEvent represents channel.ProgressedEvent. +message ProgressedEvent { + AdjudicatorEventBase adjudicatorEventBase = 1; + State state = 2; + uint32 idx = 3; +} + +// ConcludedEvent represents channel.ConcludedEvent. +message ConcludedEvent { + AdjudicatorEventBase adjudicatorEventBase = 1; +} + +// Transaction represents channel.Transaction. +message Transaction { + State state = 1; + repeated bytes sigs = 2; +} + +// SignedState represents channel.SignedState. +message SignedState { + Params params = 1; + State state = 2; + repeated bytes sigs = 3; +} + +// StateMap represents channel.StateMap. +message StateMap { + bytes id = 1; + State state = 2; +} diff --git a/proto/watching_service.proto b/proto/watching_service.proto new file mode 100644 index 00000000..a9e26425 --- /dev/null +++ b/proto/watching_service.proto @@ -0,0 +1,59 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +// Package pb contains proto3 definitions for user API and the corresponding +// generated code for grpc server and client. +package pb; + +import "errors.proto"; +import "sdktypes.proto"; + +// Option go_package is to specify the exact path where the generated go code should reside. +option go_package = ".;pb"; + +// Watching_API provides APIs for a user to watch for events from the +// blockchain related to payment channels. +service Watching_API{ + rpc StartWatchingLedgerChannel(stream StartWatchingLedgerChannelReq) returns (stream StartWatchingLedgerChannelResp) {} + rpc StopWatching(StopWatchingReq) returns (StopWatchingResp) {} +} + +message StartWatchingLedgerChannelReq { + string sessionID = 1; + Params params = 2; + State state = 3; + repeated bytes sigs = 4; +} + +message StartWatchingLedgerChannelResp { + oneof response{ + RegisteredEvent registeredEvent = 1; + ProgressedEvent progressedEvent = 2; + ConcludedEvent concludedEvent = 3; + MsgError error = 4; + } +} + +message StopWatchingReq { + string sessionID = 1; + bytes chID = 2; +} + +message StopWatchingResp { + MsgError error = 1; +} diff --git a/session/channel.go b/session/channel.go index 1a1eefc6..09b5a96a 100644 --- a/session/channel.go +++ b/session/channel.go @@ -25,8 +25,8 @@ import ( pchannel "perun.network/go-perun/channel" pclient "perun.network/go-perun/client" - psync "perun.network/go-perun/pkg/sync" pwire "perun.network/go-perun/wire" + psync "polycry.pt/poly-go/sync" "github.com/pkg/errors" @@ -85,7 +85,7 @@ type ( Phase() pchannel.Phase State() *pchannel.State OnUpdate(cb func(from, to *pchannel.State)) - UpdateBy(ctx context.Context, update func(*pchannel.State) error) error + Update(ctx context.Context, update func(*pchannel.State)) error Settle(ctx context.Context, isSecondary bool) error Watch(pclient.AdjudicatorEventHandler) error } @@ -112,7 +112,8 @@ type ( // newCh initializes a channel instance using the passed pchannel (controller) // and other channel parameters. func newCh(pch PChannel, chainURL string, currencies []perun.Currency, parts []string, timeoutCfg timeoutConfig, - challengeDurSecs uint64) *Channel { + challengeDurSecs uint64, +) *Channel { ch := &Channel{ params: params{ id: fmt.Sprintf("%x", pch.ID()), @@ -301,13 +302,13 @@ func (ch *Channel) SendChUpdate(pctx context.Context, updater perun.StateUpdater }() if ch.status == closed { - apiErr = perun.NewAPIErrFailedPreCondition(ErrChClosed) + apiErr = perun.NewAPIErrFailedPreCondition(perun.ErrChClosed) return ch.getChInfo(), apiErr } ctx, cancel := context.WithTimeout(pctx, ch.timeoutCfg.chUpdate()) defer cancel() - err := ch.pch.UpdateBy(ctx, updater) + err := ch.pch.Update(ctx, updater) if err != nil { apiErr = ch.handleSendChUpdateError(errors.WithMessage(err, "sending channel update")) return perun.ChInfo{}, apiErr @@ -331,7 +332,8 @@ func (ch *Channel) handleSendChUpdateError(err error) perun.APIError { // centrazlied handler identifies the channel and then invokes this function to // process the update. func (ch *Channel) HandleUpdate( - currState *pchannel.State, chUpdate pclient.ChannelUpdate, responder ChUpdateResponder) { + currState *pchannel.State, chUpdate pclient.ChannelUpdate, responder ChUpdateResponder, +) { ch.Lock() defer ch.Unlock() @@ -370,7 +372,8 @@ func (ch *Channel) sendChUpdateNotif(notif perun.ChUpdateNotif) { } func (ch *Channel) makeChUpdateNotif( - currChInfo perun.ChInfo, proposedState *pchannel.State, expiry int64) perun.ChUpdateNotif { + currChInfo perun.ChInfo, proposedState *pchannel.State, expiry int64, +) perun.ChUpdateNotif { var chUpdateType perun.ChUpdateType switch proposedState.IsFinal { case true: @@ -411,13 +414,13 @@ func (ch *Channel) SubChUpdates(notifier perun.ChUpdateNotifier) perun.APIError defer ch.Unlock() if ch.status == closed { - apiErr := perun.NewAPIErrFailedPreCondition(ErrChClosed) + apiErr := perun.NewAPIErrFailedPreCondition(perun.ErrChClosed) ch.WithFields(perun.APIErrAsMap("SubChUpdates", apiErr)).Error(apiErr.Message()) return apiErr } if ch.chUpdateNotifier != nil { - apiErr := perun.NewAPIErrResourceExists(ResTypeUpdateSub, ch.ID()) + apiErr := perun.NewAPIErrResourceExists(perun.ResTypeUpdateSub, ch.ID()) ch.WithFields(perun.APIErrAsMap("SubChUpdates", apiErr)).Error(apiErr.Message()) return apiErr } @@ -442,13 +445,13 @@ func (ch *Channel) UnsubChUpdates() perun.APIError { defer ch.Unlock() if ch.status == closed { - apiErr := perun.NewAPIErrFailedPreCondition(ErrChClosed) + apiErr := perun.NewAPIErrFailedPreCondition(perun.ErrChClosed) ch.WithFields(perun.APIErrAsMap("UnsubChUpdates", apiErr)).Error(apiErr.Message()) return apiErr } if ch.chUpdateNotifier == nil { - apiErr := perun.NewAPIErrResourceNotFound(ResTypeUpdateSub, ch.ID()) + apiErr := perun.NewAPIErrResourceNotFound(perun.ResTypeUpdateSub, ch.ID()) ch.WithFields(perun.APIErrAsMap("UnsubChUpdates", apiErr)).Error(apiErr.Message()) return apiErr } @@ -470,7 +473,8 @@ func (ch *Channel) unsubChUpdates() { // - ErrUserResponseTimedOut when user responded after time out expired. // - ErrUnknownInternal. func (ch *Channel) RespondChUpdate(pctx context.Context, updateID string, accept bool) ( - perun.ChInfo, perun.APIError) { + perun.ChInfo, perun.APIError, +) { ch.WithField("method", "RespondChUpdate").Infof("\nReceived request with params %+v,%+v", updateID, accept) ch.Lock() defer ch.Unlock() @@ -483,13 +487,13 @@ func (ch *Channel) RespondChUpdate(pctx context.Context, updateID string, accept }() if ch.status == closed { - apiErr = perun.NewAPIErrFailedPreCondition(ErrChClosed) + apiErr = perun.NewAPIErrFailedPreCondition(perun.ErrChClosed) return ch.getChInfo(), apiErr } entry, ok := ch.chUpdateResponders[updateID] if !ok { - apiErr = perun.NewAPIErrResourceNotFound(ResTypeUpdate, updateID) + apiErr = perun.NewAPIErrResourceNotFound(perun.ResTypeUpdate, updateID) return ch.getChInfo(), apiErr } delete(ch.chUpdateResponders, updateID) @@ -637,7 +641,7 @@ func (ch *Channel) Close(pctx context.Context) (perun.ChInfo, perun.APIError) { }() if ch.status == closed { - apiErr = perun.NewAPIErrFailedPreCondition(ErrChClosed) + apiErr = perun.NewAPIErrFailedPreCondition(perun.ErrChClosed) return ch.getChInfo(), apiErr } @@ -662,13 +666,12 @@ func (ch *Channel) Close(pctx context.Context) (perun.ChInfo, perun.APIError) { // If this fails, calling Settle consequently will close the channel non-collaboratively, by registering // the state on-chain and waiting for challenge duration to expire. func (ch *Channel) finalize(pctx context.Context) { - chFinalizer := func(state *pchannel.State) error { + chFinalizer := func(state *pchannel.State) { state.IsFinal = true - return nil } ctx, cancel := context.WithTimeout(pctx, ch.timeoutCfg.chUpdate()) defer cancel() - err := ch.pch.UpdateBy(ctx, chFinalizer) + err := ch.pch.Update(ctx, chFinalizer) if err != nil { apiErr := ch.handleSendChUpdateError(err) ch.WithFields(perun.APIErrAsMap("ChClose", apiErr)).Error(apiErr.Message()) diff --git a/session/channel_test.go b/session/channel_test.go index a10d0f9e..9204c3a4 100644 --- a/session/channel_test.go +++ b/session/channel_test.go @@ -108,9 +108,7 @@ func Test_SendChUpdate(t *testing.T) { Bals: [][]string{{"1", "2"}}, } ourIdx := 0 - noopUpdater := func(s *pchannel.State) error { - return nil - } + noopUpdater := func(s *pchannel.State) {} t.Run("happy", func(t *testing.T) { pch, _ := newMockPCh() @@ -119,7 +117,7 @@ func Test_SendChUpdate(t *testing.T) { pch.On("Idx").Return(pchannel.Index(1)) pch.On("State").Return(makeState(t, validOpeningBalInfo, false)) - pch.On("UpdateBy", mock.Anything, mock.Anything).Return(nil) + pch.On("Update", mock.Anything, mock.Anything).Return(nil) gotChInfo, err := ch.SendChUpdate(context.Background(), noopUpdater) require.NoError(t, err) assert.NotZero(t, gotChInfo) @@ -133,12 +131,12 @@ func Test_SendChUpdate(t *testing.T) { _, err := ch.SendChUpdate(context.Background(), noopUpdater) - wantMessage := session.ErrChClosed.Error() + wantMessage := perun.ErrChClosed.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, wantMessage) assert.Nil(t, err.AddInfo()) }) - t.Run("UpdateBy_PeerRequestTimedOut", func(t *testing.T) { + t.Run("Update_PeerRequestTimedOut", func(t *testing.T) { timeout := responseTimeout.String() peerRequestTimedOutError := pclient.RequestTimedOutError("some-error") pch, _ := newMockPCh() @@ -147,14 +145,14 @@ func Test_SendChUpdate(t *testing.T) { pch.On("Idx").Return(pchannel.Index(ourIdx)) pch.On("State").Return(makeState(t, validOpeningBalInfo, false)) - pch.On("UpdateBy", mock.Anything, mock.Anything).Return(peerRequestTimedOutError) + pch.On("Update", mock.Anything, mock.Anything).Return(peerRequestTimedOutError) _, err := ch.SendChUpdate(context.Background(), noopUpdater) peruntest.AssertAPIError(t, err, perun.ParticipantError, perun.ErrPeerRequestTimedOut) peruntest.AssertErrInfoPeerRequestTimedOut(t, err.AddInfo(), peerAlias, timeout) }) - t.Run("UpdateBy_RejectedByPeer", func(t *testing.T) { + t.Run("Update_RejectedByPeer", func(t *testing.T) { reason := "some random reason" peerRejectedError := pclient.PeerRejectedError{ ItemType: "channel update", @@ -166,7 +164,7 @@ func Test_SendChUpdate(t *testing.T) { pch.On("Idx").Return(pchannel.Index(ourIdx)) pch.On("State").Return(makeState(t, validOpeningBalInfo, false)) - pch.On("UpdateBy", mock.Anything, mock.Anything).Return(peerRejectedError) + pch.On("Update", mock.Anything, mock.Anything).Return(peerRejectedError) _, err := ch.SendChUpdate(context.Background(), noopUpdater) peruntest.AssertAPIError(t, err, perun.ParticipantError, perun.ErrPeerRejected) @@ -221,7 +219,7 @@ func Test_SubUnsubChUpdate(t *testing.T) { require.Error(t, err) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceExists) - peruntest.AssertErrInfoResourceExists(t, err.AddInfo(), session.ResTypeUpdateSub, ch.ID()) + peruntest.AssertErrInfoResourceExists(t, err.AddInfo(), perun.ResTypeUpdateSub, ch.ID()) // SubTest 3: UnSub successfully == err = ch.UnsubChUpdates() @@ -232,14 +230,14 @@ func Test_SubUnsubChUpdate(t *testing.T) { require.Error(t, err) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceNotFound) - peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), session.ResTypeUpdateSub, ch.ID()) + peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), perun.ResTypeUpdateSub, ch.ID()) t.Run("Sub_channelClosed", func(t *testing.T) { ch := session.NewChForTest( pch, currency.ETHSymbol, validOpeningBalInfo.Parts, responseTimeout, challengeDurSecs, false) err = ch.SubChUpdates(dummyNotifier) - wantMessage := session.ErrChClosed.Error() + wantMessage := perun.ErrChClosed.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, wantMessage) assert.Nil(t, err.AddInfo()) }) @@ -248,7 +246,7 @@ func Test_SubUnsubChUpdate(t *testing.T) { pch, currency.ETHSymbol, validOpeningBalInfo.Parts, responseTimeout, challengeDurSecs, false) err = ch.UnsubChUpdates() - wantMessage := session.ErrChClosed.Error() + wantMessage := perun.ErrChClosed.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, wantMessage) assert.Nil(t, err.AddInfo()) }) @@ -269,7 +267,7 @@ func Test_HandleUpdate_Sub(t *testing.T) { nonFinalState := makeState(t, updatedBalInfo, false) finalState := makeState(t, updatedBalInfo, true) - t.Run("happy_HandleSub_nonFinal", func(t *testing.T) { //nolint: dupl + t.Run("happy_HandleSub_nonFinal", func(t *testing.T) { //nolint:dupl ch := session.NewChForTest( pch, currency.ETHSymbol, validOpeningBalInfo.Parts, responseTimeout, challengeDurSecs, true) @@ -293,7 +291,7 @@ func Test_HandleUpdate_Sub(t *testing.T) { assert.Eventually(t, notifRecieved, 2*time.Second, 100*time.Millisecond) }) - t.Run("happy_HandleSub_Final", func(t *testing.T) { //nolint: dupl + t.Run("happy_HandleSub_Final", func(t *testing.T) { //nolint:dupl ch := session.NewChForTest( pch, currency.ETHSymbol, validOpeningBalInfo.Parts, responseTimeout, challengeDurSecs, true) @@ -441,7 +439,7 @@ func Test_HandleUpdate_Respond(t *testing.T) { _, err := ch.RespondChUpdate(context.Background(), updateID, true) - wantMessage := session.ErrChClosed.Error() + wantMessage := perun.ErrChClosed.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, wantMessage) assert.Nil(t, err.AddInfo()) }) @@ -460,7 +458,7 @@ func Test_HandleUpdate_Respond(t *testing.T) { _, err := ch.RespondChUpdate(context.Background(), unknownUpdateID, true) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceNotFound) - peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), session.ResTypeUpdate, unknownUpdateID) + peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), perun.ResTypeUpdate, unknownUpdateID) }) t.Run("response_timeout_expired", func(t *testing.T) { @@ -594,7 +592,7 @@ func Test_HandleUpdate_Respond(t *testing.T) { }) } -// nolint: unparam +//nolint:unparam func assertNotif(t *testing.T, notifs []perun.ChUpdateNotif, wantVersion uint64, wantExpiry int64) { t.Helper() require.Len(t, notifs, 1) @@ -623,7 +621,7 @@ func Test_Close(t *testing.T) { var finalizer perun.StateUpdater pch.On("Idx").Return(pchannel.Index(peerIdx)) pch.On("State").Return(finalizedState) - pch.On("UpdateBy", mock.Anything, mock.MatchedBy(func(gotFinalizer perun.StateUpdater) bool { + pch.On("Update", mock.Anything, mock.MatchedBy(func(gotFinalizer perun.StateUpdater) bool { finalizer = gotFinalizer return true })).Return(nil) @@ -644,9 +642,9 @@ func Test_Close(t *testing.T) { require.NoError(t, err) assert.NotZero(t, gotChInfo) - // == Part 2: Check if finalizer sent to UpdateBy marks the channel as final. + // == Part 2: Check if finalizer sent to Update marks the channel as final. emptyState := pchannel.State{} - assert.NoError(t, finalizer(&emptyState)) + finalizer(&emptyState) assert.True(t, emptyState.IsFinal) // == Part 3: Check if notification was received with correct values. @@ -695,7 +693,7 @@ func Test_Close(t *testing.T) { // Setup channel mock pch.On("Idx").Return(pchannel.Index(peerIdx)) pch.On("State").Return(state) - pch.On("UpdateBy", mock.Anything, mock.Anything).Return(assert.AnError) + pch.On("Update", mock.Anything, mock.Anything).Return(assert.AnError) pch.On("Settle", mock.Anything, mock.Anything).Return(nil) pch.On("Close").Return(nil).Run(func(args mock.Arguments) { watcherSignal <- time.Now() // Signal the watcher to return when pch is closed. @@ -763,7 +761,7 @@ func Test_Close(t *testing.T) { pch.On("Idx").Return(pchannel.Index(peerIdx)) pch.On("State").Return(makeState(t, validOpeningBalInfo, false)) - pch.On("UpdateBy", mock.Anything, mock.Anything).Return(nil) + pch.On("Update", mock.Anything, mock.Anything).Return(nil) pch.On("Settle", mock.Anything, mock.Anything).Return(assert.AnError) pch.On("Close").Return(nil).Run(func(args mock.Arguments) { watcherSignal <- time.Now() // Signal the watcher to return when pch is closed. @@ -785,7 +783,7 @@ func Test_Close(t *testing.T) { pch.On("Idx").Return(pchannel.Index(peerIdx)) pch.On("State").Return(makeState(t, validOpeningBalInfo, false)) - pch.On("UpdateBy", mock.Anything, mock.Anything).Return(nil) + pch.On("Update", mock.Anything, mock.Anything).Return(nil) pch.On("Settle", mock.Anything, mock.Anything).Return(txTimedOutError) pch.On("Close").Return(nil).Run(func(args mock.Arguments) { watcherSignal <- time.Now() // Signal the watcher to return when pch is closed. @@ -809,7 +807,7 @@ func Test_Close(t *testing.T) { pch.On("Idx").Return(pchannel.Index(peerIdx)) pch.On("State").Return(makeState(t, validOpeningBalInfo, false)) - pch.On("UpdateBy", mock.Anything, mock.Anything).Return(nil) + pch.On("Update", mock.Anything, mock.Anything).Return(nil) pch.On("Settle", mock.Anything, mock.Anything).Return(chainNotReachableError) pch.On("Close").Return(nil).Run(func(args mock.Arguments) { watcherSignal <- time.Now() // Signal the watcher to return when pch is closed. @@ -934,7 +932,7 @@ func Test_Close(t *testing.T) { _, err := ch.Close(context.Background()) require.Error(t, err) - wantMessage := session.ErrChClosed.Error() + wantMessage := perun.ErrChClosed.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, wantMessage) assert.Nil(t, err.AddInfo()) }) diff --git a/session/client.go b/session/client.go index e26bbd1c..65be72b2 100644 --- a/session/client.go +++ b/session/client.go @@ -27,10 +27,11 @@ import ( pkeyvalue "perun.network/go-perun/channel/persistence/keyvalue" pclient "perun.network/go-perun/client" plog "perun.network/go-perun/log" - pleveldb "perun.network/go-perun/pkg/sortedkv/leveldb" - "perun.network/go-perun/watcher/local" + pwatcher "perun.network/go-perun/watcher" pwire "perun.network/go-perun/wire" pnet "perun.network/go-perun/wire/net" + pperunioserializer "perun.network/go-perun/wire/perunio/serializer" + pleveldb "polycry.pt/poly-go/sortedkv/leveldb" "github.com/hyperledger-labs/perun-node" ) @@ -128,26 +129,22 @@ func (c *pclientWrapped) OnNewChannel(handler func(PChannel)) { }) } -// newEthereumPaymentClient initializes a two party, ethereum payment channel client for the given user. +// newChClient initializes a two party, payment channel client for the given user. // It establishes a connection to the blockchain and verifies the integrity of contracts at the given address. // It uses the comm backend to initialize adapters for off-chain communication network. -func newEthereumPaymentClient( - funder pchannel.Funder, adjudicator pchannel.Adjudicator, +func newChClient( + funder pchannel.Funder, adjudicator pchannel.Adjudicator, watcher pwatcher.Watcher, comm perun.CommBackend, commAddr string, offChainCred perun.Credential) ( - ChClient, perun.APIError) { + ChClient, perun.APIError, +) { offChainAcc, err := offChainCred.Wallet.Unlock(offChainCred.Addr) if err != nil { return nil, perun.NewAPIErrUnknownInternal(errors.WithMessage(err, "unlocking off-chain account")) } dialer := comm.NewDialer() - msgBus := pnet.NewBus(offChainAcc, dialer) - - watcher, err := local.NewWatcher(adjudicator) - if err != nil { - return nil, perun.NewAPIErrUnknownInternal(errors.WithMessage(err, "initializing watcher")) - } + msgBus := pnet.NewBus(offChainAcc, dialer, pperunioserializer.Serializer()) pcClient, err := pclient.New(offChainAcc.Address(), msgBus, funder, adjudicator, offChainCred.Wallet, watcher) if err != nil { diff --git a/session/config.go b/session/config.go index cc9b1576..be73bccf 100644 --- a/session/config.go +++ b/session/config.go @@ -43,10 +43,24 @@ type ( // previous running instance of the node. PeerReconnTimeout time.Duration + FundingType string // Can take two values: local, remote + + // If funding type is local, these two parameters are needed. + // // Address of the valid AssetETH and Adjudicator contracts. // These values are set by the node and will not parsed from the user // provided configuration. AssetETH, Adjudicator pwire.Address `yaml:"-"` + + // If funding type is remote, these two parameters are needed. + FundingURL string + FundingAPIKey string + + WatcherType string // Can take two values: local, grpc + + // If watcher type is grpc, these two parameters are needed. + WatcherURL string + WatcherAPIKey string } // UserConfig defines the parameters required to configure a user. diff --git a/session/export_test.go b/session/export_test.go index ff4b225a..cb26dd8c 100644 --- a/session/export_test.go +++ b/session/export_test.go @@ -36,7 +36,8 @@ func SetWalletBackend(wb perun.WalletBackend) { } func NewClientForTest(pClient pClient, - bus perun.WireBus, msgBusRegistry perun.Registerer, dbConn Closer) ChClient { + bus perun.WireBus, msgBusRegistry perun.Registerer, dbConn Closer, +) ChClient { return &client{ pClient: pClient, msgBus: bus, @@ -46,7 +47,8 @@ func NewClientForTest(pClient pClient, } func NewSessionForTest(cfg Config, isOpen bool, chClient ChClient, chainSetup *ethereumtest.ChainBackendSetup) ( - *Session, error) { + *Session, error, +) { _ = chainSetup user, apiErr := NewUnlockedUser(walletBackend, cfg.User) if apiErr != nil { @@ -58,7 +60,11 @@ func NewSessionForTest(cfg Config, isOpen bool, chClient ChClient, chainSetup *e return nil, apiErr } - sessionID := calcSessionID(user.OffChainAddr.Bytes()) + offChainAddr, err := user.OffChainAddr.MarshalBinary() + if err != nil { + return nil, perun.NewAPIErrUnknownInternal(errors.WithMessage(err, "off-chain address")) + } + sessionID := calcSessionID(offChainAddr) timeoutCfg := timeoutConfig{ onChainTx: cfg.OnChainTxTimeout, response: cfg.ResponseTimeout, @@ -70,6 +76,7 @@ func NewSessionForTest(cfg Config, isOpen bool, chClient ChClient, chainSetup *e } funder := chainSetup.ChainBackend.NewFunder(contracts.AssetETH(), user.OnChain.Addr) + adjudicator := chainSetup.ChainBackend.NewAdjudicator(cfg.Adjudicator, user.OnChain.Addr) return &Session{ Logger: log.NewLoggerWithField("session-id", sessionID), @@ -82,6 +89,7 @@ func NewSessionForTest(cfg Config, isOpen bool, chClient ChClient, chainSetup *e idProvider: idProvider, chain: chainSetup.ChainBackend, funder: funder, + adjudicator: adjudicator, chs: newChRegistry(initialChRegistrySize), contractRegistry: contracts, currencyRegistry: currencytest.Registry(), @@ -90,7 +98,8 @@ func NewSessionForTest(cfg Config, isOpen bool, chClient ChClient, chainSetup *e } func NewChForTest(pch PChannel, - currencySymbol string, parts []string, responseTimeout time.Duration, challengeDurSecs uint64, isOpen bool) *Channel { + currencySymbol string, parts []string, responseTimeout time.Duration, challengeDurSecs uint64, isOpen bool, +) *Channel { chainURL := ethereumtest.ChainURL onChainTxTimeout := ethereumtest.OnChainTxTimeout timeoutCfg := timeoutConfig{ @@ -110,7 +119,8 @@ func NewChForTest(pch PChannel, func MakeAllocation(openingBalInfo perun.BalInfo, contractRegistry perun.ROContractRegistry, currencyRegistry perun.ROCurrencyRegistry) ( - *pchannel.Allocation, error) { + *pchannel.Allocation, error, +) { _, allocation, err := makeAllocation(openingBalInfo, contractRegistry, currencyRegistry) return allocation, err } diff --git a/session/funding.go b/session/funding.go new file mode 100644 index 00000000..610f93b3 --- /dev/null +++ b/session/funding.go @@ -0,0 +1,179 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package session + +import ( + "context" + + pchannel "perun.network/go-perun/channel" + pwallet "perun.network/go-perun/wallet" + + "github.com/hyperledger-labs/perun-node" +) + +// Fund provides a wrapper to call the fund method on session. +// On-chain wallet can be direcly used without additional locks, +// because the methods on wallet are concurrency safe by themselves. +func (s *Session) Fund(ctx context.Context, req pchannel.FundingReq) error { + err := s.funder.Fund(ctx, req) + if err == nil { + s.user.OnChain.Wallet.IncrementUsage(s.user.OnChain.Addr) + } + return err +} + +// RegisterAssetERC20 is a stub that always returns false. Because, the remote +// funder does not support use of assets other than the default ERC20 asset. +// +// TODO: Make actual implementation. +func (s *Session) RegisterAssetERC20(asset pchannel.Asset, token, acc pwallet.Address) bool { + s.WithField("method", "RegisterAssetERC20"). + Infof("\nReceived request with params %+v, %+v, %+v", asset, token, acc) + s.WithField("method", "RegisterAssetERC20").Infof("Unimplemented method. Hence returning false") + return false +} + +// IsAssetRegistered provides a wrapper to call the IsAssetRegistered method +// on session funder. +func (s *Session) IsAssetRegistered(asset pchannel.Asset) bool { + s.WithField("method", "IsAssetRegistered").Infof("\nReceived request with params %+v", asset) + isAssetRegistered := s.funder.IsAssetRegistered(asset) + s.WithField("method", "IsAssetRegistered").Infof("Response: %v", isAssetRegistered) + return isAssetRegistered +} + +// Register provides a wrapper to call the register method on session. +// On-chain wallet can be direcly used without additional locks, +// because the methods on wallet are concurrency safe by themselves. +func (s *Session) Register( + ctx context.Context, + adjReq perun.AdjudicatorReq, + signedStates []pchannel.SignedState, +) perun.APIError { + s.Infof("\ncar: register request for channel with charger, balance: %+v", adjReq.Tx.Balances) + // s.WithField("method", "Register").Infof("\nReceived request with params %+v, %+v", adjReq, signedStates) + + pAdjReq, err := toPChannelAdjudicatorReq(adjReq, s.user.OffChain.Wallet) + if err != nil { + apiErr := perun.NewAPIErrUnknownInternal(err) + s.WithFields(perun.APIErrAsMap("Register", apiErr)).Error(apiErr.Message()) + return apiErr + } + + err = s.adjudicator.Register(ctx, pAdjReq, signedStates) + if err != nil { + apiErr := perun.NewAPIErrUnknownInternal(err) + s.WithFields(perun.APIErrAsMap("Register", apiErr)).Error(apiErr.Message()) + return apiErr + } + s.WithField("method", "Register").Infof("Registered successfully: %+v ", adjReq.Params.ID()) + s.Infof("\nregistered successfully") + return nil +} + +// Withdraw provides a wrapper to call the withdraw method on session. +// On-chain wallet can be direcly used without additional locks, +// because the methods on wallet are concurrency safe by themselves. +func (s *Session) Withdraw( + ctx context.Context, + adjReq perun.AdjudicatorReq, + stateMap pchannel.StateMap, +) perun.APIError { + s.Infof("\ncar: withdraw request for channel with charger, balance: %+v", adjReq.Tx.Balances) + // s.WithField("method", "Withdraw").Infof("\nReceived request with params %+v, %+v", adjReq, stateMap) + + pAdjReq, err := toPChannelAdjudicatorReq(adjReq, s.user.OffChain.Wallet) + if err != nil { + apiErr := perun.NewAPIErrUnknownInternal(err) + s.WithFields(perun.APIErrAsMap("Withdraw", apiErr)).Error(apiErr.Message()) + return apiErr + } + + err = s.adjudicator.Withdraw(ctx, pAdjReq, stateMap) + if err != nil { + apiErr := perun.NewAPIErrUnknownInternal(err) + s.WithFields(perun.APIErrAsMap("Withdraw", apiErr)).Error(apiErr.Message()) + return apiErr + } + s.user.OnChain.Wallet.DecrementUsage(s.user.OnChain.Addr) + // s.WithField("method", "Withdraw").Infof("Withdrawn successfully: %+v ", adjReq.Params.ID()) + s.Infof("\nwithdrawn successfully") + return nil +} + +// Progress provides a wrapper to call the progress method on session. +// On-chain wallet can be direcly used without additional locks, +// because the methods on wallet are concurrency safe by themselves. +func (s *Session) Progress(ctx context.Context, progReq perun.ProgressReq) perun.APIError { + s.WithField("method", "Progress").Infof("\nReceived request with params %+v", progReq) + + pProgReq, err := toPChannelProgressReq(progReq, s.user.OffChain.Wallet) + if err != nil { + apiErr := perun.NewAPIErrUnknownInternal(err) + s.WithFields(perun.APIErrAsMap("Progress", apiErr)).Error(apiErr.Message()) + return apiErr + } + + err = s.adjudicator.Progress(ctx, pProgReq) + if err != nil { + apiErr := perun.NewAPIErrUnknownInternal(err) + s.WithFields(perun.APIErrAsMap("Progress", apiErr)).Error(apiErr.Message()) + return apiErr + } + s.WithField("method", "Progress").Infof("Progressed successfully: %+v ", progReq.Params.ID()) + return nil +} + +// Subscribe provides a wrapper to call the subscribe method on session. +func (s *Session) Subscribe( + ctx context.Context, + chID pchannel.ID, +) (pchannel.AdjudicatorSubscription, perun.APIError) { + s.Infof("\ncar: subscribe request for channel with charger") + // s.WithField("method", "Subscribe").Infof("\nReceived request with params %+v", chID) + + adjSub, err := s.adjudicator.Subscribe(ctx, chID) + if err != nil { + apiErr := perun.NewAPIErrUnknownInternal(err) + s.WithFields(perun.APIErrAsMap("Progress", apiErr)).Error(apiErr.Message()) + return nil, apiErr + } + s.Infof("\nsubscribed successfully") + return adjSub, nil +} + +func toPChannelAdjudicatorReq(in perun.AdjudicatorReq, w pwallet.Wallet) (out pchannel.AdjudicatorReq, err error) { + out.Acc, err = w.Unlock(in.Acc) + if err != nil { + return out, err + } + out.Params = in.Params + out.Tx = in.Tx + out.Idx = in.Idx + out.Secondary = in.Secondary + return out, nil +} + +func toPChannelProgressReq(in perun.ProgressReq, w pwallet.Wallet) (out pchannel.ProgressReq, err error) { + out.AdjudicatorReq, err = toPChannelAdjudicatorReq(in.AdjudicatorReq, w) + if err != nil { + return out, err + } + out.NewState = in.NewState + out.Sig = in.Sig + return out, nil +} diff --git a/session/fundingClient.go b/session/fundingClient.go new file mode 100644 index 00000000..56add401 --- /dev/null +++ b/session/fundingClient.go @@ -0,0 +1,315 @@ +// Copyright (c) 2023 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package session + +import ( + "context" + "fmt" + "sync" + + "github.com/pkg/errors" + + pchannel "perun.network/go-perun/channel" + pwallet "perun.network/go-perun/wallet" + + "github.com/hyperledger-labs/perun-node" + "github.com/hyperledger-labs/perun-node/api/grpc/pb" +) + +type grpcFunder struct { + apiKey string + client pb.Funding_APIClient +} + +func (f *grpcFunder) Fund(_ context.Context, fundingReq pchannel.FundingReq) error { + protoReq, err := pb.FromFundingReq(fundingReq) + if err != nil { + err = errors.WithMessage(err, "constructing grpc funding request") + return perun.NewAPIErrUnknownInternal(err) + } + protoReq.SessionID = f.apiKey + resp, err := f.client.Fund(context.Background(), protoReq) + if err != nil { + err = errors.WithMessage(err, "sending the funding request") + return perun.NewAPIErrUnknownInternal(err) + } + if resp.Error != nil && resp.Error.Message != "" { + // TODO: Proper error handling + err = errors.Errorf("funding the channel: %s", resp.Error.Message) + return perun.NewAPIErrUnknownInternal(err) + } + return nil +} + +func (f *grpcFunder) RegisterAssetERC20(asset pchannel.Asset, token, acc pwallet.Address) bool { + protoAsset, err := asset.MarshalBinary() + if err != nil { + return false + } + protoToken, err := token.MarshalBinary() + if err != nil { + return false + } + protoAcc, err := acc.MarshalBinary() + if err != nil { + return false + } + registerAssetERC20Req := &pb.RegisterAssetERC20Req{ + SessionID: f.apiKey, + Asset: protoAsset, + TokenAddr: fmt.Sprintf("%x", protoToken), + DeposiorAcc: fmt.Sprintf("%x", protoAcc), + } + + resp, err := f.client.RegisterAssetERC20(context.Background(), registerAssetERC20Req) + if err != nil { + return false + } + + return resp.MsgSuccess +} + +func (f *grpcFunder) IsAssetRegistered(asset pchannel.Asset) bool { + protoAsset, err := asset.MarshalBinary() + if err != nil { + return false + } + isAssetRegisteredReq := &pb.IsAssetRegisteredReq{ + SessionID: f.apiKey, + Asset: protoAsset, + } + + resp, err := f.client.IsAssetRegistered(context.Background(), isAssetRegisteredReq) + if err != nil { + return false + } + + _, ok := resp.Response.(*pb.IsAssetRegisteredResp_Error) + if ok { + // TODO: Proper error handling and return it. + return false + } + return resp.Response.(*pb.IsAssetRegisteredResp_MsgSuccess_).MsgSuccess.IsRegistered +} + +type grpcAdjudicator struct { + apiKey string + client pb.Funding_APIClient +} + +func (a *grpcAdjudicator) Register( + _ context.Context, + adjReq pchannel.AdjudicatorReq, + signedStates []pchannel.SignedState, +) (err error) { + protoReq := pb.RegisterReq{} + protoReq.AdjReq, err = pb.FromAdjReq(adjReq) + if err != nil { + err = errors.WithMessage(err, "parsing grpc adjudicator request") + return perun.NewAPIErrUnknownInternal(err) + } + protoReq.SignedStates = make([]*pb.SignedState, len(signedStates)) + for i := range signedStates { + protoReq.SignedStates[i], err = pb.FromSignedState(&signedStates[i]) + if err != nil { + err = errors.WithMessagef(err, "parsing %d'th signed state", i) + return perun.NewAPIErrUnknownInternal(err) + } + } + protoReq.SessionID = a.apiKey + + resp, err := a.client.Register(context.Background(), &protoReq) + if err != nil { + err = errors.WithMessage(err, "sending the funding request") + return perun.NewAPIErrUnknownInternal(err) + } + if resp.Error != nil && resp.Error.Message != "" { + // TODO: Proper error handling + err = errors.WithMessage(pb.ToError(resp.Error), "registering the channel the channel") + return perun.NewAPIErrUnknownInternal(err) + } + return nil +} + +func (a *grpcAdjudicator) Withdraw( + _ context.Context, + adjReq pchannel.AdjudicatorReq, + stateMap pchannel.StateMap, +) (err error) { + protoReq := pb.WithdrawReq{} + protoReq.AdjReq, err = pb.FromAdjReq(adjReq) + if err != nil { + err = errors.WithMessage(err, "parsing grpc adjudicator request") + return perun.NewAPIErrUnknownInternal(err) + } + protoReq.StateMap, err = pb.FromStateMap(stateMap) + if err != nil { + err = errors.WithMessage(err, "parsing grpc adjudicator request") + return perun.NewAPIErrUnknownInternal(err) + } + protoReq.SessionID = a.apiKey + + resp, err := a.client.Withdraw(context.Background(), &protoReq) + if err != nil { + err = errors.WithMessage(err, "sending the funding request") + return perun.NewAPIErrUnknownInternal(err) + } + if resp.Error != nil && resp.Error.Message != "" { + // TODO: Proper error handling + err = errors.WithMessage(pb.ToError(resp.Error), "withdrawing the channel the channel") + return perun.NewAPIErrUnknownInternal(err) + } + return nil +} + +func (a *grpcAdjudicator) Progress( + _ context.Context, + progReq pchannel.ProgressReq, +) (err error) { + protoReq := pb.ProgressReq{} + protoReq.AdjReq, err = pb.FromAdjReq(progReq.AdjudicatorReq) + if err != nil { + err = errors.WithMessage(err, "parsing grpc adjudicator request") + return perun.NewAPIErrUnknownInternal(err) + } + protoReq.NewState, err = pb.FromState(progReq.NewState) + if err != nil { + err = errors.WithMessage(err, "parsing grpc adjudicator request") + return perun.NewAPIErrUnknownInternal(err) + } + protoReq.Sig = progReq.Sig + protoReq.SessionID = a.apiKey + + resp, err := a.client.Progress(context.Background(), &protoReq) + if err != nil { + err = errors.WithMessage(err, "sending the funding request") + return perun.NewAPIErrUnknownInternal(err) + } + if resp.Error != nil && resp.Error.Message != "" { + // TODO: Proper error handling + err = errors.WithMessage(pb.ToError(resp.Error), "progressing the channel the channel") + return perun.NewAPIErrUnknownInternal(err) + } + return nil +} + +func (a *grpcAdjudicator) Subscribe( + ctx context.Context, + chID pchannel.ID, +) (pchannel.AdjudicatorSubscription, error) { + adjSubReq := &pb.SubscribeReq{ + SessionID: a.apiKey, + ChID: chID[:], + } + stream, err := a.client.Subscribe(ctx, adjSubReq) + if err != nil { + return nil, err + } + adjSubRelay := newAdjudicatorEventsSub(chID, a) + func() { + subscribeResp, err := stream.Recv() + if err != nil { + return + } + adjEvent, err := pb.SubscribeResponseToAdjEvent(subscribeResp) + if err != nil { + return + } + adjSubRelay.publish(adjEvent) + }() + return adjSubRelay, nil +} + +const adjEventsSubBufferSize = 10 + +var _ pchannel.AdjudicatorSubscription = &adjudicatorSub{} + +type ( + adjudicatorSub struct { + isOpen bool + once sync.Mutex + + pipe chan pchannel.AdjudicatorEvent + chID pchannel.ID + grpcAdj *grpcAdjudicator + } +) + +func newAdjudicatorEventsSub(chID pchannel.ID, grpcAdj *grpcAdjudicator) *adjudicatorSub { + return &adjudicatorSub{ + isOpen: true, + pipe: make(chan pchannel.AdjudicatorEvent, adjEventsSubBufferSize), + chID: chID, + grpcAdj: grpcAdj, + } +} + +// publish publishes the given adjudicator event to the subscriber. +// +// Panics if the pub-sub instance is already closed. It is implemented this +// way, because +// 1. The watcher will publish on this pub-sub only when it receives an +// adjudicator event from the blockchain. +// 2. When de-registering a channel from the watcher, watcher will close the +// subscription for adjudicator events from blockchain, before closing this +// pub-sub. +// 3. This way, it can be guaranteed that, this method will never be called +// after the pub-sub instance is closed. +func (a *adjudicatorSub) publish(e pchannel.AdjudicatorEvent) { + a.once.Lock() + a.pipe <- e + a.once.Unlock() +} + +// close closes the publisher instance and the associated subscription. Any +// further call to publish, after a pub-sub is closed will panic. +func (a *adjudicatorSub) Close() error { + a.once.Lock() + defer a.once.Unlock() + + unsubReq := &pb.UnsubscribeReq{ + SessionID: a.grpcAdj.apiKey, + ChID: a.chID[:], + } + unSubResp, err := a.grpcAdj.client.Unsubscribe(context.Background(), unsubReq) + if err != nil { + return errors.Wrap(err, "sending unsubscribe request") + } + if unSubResp.Error != nil && unSubResp.Error.Message != "" { + // TODO: Proper error handling + err = errors.WithMessage(pb.ToError(unSubResp.Error), "unsubscribing from responses") + return perun.NewAPIErrUnknownInternal(err) + } + + return err +} + +// EventStream returns a channel for consuming the published adjudicator +// events. It always returns the same channel and does not support +// multiplexing. +// +// The channel will be closed when the pub-sub instance is closed and Err +// should tell the possible error. +func (a *adjudicatorSub) Next() pchannel.AdjudicatorEvent { + return <-a.pipe +} + +// Err always returns nil. Because, there will be no errors when closing a +// local subscription. +func (a *adjudicatorSub) Err() error { + return nil // Getting an error is not implemented. +} diff --git a/session/role_integ_test.go b/session/role_integ_test.go index b27b4680..ac3377c1 100644 --- a/session/role_integ_test.go +++ b/session/role_integ_test.go @@ -221,12 +221,11 @@ func Test_Integ_Role(t *testing.T) { peerIdx = ownIdx ^ 1 amountToSend := decimal.NewFromFloat(0.5e18).BigInt() - updater := func(state *pchannel.State) error { + updater := func(state *pchannel.State) { bals := state.Allocation.Clone().Balances[0] bals[ownIdx].Sub(bals[ownIdx], amountToSend) bals[peerIdx].Add(bals[peerIdx], amountToSend) state.Allocation.Balances[0] = bals - return nil } _, err := bobChs[0].SendChUpdate(ctx, updater) @@ -266,12 +265,11 @@ func Test_Integ_Role(t *testing.T) { peerIdx = ownIdx ^ 1 amountToSend := decimal.NewFromFloat(0.5e18).BigInt() - updater := func(state *pchannel.State) error { + updater := func(state *pchannel.State) { bals := state.Allocation.Clone().Balances[0] bals[ownIdx].Sub(bals[ownIdx], amountToSend) bals[peerIdx].Add(bals[peerIdx], amountToSend) state.Allocation.Balances[0] = bals - return nil } _, err := aliceChs[0].SendChUpdate(ctx, updater) diff --git a/session/session.go b/session/session.go index 5f83116b..65f15185 100644 --- a/session/session.go +++ b/session/session.go @@ -25,16 +25,22 @@ import ( "time" "github.com/pkg/errors" + grpclib "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" pchannel "perun.network/go-perun/channel" pclient "perun.network/go-perun/client" - psync "perun.network/go-perun/pkg/sync" pwallet "perun.network/go-perun/wallet" + pwatcher "perun.network/go-perun/watcher" + plocal "perun.network/go-perun/watcher/local" pwire "perun.network/go-perun/wire" + psync "polycry.pt/poly-go/sync" "github.com/hyperledger-labs/perun-node" + "github.com/hyperledger-labs/perun-node/api/grpc/pb" "github.com/hyperledger-labs/perun-node/blockchain/ethereum" "github.com/hyperledger-labs/perun-node/comm/tcp" "github.com/hyperledger-labs/perun-node/comm/tcp/tcptest" + "github.com/hyperledger-labs/perun-node/currency" "github.com/hyperledger-labs/perun-node/idprovider" "github.com/hyperledger-labs/perun-node/idprovider/local" "github.com/hyperledger-labs/perun-node/log" @@ -55,51 +61,6 @@ func init() { walletBackend = ethereum.NewWalletBackend() } -// Error type is used to define error constants for this package. -type Error string - -// Error implements error interface. -func (e Error) Error() string { - return string(e) -} - -// Definition of error constants for this package. -const ( - // For failed pre-condition. - ErrChClosed Error = "action not allowed on a closed channel" - ErrSessionClosed Error = "action not allowed on a closed session" - - // For invalid config. - ErrUnsupportedType Error = "type not supported, see node config for supported types" - ErrRepeatedPeerAlias Error = "found repeated entries but each value should be unique" - ErrEntryForSelfNotFound Error = "own peer alias (self) not found" -) - -// Enumeration of valid resource types for used in ResourceNotFound and -// ResourceExists errors. -const ( - ResTypeUpdate perun.ResourceType = "update" - ResTypeUpdateSub perun.ResourceType = "updatesSub" - ResTypeChannel perun.ResourceType = "channel" - ResTypeProposal perun.ResourceType = "proposal" - ResTypeProposalSub perun.ResourceType = "proposalsSub" - ResTypePeerID perun.ResourceType = "peerID" - ResTypeSession perun.ResourceType = "session" - ResTypeCurrency perun.ResourceType = "currency" -) - -// Enumeration of valid argument names for using in InvalidArgument error. -const ( - ArgNameAmount perun.ArgumentName = "amount" - ArgNameCurrency perun.ArgumentName = "currency" - ArgNamePeerAlias perun.ArgumentName = "peerAlias" - ArgNameOffChainAddr perun.ArgumentName = "offChainAddress" - ArgNameConfigFile perun.ArgumentName = "configFile" - ArgNamePayee perun.ArgumentName = "payee" - ArgNameToken perun.ArgumentName = "token" - ArgNameAsset perun.ArgumentName = "asset" -) - type ( // Session provides a context for the user to interact with a node. It manages // user data (such as keys, peer IDs), and channel client. @@ -119,8 +80,10 @@ type ( timeoutCfg timeoutConfig chainURL string // used for annotating error messages. - chain perun.ChainBackend - funder perun.Funder + chain perun.ChainBackend + funder perun.Funder + adjudicator pchannel.Adjudicator + watcher pwatcher.Watcher chs *chRegistry contractRegistry perun.ContractRegistry @@ -132,7 +95,7 @@ type ( } chProposalResponderEntry struct { - proposal pclient.LedgerChannelProposal + proposal pclient.LedgerChannelProposalMsg notif perun.ChProposalNotif responder ChProposalResponder currencies []perun.Currency @@ -140,7 +103,7 @@ type ( // ChProposalResponder defines the methods on proposal responder that will be used by the perun node. ChProposalResponder interface { - Accept(context.Context, *pclient.LedgerChannelProposalAcc) (PChannel, error) + Accept(context.Context, *pclient.LedgerChannelProposalAccMsg) (PChannel, error) Reject(ctx context.Context, reason string) error } ) @@ -154,23 +117,28 @@ type chProposalResponderWrapped struct { } // Accept is a wrapper around the original function, that returns a channel of interface type instead of struct type. -func (r *chProposalResponderWrapped) Accept(ctx context.Context, proposalAcc *pclient.LedgerChannelProposalAcc) ( - PChannel, error) { +func (r *chProposalResponderWrapped) Accept(ctx context.Context, proposalAcc *pclient.LedgerChannelProposalAccMsg) ( + PChannel, error, +) { return r.ProposalResponder.Accept(ctx, proposalAcc) } // New initializes a SessionAPI instance for the given configuration, read-only // currency registry and returns an instance of it. All methods on it are safe // for concurrent use. -func New(cfg Config, currencyRegistry perun.ROCurrencyRegistry, contractRegistry perun.ContractRegistry) ( - *Session, perun.APIError) { +func New( //nolint: funlen + cfg Config, + currencyRegistry perun.ROCurrencyRegistry, + contractRegistry perun.ContractRegistry) ( + *Session, perun.APIError, +) { user, apiErr := NewUnlockedUser(walletBackend, cfg.User) if apiErr != nil { return nil, apiErr } if cfg.User.CommType != "tcp" { - return nil, perun.NewAPIErrInvalidConfig(ErrUnsupportedType, "commType", cfg.User.CommType) + return nil, perun.NewAPIErrInvalidConfig(perun.ErrUnsupportedType, "commType", cfg.User.CommType) } commBackend := tcp.NewTCPBackend(tcptest.DialerTimeout) idProvider, apiErr := initIDProvider(cfg.IDProviderType, cfg.IDProviderURL, walletBackend, user.PeerID) @@ -185,19 +153,64 @@ func New(cfg Config, currencyRegistry perun.ROCurrencyRegistry, contractRegistry return nil, perun.NewAPIErrInvalidConfig(err, "chainURL", cfg.ChainURL) } - funder := chain.NewFunder(contractRegistry.AssetETH(), user.OnChain.Addr) - adjudicator := chain.NewAdjudicator(cfg.Adjudicator, user.OnChain.Addr) + var funder perun.Funder + var adjudicator pchannel.Adjudicator + switch cfg.FundingType { + case "local": + funder = chain.NewFunder(contractRegistry.AssetETH(), user.OnChain.Addr) + adjudicator = chain.NewAdjudicator(cfg.Adjudicator, user.OnChain.Addr) + case "remote": + conn, grpcErr := grpclib.Dial(cfg.FundingURL, grpclib.WithTransportCredentials(insecure.NewCredentials())) + if grpcErr != nil { + grpcErr = errors.WithMessage(grpcErr, "connecting to funding api") + return nil, perun.NewAPIErrUnknownInternal(grpcErr) + } + funderClient := pb.NewFunding_APIClient(conn) + funder = &grpcFunder{ + apiKey: cfg.FundingAPIKey, + client: funderClient, + } + adjudicator = &grpcAdjudicator{ + apiKey: cfg.FundingAPIKey, + client: funderClient, + } + + default: + err = errors.New("should be local or remote") + return nil, perun.NewAPIErrInvalidConfig(err, "fundingType", cfg.FundingAPIKey) + } + + var watcher pwatcher.Watcher + switch cfg.WatcherType { + case "local": + watcher, err = plocal.NewWatcher(adjudicator) + if err != nil { + return nil, perun.NewAPIErrUnknownInternal(errors.WithMessage(err, "initializing watcher")) + } + case "grpc": + conn, grpcErr := grpclib.Dial(cfg.WatcherURL, grpclib.WithTransportCredentials(insecure.NewCredentials())) + if grpcErr != nil { + grpcErr = errors.WithMessage(grpcErr, "connecting to watching api") + return nil, perun.NewAPIErrUnknownInternal(grpcErr) + } + watcherClient := pb.NewWatching_APIClient(conn) + watcher = &grpcWatcher{ + apiKey: cfg.WatcherAPIKey, + client: watcherClient, + } + } - chClient, apiErr := newEthereumPaymentClient(funder, adjudicator, commBackend, cfg.User.CommAddr, user.OffChain) + chClient, apiErr := newChClient(funder, adjudicator, watcher, commBackend, cfg.User.CommAddr, user.OffChain) if apiErr != nil { return nil, apiErr } - sessionID := calcSessionID(user.OffChainAddr.Bytes()) - timeoutCfg := timeoutConfig{ - onChainTx: cfg.OnChainTxTimeout, - response: cfg.ResponseTimeout, + offChainAddr, err := user.OffChainAddr.MarshalBinary() + if err != nil { + return nil, perun.NewAPIErrUnknownInternal(errors.WithMessage(err, "off-chain address")) } + sessionID := calcSessionID(offChainAddr) + timeoutCfg := timeoutConfig{onChainTx: cfg.OnChainTxTimeout, response: cfg.ResponseTimeout} sess := &Session{ Logger: log.NewLoggerWithField("session-id", sessionID), id: sessionID, @@ -209,6 +222,8 @@ func New(cfg Config, currencyRegistry perun.ROCurrencyRegistry, contractRegistry idProvider: idProvider, chain: chain, funder: funder, + adjudicator: adjudicator, + watcher: watcher, chs: newChRegistry(initialChRegistrySize), contractRegistry: contractRegistry, currencyRegistry: currencyRegistry, @@ -225,9 +240,10 @@ func New(cfg Config, currencyRegistry perun.ROCurrencyRegistry, contractRegistry } func initIDProvider(idProviderType, idProviderURL string, wb perun.WalletBackend, own perun.PeerID) ( - perun.IDProvider, perun.APIError) { + perun.IDProvider, perun.APIError, +) { if idProviderType != "local" { - return nil, perun.NewAPIErrInvalidConfig(ErrUnsupportedType, "idProviderType", idProviderType) + return nil, perun.NewAPIErrInvalidConfig(perun.ErrUnsupportedType, "idProviderType", idProviderType) } idProvider, err := local.NewIDprovider(idProviderURL, wb) if err != nil { @@ -309,7 +325,7 @@ func (s *Session) AddPeerID(peerID perun.PeerID) perun.APIError { var apiErr perun.APIError if !s.isOpen { - apiErr = perun.NewAPIErrFailedPreCondition(ErrSessionClosed) + apiErr = perun.NewAPIErrFailedPreCondition(perun.ErrSessionClosed) s.WithFields(perun.APIErrAsMap("AddPeerID", apiErr)).Error(apiErr.Message()) return apiErr } @@ -319,11 +335,11 @@ func (s *Session) AddPeerID(peerID perun.PeerID) perun.APIError { // The error should be one of these following errors. switch { case errors.Is(err, idprovider.ErrPeerAliasAlreadyUsed): - apiErr = perun.NewAPIErrInvalidArgument(err, ArgNamePeerAlias, peerID.Alias) + apiErr = perun.NewAPIErrInvalidArgument(err, perun.ArgNamePeerAlias, peerID.Alias) case errors.Is(err, idprovider.ErrPeerIDAlreadyRegistered): - apiErr = perun.NewAPIErrResourceExists(ResTypePeerID, peerID.Alias) + apiErr = perun.NewAPIErrResourceExists(perun.ResTypePeerID, peerID.Alias) case errors.Is(err, idprovider.ErrParsingOffChainAddress): - apiErr = perun.NewAPIErrInvalidArgument(err, ArgNameOffChainAddr, peerID.OffChainAddrString) + apiErr = perun.NewAPIErrInvalidArgument(err, perun.ArgNameOffChainAddr, peerID.OffChainAddrString) default: apiErr = perun.NewAPIErrUnknownInternal(err) } @@ -346,14 +362,14 @@ func (s *Session) GetPeerID(alias string) (perun.PeerID, perun.APIError) { defer s.Unlock() if !s.isOpen { - apiErr := perun.NewAPIErrFailedPreCondition(ErrSessionClosed) + apiErr := perun.NewAPIErrFailedPreCondition(perun.ErrSessionClosed) s.WithFields(perun.APIErrAsMap("GetPeerID", apiErr)).Error(apiErr.Message()) return perun.PeerID{}, apiErr } peerID, isPresent := s.idProvider.ReadByAlias(alias) if !isPresent { - apiErr := perun.NewAPIErrResourceNotFound(ResTypePeerID, alias) + apiErr := perun.NewAPIErrResourceNotFound(perun.ResTypePeerID, alias) s.WithFields(perun.APIErrAsMap("GetPeerID", apiErr)).Error(apiErr.Message()) return perun.PeerID{}, apiErr } @@ -381,7 +397,8 @@ func (s *Session) GetPeerID(alias string) (perun.PeerID, perun.APIError) { // - ErrChainNotReachable when connection to blockchain drops while funding. // - ErrUnknownInternal. func (s *Session) OpenCh(pctx context.Context, openingBalInfo perun.BalInfo, app perun.App, challengeDurSecs uint64) ( - perun.ChInfo, perun.APIError) { + perun.ChInfo, perun.APIError, +) { s.WithField("method", "OpenCh").Infof( "\nReceived request with params %+v,%+v,%+v", openingBalInfo, app, challengeDurSecs) // Session lock is not acquired at the beginning, but only when adding the channel to session. @@ -394,7 +411,7 @@ func (s *Session) OpenCh(pctx context.Context, openingBalInfo perun.BalInfo, app }() if !s.isOpen { - apiErr = perun.NewAPIErrFailedPreCondition(ErrSessionClosed) + apiErr = perun.NewAPIErrFailedPreCondition(perun.ErrSessionClosed) return perun.ChInfo{}, apiErr } @@ -522,15 +539,15 @@ func retrievePartIDs(aliases []string, idProvider perun.IDReader) ([]perun.PeerI } if len(missingParts) != 0 { - return nil, perun.NewAPIErrResourceNotFound(ResTypePeerID, strings.Join(missingParts, ",")) + return nil, perun.NewAPIErrResourceNotFound(perun.ResTypePeerID, strings.Join(missingParts, ",")) } if len(repeatedParts) != 0 { aliasesValue := strings.Join(aliases, ",") - return nil, perun.NewAPIErrInvalidArgument(ErrRepeatedPeerAlias, ArgNamePeerAlias, aliasesValue) + return nil, perun.NewAPIErrInvalidArgument(perun.ErrRepeatedPeerAlias, perun.ArgNamePeerAlias, aliasesValue) } if !foundOwnAlias { aliasesValue := strings.Join(aliases, ",") - return nil, perun.NewAPIErrInvalidArgument(ErrEntryForSelfNotFound, ArgNamePeerAlias, aliasesValue) + return nil, perun.NewAPIErrInvalidArgument(perun.ErrEntryForSelfNotFound, perun.ArgNamePeerAlias, aliasesValue) } return partIDs, nil @@ -560,10 +577,11 @@ func makeOffChainAddrs(partIDs []perun.PeerID) []pwire.Address { // interpreter corresponding to the currency. func makeAllocation(balInfo perun.BalInfo, contractRegistry perun.ROContractRegistry, currencyRegistry perun.ROCurrencyRegistry) ( - []perun.Currency, *pchannel.Allocation, perun.APIError) { + []perun.Currency, *pchannel.Allocation, perun.APIError, +) { if len(balInfo.Currencies) != len(balInfo.Bals) { err := errors.New("length of currencies should match the outer length of bals") - return nil, nil, perun.NewAPIErrInvalidArgument(err, ArgNameCurrency, strings.Join(balInfo.Currencies, ",")) + return nil, nil, perun.NewAPIErrInvalidArgument(err, perun.ArgNameCurrency, strings.Join(balInfo.Currencies, ",")) } // retrieve assets for each currency assets := make([]pchannel.Asset, len(balInfo.Currencies)) @@ -574,7 +592,7 @@ func makeAllocation(balInfo perun.BalInfo, for i := range balInfo.Currencies { assets[i], found = contractRegistry.Asset(balInfo.Currencies[i]) if !found { - return nil, nil, perun.NewAPIErrResourceNotFound(ResTypeCurrency, balInfo.Currencies[i]) + return nil, nil, perun.NewAPIErrResourceNotFound(perun.ResTypeCurrency, balInfo.Currencies[i]) } // If asset was registered, currency would also have been registered. currencies[i] = currencyRegistry.Currency(balInfo.Currencies[i]) @@ -584,7 +602,7 @@ func makeAllocation(balInfo perun.BalInfo, balances[i][j], err = currencies[i].Parse(balInfo.Bals[i][j]) if err != nil { err = errors.WithMessage(err, "parsing amount") - return nil, nil, perun.NewAPIErrInvalidArgument(err, ArgNameAmount, balInfo.Bals[i][j]) + return nil, nil, perun.NewAPIErrInvalidArgument(err, perun.ArgNameAmount, balInfo.Bals[i][j]) } } } @@ -596,12 +614,13 @@ func makeAllocation(balInfo perun.BalInfo, } func updateAssetsInFunder(currs []perun.Currency, contractRegistry perun.ROContractRegistry, - f perun.Funder, onChainAcc pwallet.Address) { + f perun.Funder, onChainAcc pwallet.Address, +) { // Updating assets in funder is done only after constructing an allocation. // So, all assets will be present in the registry, for i := range currs { asset, _ := contractRegistry.Asset(currs[i].Symbol()) - if !f.IsAssetRegistered(asset) { + if !f.IsAssetRegistered(asset) && currs[i].Symbol() != currency.ETHSymbol { token, _ := contractRegistry.Token(currs[i].Symbol()) f.RegisterAssetERC20(asset, token, onChainAcc) } @@ -627,7 +646,7 @@ func (s *Session) HandleProposal(chProposal pclient.ChannelProposal, responder * // // It is implemented this way to enable easier testing. func (s *Session) HandleProposalWInterface(chProposal pclient.ChannelProposal, responder ChProposalResponder) { - ledgerChProposal, ok := chProposal.(*pclient.LedgerChannelProposal) + ledgerChProposal, ok := chProposal.(*pclient.LedgerChannelProposalMsg) if !ok { // Our handler is expected to handle only ledger channel proposals, // if it is anything else (sub-channel proposals), simply drop it. @@ -648,7 +667,7 @@ func (s *Session) HandleProposalWInterface(chProposal pclient.ChannelProposal, r p, ok := s.idProvider.ReadByOffChainAddr(ledgerChProposal.Peers[i]) if !ok { s.Infof("Rejecting channel proposal with unknown peer ID: %v", ledgerChProposal.Peers[i]) - // nolint: errcheck // It is sufficient to just log this error. + //nolint:errcheck // It is sufficient to just log this error. s.rejectChProposal(context.Background(), responder, "unrecogonized peer ID") expiry = 0 break @@ -659,7 +678,7 @@ func (s *Session) HandleProposalWInterface(chProposal pclient.ChannelProposal, r currencies, err := getCurrencies(ledgerChProposal.InitBals.Assets, s.contractRegistry, s.currencyRegistry) if err != nil { s.Infof("Rejecting channel proposal due to %v", err) - // nolint: errcheck // It is sufficient to just log this error. + //nolint:errcheck // It is sufficient to just log this error. s.rejectChProposal(context.Background(), responder, "unrecogonized currency") } @@ -694,12 +713,13 @@ func (s *Session) HandleProposalWInterface(chProposal pclient.ChannelProposal, r // But when working with multiple clients, the type underlying the asset should // be specified by the framework and all implementations should comply with it. func getCurrencies(assets []pchannel.Asset, - contractRegistry perun.ROContractRegistry, currencyRegistry perun.ROCurrencyRegistry) ([]perun.Currency, error) { + contractRegistry perun.ROContractRegistry, currencyRegistry perun.ROCurrencyRegistry, +) ([]perun.Currency, error) { currencies := make([]perun.Currency, len(assets)) - for i, asset := range assets { - symbol, found := contractRegistry.Symbol(asset.(pwallet.Address)) + for i := range assets { + symbol, found := contractRegistry.Symbol(assets[i]) if !found { - return nil, fmt.Errorf("unknown asset %v", asset.(pwallet.Address)) + return nil, fmt.Errorf("unknown asset %v", assets[i]) } // Since the symbol was found in contract registry, it must be registered in currency registry as well. currencies[i] = currencyRegistry.Currency(symbol) @@ -707,10 +727,11 @@ func getCurrencies(assets []pchannel.Asset, return currencies, nil } -func chProposalNotif(parts []string, currencies []perun.Currency, chProposal *pclient.LedgerChannelProposal, - expiry int64) perun.ChProposalNotif { +func chProposalNotif(parts []string, currencies []perun.Currency, chProposal *pclient.LedgerChannelProposalMsg, + expiry int64, +) perun.ChProposalNotif { return perun.ChProposalNotif{ - ProposalID: fmt.Sprintf("%x", chProposal.ProposalID()), + ProposalID: fmt.Sprintf("%x", chProposal.ProposalID), OpeningBalInfo: makeBalInfoFromRawBal(parts, currencies, chProposal.InitBals.Balances), App: makeApp(chProposal.App, chProposal.InitData), ChallengeDurSecs: chProposal.ChallengeDuration, @@ -750,13 +771,13 @@ func (s *Session) SubChProposals(notifier perun.ChProposalNotifier) perun.APIErr var apiErr perun.APIError if !s.isOpen { - apiErr = perun.NewAPIErrFailedPreCondition(ErrSessionClosed) + apiErr = perun.NewAPIErrFailedPreCondition(perun.ErrSessionClosed) s.WithFields(perun.APIErrAsMap("SubChProposals", apiErr)).Error(apiErr.Message()) return apiErr } if s.chProposalNotifier != nil { - apiErr = perun.NewAPIErrResourceExists(ResTypeProposalSub, s.ID()) + apiErr = perun.NewAPIErrResourceExists(perun.ResTypeProposalSub, s.ID()) s.WithFields(perun.APIErrAsMap("SubChProposals", apiErr)).Error(apiErr.Message()) return apiErr } @@ -784,13 +805,13 @@ func (s *Session) UnsubChProposals() perun.APIError { var apiErr perun.APIError if !s.isOpen { - apiErr = perun.NewAPIErrFailedPreCondition(ErrSessionClosed) + apiErr = perun.NewAPIErrFailedPreCondition(perun.ErrSessionClosed) s.WithFields(perun.APIErrAsMap("UnsubChProposals", apiErr)).Error(apiErr.Message()) return apiErr } if s.chProposalNotifier == nil { - apiErr = perun.NewAPIErrResourceNotFound(ResTypeProposalSub, s.ID()) + apiErr = perun.NewAPIErrResourceNotFound(perun.ResTypeProposalSub, s.ID()) s.WithFields(perun.APIErrAsMap("UnsubChProposals", apiErr)).Error(apiErr.Message()) return apiErr } @@ -813,7 +834,8 @@ func (s *Session) UnsubChProposals() perun.APIError { // - ErrChainNotReachable when connection to blockchain drops while funding. // - ErrUnknownInternal. func (s *Session) RespondChProposal(pctx context.Context, chProposalID string, accept bool) ( - perun.ChInfo, perun.APIError) { + perun.ChInfo, perun.APIError, +) { s.WithField("method", "RespondChProposal").Infof("\nReceived request with Params %+v,%+v", chProposalID, accept) // Session lock is not acquired at the beginning, but only when retrieving // the proposal and when adding the opened channel to session. @@ -826,7 +848,7 @@ func (s *Session) RespondChProposal(pctx context.Context, chProposalID string, a }() if !s.isOpen { - apiErr = perun.NewAPIErrFailedPreCondition(ErrSessionClosed) + apiErr = perun.NewAPIErrFailedPreCondition(perun.ErrSessionClosed) return perun.ChInfo{}, apiErr } @@ -836,7 +858,7 @@ func (s *Session) RespondChProposal(pctx context.Context, chProposalID string, a entry, ok := s.chProposalResponders[chProposalID] if !ok { s.Unlock() - apiErr = perun.NewAPIErrResourceNotFound(ResTypeProposal, chProposalID) + apiErr = perun.NewAPIErrResourceNotFound(perun.ResTypeProposal, chProposalID) return perun.ChInfo{}, apiErr } delete(s.chProposalResponders, chProposalID) @@ -859,7 +881,8 @@ func (s *Session) RespondChProposal(pctx context.Context, chProposalID string, a } func (s *Session) acceptChProposal(pctx context.Context, entry chProposalResponderEntry) ( - perun.ChInfo, perun.APIError) { + perun.ChInfo, perun.APIError, +) { ctx, cancel := context.WithTimeout(pctx, s.timeoutCfg.respChProposalAccept(entry.notif.ChallengeDurSecs)) defer cancel() @@ -897,7 +920,8 @@ func (s *Session) handleChProposalAcceptError(parts []string, err error) perun.A } func (s *Session) rejectChProposal(pctx context.Context, responder ChProposalResponder, - reason string) perun.APIError { + reason string, +) perun.APIError { ctx, cancel := context.WithTimeout(pctx, s.timeoutCfg.respChProposalReject()) defer cancel() err := responder.Reject(ctx, reason) @@ -937,7 +961,7 @@ func (s *Session) GetCh(chID string) (perun.ChAPI, perun.APIError) { s.Unlock() if ch == nil { - apiErr := perun.NewAPIErrResourceNotFound(ResTypeChannel, chID) + apiErr := perun.NewAPIErrResourceNotFound(perun.ResTypeChannel, chID) s.WithFields(perun.APIErrAsMap("GetCh (internal)", apiErr)).Error(apiErr.Message()) return nil, apiErr } @@ -951,7 +975,8 @@ func (s *Session) GetCh(chID string) (perun.ChAPI, perun.APIError) { // channel to which update is received and invokes the handler for that // channel. func (s *Session) HandleUpdate( - currState *pchannel.State, chUpdate pclient.ChannelUpdate, responder *pclient.UpdateResponder) { + currState *pchannel.State, chUpdate pclient.ChannelUpdate, responder *pclient.UpdateResponder, +) { s.HandleUpdateWInterface(currState, chUpdate, responder) } @@ -961,7 +986,8 @@ func (s *Session) HandleUpdate( // // If the session is closed, it drops the incoming updates. func (s *Session) HandleUpdateWInterface( - currState *pchannel.State, chUpdate pclient.ChannelUpdate, responder ChUpdateResponder) { + currState *pchannel.State, chUpdate pclient.ChannelUpdate, responder ChUpdateResponder, +) { s.Debugf("SDK Callback: HandleUpdate. Params: %+v", chUpdate) s.Lock() defer s.Unlock() @@ -988,9 +1014,9 @@ func (s *Session) HandleUpdateWInterface( // // `Force` parameter determines what happens when there are open channels in the // session. -// * If `False` the API returns an error when there are open channels. This +// - If `False` the API returns an error when there are open channels. This // should be used by default. -// * If `True`, the session is forcibly closed and the API returns list of open +// - If `True`, the session is forcibly closed and the API returns list of open // channels that were persisted. When a session is re-opened with the same // config file, these channels can be restored in open state. However, use this // with caution, as closing a session with open channels creates a possibility @@ -998,11 +1024,11 @@ func (s *Session) HandleUpdateWInterface( // an older, invalid state on the blockchain and finalize it. // // If there is an error, it will be one of the following codes: -// - ErrFailedPrecondition when the session is closed. -// - ErrFailedPreCondition when force=false and unclosed channels exists. -// Additional Info will contain an extra field: OpenChannelsInfo that -// contains a list of Channel Info. -// - ErrUnknownInternal. +// - ErrFailedPrecondition when the session is closed. +// - ErrFailedPreCondition when force=false and unclosed channels exists. +// Additional Info will contain an extra field: OpenChannelsInfo that +// contains a list of Channel Info. +// - ErrUnknownInternal. func (s *Session) Close(force bool) ([]perun.ChInfo, perun.APIError) { s.WithField("method", "Close").Infof("\nReceived request with params %+v", force) s.Lock() @@ -1016,7 +1042,7 @@ func (s *Session) Close(force bool) ([]perun.ChInfo, perun.APIError) { }() if !s.isOpen { - apiErr = perun.NewAPIErrFailedPreCondition(ErrSessionClosed) + apiErr = perun.NewAPIErrFailedPreCondition(perun.ErrSessionClosed) return nil, apiErr } @@ -1100,13 +1126,13 @@ func (s *Session) DeployAssetERC20(tokenAddr string) (assetAddr string, _ perun. }() if !s.isOpen { - apiErr = perun.NewAPIErrFailedPreCondition(ErrSessionClosed) + apiErr = perun.NewAPIErrFailedPreCondition(perun.ErrSessionClosed) return "", apiErr } token, err := walletBackend.ParseAddr(tokenAddr) if err != nil { - apiErr = perun.NewAPIErrInvalidArgument(err, ArgNameToken, tokenAddr) + apiErr = perun.NewAPIErrInvalidArgument(err, perun.ArgNameToken, tokenAddr) return "", apiErr } asset, err := s.chain.DeployAssetERC20(s.contractRegistry.Adjudicator(), token, s.user.OnChain.Addr) diff --git a/session/session_integ_test.go b/session/session_integ_test.go index 4cc2fde0..a0a61e13 100644 --- a/session/session_integ_test.go +++ b/session/session_integ_test.go @@ -21,7 +21,6 @@ package session_test import ( "fmt" - "io/ioutil" "math/rand" "os" "testing" @@ -32,6 +31,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + pperunioserializer "perun.network/go-perun/wire/perunio/serializer" + "github.com/hyperledger-labs/perun-node" "github.com/hyperledger-labs/perun-node/blockchain/ethereum/ethereumtest" "github.com/hyperledger-labs/perun-node/comm/tcp" @@ -114,7 +115,7 @@ func Test_Integ_New(t *testing.T) { t.Run("invalidConfig_onChainAddr", func(t *testing.T) { cfgCopy := cfg cfgCopy.DatabaseDir = newDatabaseDir(t) - cfgCopy.User.OnChainAddr = "invalid-addr" //nolint: goconst // it's okay to repeat this phrase. + cfgCopy.User.OnChainAddr = "invalid-addr" //nolint:goconst // it's okay to repeat this phrase. _, err := session.New(cfgCopy, currencies, contracts) require.Error(t, err) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrInvalidConfig, "") @@ -180,9 +181,9 @@ func Test_Integ_New(t *testing.T) { listener, err := tcp.NewTCPBackend(1 * time.Second).NewListener(cfgCopy.User.CommAddr) require.NoError(t, err) go func() { - _, _ = listener.Accept() //nolint: errcheck // no need to check error. + _, _ = listener.Accept(pperunioserializer.Serializer()) //nolint:errcheck // no need to check error. }() - defer listener.Close() //nolint: errcheck // no need to check error. + defer listener.Close() //nolint:errcheck // no need to check error. _, apiErr := session.New(cfgCopy, currencies, contracts) require.Error(t, apiErr) @@ -260,9 +261,9 @@ func Test_Integ_Persistence(t *testing.T) { t.Run("err_database_init", func(t *testing.T) { prng := rand.New(rand.NewSource(ethereumtest.RandSeedForTestAccs)) cfg := sessiontest.NewConfigT(t, prng) // Get a session config with no peerIDs in the ID provider. - tempFile, err := ioutil.TempFile("", "") + tempFile, err := os.CreateTemp("", "") require.NoError(t, err) - tempFile.Close() // nolint:errcheck + tempFile.Close() //nolint:errcheck cfg.DatabaseDir = tempFile.Name() contracts := ethereumtest.SetupContractsT(t, cfg.ChainURL, cfg.ChainID, cfg.OnChainTxTimeout, false) @@ -285,7 +286,7 @@ Bob: comm_address: 127.0.0.1:5750 comm_type: tcpip` - tempFile, err := ioutil.TempFile("", "") + tempFile, err := os.CreateTemp("", "") require.NoError(t, err) t.Cleanup(func() { if err = os.Remove(tempFile.Name()); err != nil { @@ -300,7 +301,7 @@ Bob: func copyDirToTmp(t *testing.T, src string) (tempDirName string) { var err error - tempDirName, err = ioutil.TempDir("", "") + tempDirName, err = os.MkdirTemp("", "") require.NoError(t, err) require.NoError(t, copyutil.Copy(src, tempDirName)) t.Cleanup(func() { @@ -312,7 +313,7 @@ func copyDirToTmp(t *testing.T, src string) (tempDirName string) { } func newDatabaseDir(t *testing.T) (dir string) { - databaseDir, err := ioutil.TempDir("", "") + databaseDir, err := os.MkdirTemp("", "") require.NoError(t, err) t.Cleanup(func() { if err := os.RemoveAll(databaseDir); err != nil { diff --git a/session/session_test.go b/session/session_test.go index 47850af8..6408339a 100644 --- a/session/session_test.go +++ b/session/session_test.go @@ -30,6 +30,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" pethchannel "perun.network/go-perun/backend/ethereum/channel" + pethwallet "perun.network/go-perun/backend/ethereum/wallet" pchannel "perun.network/go-perun/channel" pclient "perun.network/go-perun/client" pwallet "perun.network/go-perun/wallet" @@ -57,7 +58,8 @@ func Test_SessionAPI_Interface(t *testing.T) { } func newSessionWMockChClient(t *testing.T, isOpen bool, peerIDs ...perun.PeerID) ( - *session.Session, *mocks.ChClient, *ethereumtest.ChainBackendSetup) { + *session.Session, *mocks.ChClient, *ethereumtest.ChainBackendSetup, +) { rng := rand.New(rand.NewSource(ethereumtest.RandSeedForTestAccs)) cfg := sessiontest.NewConfigT(t, rng, peerIDs...) chClient := &mocks.ChClient{} @@ -89,14 +91,14 @@ func Test_Session_AddPeerID(t *testing.T) { err := openSession.AddPeerID(peer1WithAlias0) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrInvalidArgument) - peruntest.AssertErrInfoInvalidArgument(t, err.AddInfo(), session.ArgNamePeerAlias, peer1WithAlias0.Alias) + peruntest.AssertErrInfoInvalidArgument(t, err.AddInfo(), perun.ArgNamePeerAlias, peer1WithAlias0.Alias) }) t.Run("peerID_already_registered", func(t *testing.T) { err := openSession.AddPeerID(peerIDs[0]) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceExists) - peruntest.AssertErrInfoResourceExists(t, err.AddInfo(), session.ResTypePeerID, peerIDs[0].Alias) + peruntest.AssertErrInfoResourceExists(t, err.AddInfo(), perun.ResTypePeerID, peerIDs[0].Alias) }) t.Run("peerID_address_string_too_long", func(t *testing.T) { @@ -106,7 +108,7 @@ func Test_Session_AddPeerID(t *testing.T) { peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrInvalidArgument) argumentValue := peer1WithInvalidAddrString.OffChainAddrString - peruntest.AssertErrInfoInvalidArgument(t, err.AddInfo(), session.ArgNameOffChainAddr, argumentValue) + peruntest.AssertErrInfoInvalidArgument(t, err.AddInfo(), perun.ArgNameOffChainAddr, argumentValue) }) t.Run("session_closed", func(t *testing.T) { @@ -133,14 +135,14 @@ func Test_Session_GetPeerID(t *testing.T) { unknownAlias := "unknown-alias" _, err := openSession.GetPeerID(unknownAlias) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceNotFound) - peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), session.ResTypePeerID, unknownAlias) + peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), perun.ResTypePeerID, unknownAlias) }) t.Run("session_closed", func(t *testing.T) { _, err := closedSession.GetPeerID(peerIDs[0].Alias) require.Error(t, err) - wantMessage := session.ErrSessionClosed.Error() + wantMessage := perun.ErrSessionClosed.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, wantMessage) assert.Nil(t, err.AddInfo()) }) @@ -194,7 +196,7 @@ func Test_Session_OpenCh(t *testing.T) { _, err := sess.OpenCh(context.Background(), validOpeningBalInfo, app, 10) require.Error(t, err) - wantMessage := session.ErrSessionClosed.Error() + wantMessage := perun.ErrSessionClosed.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, wantMessage) assert.Nil(t, err.AddInfo()) }) @@ -208,7 +210,7 @@ func Test_Session_OpenCh(t *testing.T) { _, err := sess.OpenCh(context.Background(), invalidOpeningBalInfo, app, 10) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceNotFound) - peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), session.ResTypePeerID, unknownAlias) + peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), perun.ResTypePeerID, unknownAlias) }) t.Run("two_unknown_peer_aliases", func(t *testing.T) { @@ -223,7 +225,7 @@ func Test_Session_OpenCh(t *testing.T) { require.Error(t, err) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceNotFound) - peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), session.ResTypePeerID, partsList) + peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), perun.ResTypePeerID, partsList) }) t.Run("repeated_peer_aliases", func(t *testing.T) { @@ -235,9 +237,9 @@ func Test_Session_OpenCh(t *testing.T) { _, err := sess.OpenCh(context.Background(), invalidOpeningBalInfo, app, 10) - wantMessage := session.ErrRepeatedPeerAlias.Error() + wantMessage := perun.ErrRepeatedPeerAlias.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrInvalidArgument, wantMessage) - peruntest.AssertErrInfoInvalidArgument(t, err.AddInfo(), session.ArgNamePeerAlias, partsList) + peruntest.AssertErrInfoInvalidArgument(t, err.AddInfo(), perun.ArgNamePeerAlias, partsList) }) t.Run("missing_own_alias", func(t *testing.T) { @@ -249,9 +251,9 @@ func Test_Session_OpenCh(t *testing.T) { _, err := sess.OpenCh(context.Background(), invalidOpeningBalInfo, app, 10) require.Error(t, err) - wantMessage := session.ErrEntryForSelfNotFound.Error() + wantMessage := perun.ErrEntryForSelfNotFound.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrInvalidArgument, wantMessage) - peruntest.AssertErrInfoInvalidArgument(t, err.AddInfo(), session.ArgNamePeerAlias, partsList) + peruntest.AssertErrInfoInvalidArgument(t, err.AddInfo(), perun.ArgNamePeerAlias, partsList) }) t.Run("unsupported_currency", func(t *testing.T) { @@ -264,7 +266,7 @@ func Test_Session_OpenCh(t *testing.T) { peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceNotFound) peruntest.AssertErrInfoResourceNotFound( - t, err.AddInfo(), session.ResTypeCurrency, invalidOpeningBalInfo.Currencies[0]) + t, err.AddInfo(), perun.ResTypeCurrency, invalidOpeningBalInfo.Currencies[0]) }) t.Run("invalid_amount", func(t *testing.T) { @@ -276,7 +278,7 @@ func Test_Session_OpenCh(t *testing.T) { _, err := sess.OpenCh(context.Background(), invalidOpeningBalInfo, app, 10) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrInvalidArgument) - peruntest.AssertErrInfoInvalidArgument(t, err.AddInfo(), session.ArgNameAmount, invalidOpeningBalInfo.Bals[0][0]) + peruntest.AssertErrInfoInvalidArgument(t, err.AddInfo(), perun.ArgNameAmount, invalidOpeningBalInfo.Bals[0][0]) }) t.Run("chClient_proposeChannel_AnError", func(t *testing.T) { @@ -417,7 +419,7 @@ func Test_SubUnsubChProposal(t *testing.T) { // == SubTest 2: Sub again, should error == err = openSession.SubChProposals(dummyNotifier) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceExists) - peruntest.AssertErrInfoResourceExists(t, err.AddInfo(), session.ResTypeProposalSub, openSession.ID()) + peruntest.AssertErrInfoResourceExists(t, err.AddInfo(), perun.ResTypeProposalSub, openSession.ID()) // == SubTest 3: Unsub successfully == err = openSession.UnsubChProposals() @@ -426,11 +428,11 @@ func Test_SubUnsubChProposal(t *testing.T) { // == SubTest 4: Unsub again, should error == err = openSession.UnsubChProposals() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceNotFound) - peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), session.ResTypeProposalSub, openSession.ID()) + peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), perun.ResTypeProposalSub, openSession.ID()) t.Run("Sub_sessionClosed", func(t *testing.T) { err = closedSession.SubChProposals(dummyNotifier) - wantMessage := session.ErrSessionClosed.Error() + wantMessage := perun.ErrSessionClosed.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, wantMessage) assert.Nil(t, err.AddInfo()) }) @@ -438,7 +440,7 @@ func Test_SubUnsubChProposal(t *testing.T) { t.Run("Unsub_sessionClosed", func(t *testing.T) { err = closedSession.UnsubChProposals() require.Error(t, err) - wantMessage := session.ErrSessionClosed.Error() + wantMessage := perun.ErrSessionClosed.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, wantMessage) assert.Nil(t, err.AddInfo()) }) @@ -526,7 +528,7 @@ func Test_HandleProposalWInterface_Respond(t *testing.T) { chProposalID := "any-proposal-id" // A closed session returns error irrespective of proposal id. _, err := sess.RespondChProposal(context.Background(), chProposalID, true) - wantMessage := session.ErrSessionClosed.Error() + wantMessage := perun.ErrSessionClosed.Error() peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, wantMessage) assert.Nil(t, err.AddInfo()) }) @@ -538,7 +540,7 @@ func Test_HandleProposalWInterface_Respond(t *testing.T) { _, err := sess.RespondChProposal(context.Background(), unknownProposalID, true) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceNotFound) - peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), session.ResTypeProposal, unknownProposalID) + peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), perun.ResTypeProposal, unknownProposalID) }) t.Run("response_timeout_expired", func(t *testing.T) { @@ -560,7 +562,7 @@ func Test_HandleProposalWInterface_Respond(t *testing.T) { ownPeerID, err := session.GetPeerID(perun.OwnAlias) require.NoError(t, err) chProposal := newChProposal(t, ownPeerID, peerIDs[0]) - chProposalID := fmt.Sprintf("%x", chProposal.ProposalID()) + chProposalID := fmt.Sprintf("%x", chProposal.Base().ProposalID) responder := &mocks.ChProposalResponder{} // Dummy responder as no methods on it will be invoked. session.HandleProposalWInterface(chProposal, responder) @@ -750,7 +752,7 @@ func Test_ProposeCh_GetCh(t *testing.T) { unknownChID := "unknown-ch-ID" _, err := sess.GetCh(unknownChID) peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrResourceNotFound) - peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), session.ResTypeChannel, unknownChID) + peruntest.AssertErrInfoResourceNotFound(t, err.AddInfo(), perun.ResTypeChannel, unknownChID) }) } @@ -811,7 +813,7 @@ func Test_ProposeCh_CloseSession(t *testing.T) { _, err := sess.Close(false) require.Error(t, err) - peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, session.ErrSessionClosed.Error()) + peruntest.AssertAPIError(t, err, perun.ClientError, perun.ErrFailedPreCondition, perun.ErrSessionClosed.Error()) assert.Nil(t, err.AddInfo()) }) } @@ -936,17 +938,19 @@ func newChProposal(t *testing.T, ownAddr, peer perun.PeerID) pclient.ChannelProp } func newSessionWChProposal(t *testing.T, peerIDs []perun.PeerID) ( - *session.Session, pclient.ChannelProposal, string) { + *session.Session, pclient.ChannelProposal, string, +) { session, _, _ := newSessionWMockChClient(t, true, peerIDs...) ownPeerID, err := session.GetPeerID(perun.OwnAlias) require.NoError(t, err) chProposal := newChProposal(t, ownPeerID, peerIDs[0]) - chProposalID := fmt.Sprintf("%x", chProposal.ProposalID()) + chProposalID := fmt.Sprintf("%x", chProposal.Base().ProposalID) return session, chProposal, chProposalID } func newSessionWCh(t *testing.T, peerIDs []perun.PeerID, openingBalInfo perun.BalInfo, - ch session.PChannel) *session.Session { + ch session.PChannel, +) *session.Session { app := perun.App{ Def: pchannel.NoApp(), Data: pchannel.NoData(), @@ -975,9 +979,10 @@ func roContractRegistry() perun.ROContractRegistry { return r } r = &mocks.ROContractRegistry{} - adjudicator, assetETH, _ := ethereumtest.ContractAddrs() - r.On("Adjudicator").Return(adjudicator) - r.On("AssetETH").Return(assetETH) + adjudicatorAddr, assetETHAddr, _ := ethereumtest.ContractAddrs() + r.On("Adjudicator").Return(adjudicatorAddr) + r.On("AssetETH").Return(assetETHAddr) + assetETH := pethchannel.NewAssetFromAddress(pethwallet.AsEthAddr(assetETHAddr)) r.On("Asset", "ETH").Return(assetETH, true) return r } diff --git a/session/sessiontest/config.go b/session/sessiontest/config.go index 954484cc..d1ed1641 100644 --- a/session/sessiontest/config.go +++ b/session/sessiontest/config.go @@ -18,7 +18,6 @@ package sessiontest import ( "fmt" - "io/ioutil" "math/rand" "os" "testing" @@ -58,19 +57,19 @@ func NewConfigFileT(t *testing.T, config session.Config) string { // NewConfigFile creates a temporary file containing the given session configuration and // returns the path to it. It also registers a cleanup function on the passed test handler. func NewConfigFile(config interface{}) (string, error) { - tempFile, err := ioutil.TempFile("", "*.yaml") + tempFile, err := os.CreateTemp("", "*.yaml") if err != nil { return "", errors.Wrap(err, "creating temp file for config") } encoder := yaml.NewEncoder(tempFile) if err := encoder.Encode(config); err != nil { - tempFile.Close() // nolint: errcheck - os.Remove(tempFile.Name()) // nolint: errcheck + tempFile.Close() //nolint:errcheck + os.Remove(tempFile.Name()) //nolint:errcheck return "", errors.Wrap(err, "encoding config") } if err := encoder.Close(); err != nil { - tempFile.Close() // nolint: errcheck - os.Remove(tempFile.Name()) // nolint: errcheck + tempFile.Close() //nolint:errcheck + os.Remove(tempFile.Name()) //nolint:errcheck return "", errors.Wrap(err, "closing encoder") } return tempFile.Name(), tempFile.Close() @@ -131,13 +130,16 @@ func NewConfig(rng *rand.Rand, peerIDs ...perun.PeerID) (session.Config, error) IDProviderType: "local", IDProviderURL: idProviderURL, + FundingType: "local", Adjudicator: adjudicator, AssetETH: assetETH, + + WatcherType: "local", }, nil } func newDatabaseDir() (string, error) { - databaseDir, err := ioutil.TempDir("", "") + databaseDir, err := os.MkdirTemp("", "") if err != nil { return "", errors.Wrap(err, "creating temp directory for database") } diff --git a/session/sessiontest/config_test.go b/session/sessiontest/config_test.go new file mode 100644 index 00000000..7db98a7b --- /dev/null +++ b/session/sessiontest/config_test.go @@ -0,0 +1,57 @@ +// Copyright (c) 2020 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sessiontest_test + +import ( + "fmt" + "math/rand" + "testing" + + "github.com/hyperledger-labs/perun-node/blockchain/ethereum/ethereumtest" + + "github.com/ethereum/go-ethereum/accounts" + "github.com/ethereum/go-ethereum/accounts/keystore" + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + pethwallet "perun.network/go-perun/backend/ethereum/wallet" +) + +// TestPrintPrivateKeys function is used to the print the private key of +// on-chain accounts for n users used in tests. +// +// These private keys are used for initializing ganache-cli node with pre-funded accounts. +func TestPrintPrivateKeys(t *testing.T) { + prng := rand.New(rand.NewSource(ethereumtest.RandSeedForTestAccs)) + + count := uint(3) + count *= 2 + ws, err := ethereumtest.NewWalletSetup(prng, count) + require.NoError(t, err) + password := "" + fmt.Printf("\nNo Address Private Key\n\n") + for i := uint(0); i < count; i = i + 2 { + acc := ws.Accs[i] + + addr := common.Address(*(acc.Address()).(*pethwallet.Address)) + keyJSON, err := ws.Keystore.Export(accounts.Account{Address: addr}, password, password) + require.NoError(t, err) + + key, err := keystore.DecryptKey(keyJSON, password) + require.NoError(t, err) + fmt.Printf("%d:\t 0x%s: 0x%X\n", (i+2)/2, acc.Address(), key.PrivateKey.D.Bytes()) + } +} diff --git a/session/watcher.go b/session/watcher.go new file mode 100644 index 00000000..6043e7df --- /dev/null +++ b/session/watcher.go @@ -0,0 +1,76 @@ +// Copyright (c) 2022 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package session + +import ( + "context" + + pchannel "perun.network/go-perun/channel" + pwatcher "perun.network/go-perun/watcher" + + "github.com/hyperledger-labs/perun-node" +) + +// StartWatchingLedgerChannel provides a wrapper to call the +// StartWatchingLedgerChannel method on session. +func (s *Session) StartWatchingLedgerChannel( + ctx context.Context, + signedState pchannel.SignedState, +) (pwatcher.StatesPub, pwatcher.AdjudicatorSub, perun.APIError) { + s.WithField("method", "StartWatchingLedgerChannel").Infof("\nReceived request with params %+v", signedState) + statesPub, adjSub, err := s.watcher.StartWatchingLedgerChannel(ctx, signedState) + if err != nil { + apiErr := perun.NewAPIErrUnknownInternal(err) + s.WithFields(perun.APIErrAsMap("StartWatchingLedgerChannel", apiErr)).Error(apiErr.Message()) + return nil, nil, apiErr + } + s.WithField("method", "StartWatchingLedgerChannel").Infof("Started watching for ledger channel %+v", + signedState.State.ID) + return statesPub, adjSub, nil +} + +// StartWatchingSubChannel provides a wrapper to call the +// StartWatchingSubChannel method on session. +func (s *Session) StartWatchingSubChannel( + ctx context.Context, + parent pchannel.ID, + signedState pchannel.SignedState, +) (pwatcher.StatesPub, pwatcher.AdjudicatorSub, perun.APIError) { + s.WithField("method", "StartWatchingSubChannel").Infof("\nReceived request with params %+v, %+v", parent, signedState) + statesPub, adjSub, err := s.watcher.StartWatchingSubChannel(ctx, parent, signedState) + if err != nil { + apiErr := perun.NewAPIErrUnknownInternal(err) + s.WithFields(perun.APIErrAsMap("StartWatchingSubChannel", apiErr)).Error(apiErr.Message()) + return nil, nil, apiErr + } + s.WithField("method", "StartWatchingSubChannel").Infof("Started watching for sub channel %+v", + signedState.State.ID) + return statesPub, adjSub, nil +} + +// StopWatching provides a wrapper to call the StopWatching method on session. +func (s *Session) StopWatching(ctx context.Context, chID pchannel.ID) perun.APIError { + s.WithField("method", "StopWatching").Infof("\nReceived request with params %+v", chID) + err := s.watcher.StopWatching(ctx, chID) + if err != nil { + apiErr := perun.NewAPIErrUnknownInternal(err) + s.WithFields(perun.APIErrAsMap("UnsubChProposals", apiErr)).Error(apiErr.Message()) + return apiErr + } + s.WithField("method", "StopWatching").Infof("Stopped watching for channel %+v", chID) + return nil +} diff --git a/session/watcherClient.go b/session/watcherClient.go new file mode 100644 index 00000000..4760a055 --- /dev/null +++ b/session/watcherClient.go @@ -0,0 +1,264 @@ +// Copyright (c) 2022 - for information on the respective copyright owner +// see the NOTICE file and/or the repository at +// https://github.com/hyperledger-labs/perun-node +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package session + +import ( + "context" + "sync" + + "github.com/pkg/errors" + pchannel "perun.network/go-perun/channel" + pwatcher "perun.network/go-perun/watcher" + + "github.com/hyperledger-labs/perun-node/api/grpc/pb" +) + +type grpcWatcher struct { + apiKey string + client pb.Watching_APIClient +} + +func (w *grpcWatcher) StartWatchingLedgerChannel( //nolint:funlen, gocognit + _ context.Context, + signedState pchannel.SignedState, +) (pwatcher.StatesPub, pwatcher.AdjudicatorSub, error) { + stream, err := w.client.StartWatchingLedgerChannel(context.Background()) + if err != nil { + return nil, nil, errors.Wrap(err, "connecting to the server") + } + protoReq, err := signedStateToLedgerChReq(signedState) + if err != nil { + return nil, nil, errors.Wrap(err, "parsing to proto request") + } + protoReq.SessionID = w.apiKey + + // Parameter for start watching call is sent as first client stream. + err = stream.Send(protoReq) + if err != nil { + return nil, nil, errors.Wrap(err, "parsing to proto request") + } + + statesPubSub := newStatesPubSub() + adjEventsPubSub := newAdjudicatorEventsPubSub() + + // CLOSE SHOULD BE CALLED ON THIS ???? SO STORE THEM IN WATCHER ??? + + // This stream is anyways closed when StopWatching is called for. + // Hence, that will act as the exit condition for the loop. + + var tx pchannel.Transaction + var isOpen bool + go func() { + statesStream := statesPubSub.statesStream() + for { + tx, isOpen = <-statesStream + if !isOpen { + return + } + protoReq, err = txToProtoLedgerChReq(tx) + if err != nil { + return + } + + // Handle error while sending notification. + err = stream.Send(protoReq) + if err != nil { + return + } + } + }() + + var req *pb.StartWatchingLedgerChannelResp + var adjEvent pchannel.AdjudicatorEvent + + go func() { + AdjEventsSubLoop: + for { + req, err = stream.Recv() + if err != nil { + err = errors.WithMessage(err, "reading published adj event data") + break AdjEventsSubLoop + } + adjEvent, err = adjEventFromLedgerChResp(req) + if err != nil { + err = errors.WithMessage(err, "parsing published adj event data") + break AdjEventsSubLoop + } + adjEventsPubSub.publish(adjEvent) + } + }() + + return statesPubSub, adjEventsPubSub, err +} + +func (w *grpcWatcher) StartWatchingSubChannel( + _ context.Context, + _ pchannel.ID, + _ pchannel.SignedState, +) (pwatcher.StatesPub, pwatcher.AdjudicatorSub, error) { + return nil, nil, nil +} + +func (w *grpcWatcher) StopWatching(_ context.Context, _ pchannel.ID) error { + return nil +} + +func txToProtoLedgerChReq(req pchannel.Transaction) (protoReq *pb.StartWatchingLedgerChannelReq, err error) { + protoReq = &pb.StartWatchingLedgerChannelReq{} + + if protoReq.State, err = pb.FromState(req.State); err != nil { + return protoReq, err + } + sigs := make([][]byte, len(req.Sigs)) + for i := range sigs { + copy(sigs[i], req.Sigs[i]) + } + return protoReq, nil +} + +func signedStateToLedgerChReq(req pchannel.SignedState) (protoReq *pb.StartWatchingLedgerChannelReq, err error) { + protoReq = &pb.StartWatchingLedgerChannelReq{} + + if protoReq.Params, err = pb.FromParams(req.Params); err != nil { + return protoReq, err + } + if protoReq.State, err = pb.FromState(req.State); err != nil { + return protoReq, err + } + sigs := make([][]byte, len(req.Sigs)) + for i := range sigs { + copy(sigs[i], req.Sigs[i]) + } + return protoReq, nil +} + +func adjEventFromLedgerChResp(protoResponse *pb.StartWatchingLedgerChannelResp, +) (adjEvent pchannel.AdjudicatorEvent, err error) { + switch e := protoResponse.Response.(type) { + case *pb.StartWatchingLedgerChannelResp_RegisteredEvent: + adjEvent, err = pb.ToRegisteredEvent(e.RegisteredEvent) + case *pb.StartWatchingLedgerChannelResp_ProgressedEvent: + adjEvent, err = pb.ToProgressedEvent(e.ProgressedEvent) + case *pb.StartWatchingLedgerChannelResp_ConcludedEvent: + adjEvent = pb.ToConcludedEvent(e.ConcludedEvent) + case *pb.StartWatchingLedgerChannelResp_Error: + return nil, err + default: + return nil, errors.New("unknown even type") + } + return adjEvent, err +} + +var _ pwatcher.AdjudicatorSub = &adjudicatorPubSub{} + +const adjPubSubBufferSize = 10 + +type ( + adjudicatorPubSub struct { + once sync.Once //nolint:unused + pipe chan pchannel.AdjudicatorEvent + } +) + +func newAdjudicatorEventsPubSub() *adjudicatorPubSub { + return &adjudicatorPubSub{ + pipe: make(chan pchannel.AdjudicatorEvent, adjPubSubBufferSize), + } +} + +// publish publishes the given adjudicator event to the subscriber. +// +// Panics if the pub-sub instance is already closed. It is implemented this +// way, because +// 1. The watcher will publish on this pub-sub only when it receives an +// adjudicator event from the blockchain. +// 2. When de-registering a channel from the watcher, watcher will close the +// subscription for adjudicator events from blockchain, before closing this +// pub-sub. +// 3. This way, it can be guaranteed that, this method will never be called +// after the pub-sub instance is closed. +func (a *adjudicatorPubSub) publish(e pchannel.AdjudicatorEvent) { + a.pipe <- e +} + +// close closes the publisher instance and the associated subscription. Any +// further call to publish, after a pub-sub is closed will panic. +func (a *adjudicatorPubSub) close() { //nolint:unused + a.once.Do(func() { close(a.pipe) }) +} + +// EventStream returns a channel for consuming the published adjudicator +// events. It always returns the same channel and does not support +// multiplexing. +// +// The channel will be closed when the pub-sub instance is closed and Err +// should tell the possible error. +func (a *adjudicatorPubSub) EventStream() <-chan pchannel.AdjudicatorEvent { + return a.pipe +} + +// Err always returns nil. Because, there will be no errors when closing a +// local subscription. +func (a *adjudicatorPubSub) Err() error { + return nil +} + +var _ pwatcher.StatesPub = &statesPubSub{} + +const statesPubSubBufferSize = 10 + +type ( + statesPubSub struct { + once sync.Once //nolint:unused + pipe chan pchannel.Transaction + } +) + +func newStatesPubSub() *statesPubSub { + return &statesPubSub{ + pipe: make(chan pchannel.Transaction, statesPubSubBufferSize), + } +} + +// Publish publishes the given transaction (state and signatures on it) to the +// subscriber. +// +// Always returns nil. Error result is for implementing watcher.StatesPub. +// +// Panics if the pub-sub instance is already closed. It is implemented this +// way, because +// 1. Watcher requires that, the Publish method must not be called after stop +// watching for a channel. See docs of watcher.StatesPub for more details. +// 2. Hence, by properly integrating the watcher into the client, it can be +// guaranteed that, this method will never be called after the pub-sub +// instance is closed and that, this method will never panic. +func (s *statesPubSub) Publish(_ context.Context, tx pchannel.Transaction) error { + s.pipe <- tx + return nil +} + +// close closes the publisher instance and the associated subscription. Any +// further call to Publish, after a pub-sub is closed will panic. +func (s *statesPubSub) close() { //nolint:unused + s.once.Do(func() { close(s.pipe) }) +} + +// statesStream returns a channel for consuming the published states. It always +// returns the same channel and does not support multiplexing. +func (s *statesPubSub) statesStream() <-chan pchannel.Transaction { + return s.pipe +} diff --git a/testdata/session/persistence/alice-database/000001.log b/testdata/session/persistence/alice-database/000001.log index 6546d86f..115191f6 100644 Binary files a/testdata/session/persistence/alice-database/000001.log and b/testdata/session/persistence/alice-database/000001.log differ diff --git a/testdata/session/persistence/alice-database/LOG b/testdata/session/persistence/alice-database/LOG index c483fab0..787ba244 100644 --- a/testdata/session/persistence/alice-database/LOG +++ b/testdata/session/persistence/alice-database/LOG @@ -1,8 +1,8 @@ -=============== Jun 29, 2021 (IST) =============== -23:57:47.498546 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -23:57:47.509138 db@open opening -23:57:47.509882 version@stat F·[] S·0B[] Sc·[] -23:57:47.512482 db@janitor F·2 G·0 -23:57:47.512499 db@open done T·3.330622ms -23:58:32.489944 db@close closing -23:58:32.490003 db@close done T·58.082µs +=============== Aug 31, 2022 (CEST) =============== +10:28:37.476644 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +10:28:37.489477 db@open opening +10:28:37.489656 version@stat F·[] S·0B[] Sc·[] +10:28:37.492998 db@janitor F·2 G·0 +10:28:37.493006 db@open done T·3.522471ms +10:29:55.028849 db@close closing +10:29:55.028932 db@close done T·81.593µs